diff --git a/doc/building.html b/doc/building.html
index a92e73cd8e893..3aad6eae0742b 100644
--- a/doc/building.html
+++ b/doc/building.html
@@ -49,7 +49,7 @@
Building the JDK
Building
on aarch64
Building on 32-bit arm
+id="toc-building-on-32-bit-arm">Building on 32-bit ARM
Operating System Requirements
@@ -74,7 +74,7 @@ Building the JDK
JDK Requirements
External Library Requirements
@@ -116,7 +116,7 @@ Building the JDK
macOS
Cross-compiling
+id="toc-cross-compiling">Cross-Compiling
Build
Performance
@@ -146,9 +146,9 @@ Building the JDK
Icecc /
-icecream
+Icecream
Using the javac server
+id="toc-using-the-javac-server">Using the javac Server
Building the Right Target
@@ -202,7 +202,7 @@ Building the JDK
Contributing to the JDK
Editing this document
+id="toc-editing-this-document">Editing This Document
TL;DR (Instructions for the
@@ -341,7 +341,7 @@ Branch Protection
build can be run on both machines with and without support for branch
protection in hardware. Branch Protection is only supported for Linux
targets.
-Building on 32-bit arm
+Building on 32-bit ARM
This is not recommended. Instead, see the section on Cross-compiling .
Operating System
@@ -390,7 +390,8 @@ Operating System
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 the JDK.
+be able to build the JDK. (Note: The Windows 32-bit x86 port is
+deprecated and may be removed in a future release.)
On Windows, it is important that you pay attention to the
instructions in the Special
Considerations .
@@ -407,8 +408,31 @@ Windows
use --with-msvcr-dll=/cygdrive/c/msvcr100.dll
rather than
--with-msvcr-dll=c:\msvcr100.dll
. For details on this
conversion, see the section on Fixpath .
-Note: The Windows 32-bit x86 port is deprecated and may be removed in
-a future release.
+Locale Requirements
+Building and testing the JDK requires a well-defined locale to be
+guaranteed to run correctly. On non-Windows operating systems, this is
+achieved using the LC_*
variables, which propagate to all
+child processes of the build. Unfortunately, there is no way to set the
+locale for a specific process like this in Windows. Instead, changes to
+locale can only be made globally, which will affect all applications run
+by the user. Furthermore, Windows makes a difference between user locale
+and system locale, where the latter determines e.g. the file path
+encoding. Both this locale settings affect building and testing the
+JDK.
+The recommended and supported way
+of building the JDK on Windows is to set both the system locale and the
+user locale to US English . The system setting can be
+changed by going to the Control Panel, choosing "Regional Settings"
+-> "Administrative" and then pressing on the "Change System Locale"
+button.
+Since this is annoying for users who prefer another locale, we strive
+to get the building and testing to work on other locales as well. This
+is on a "best effort" level, so beware! You might get odd results in
+both building and testing. If you do, remember that locales other than
+US English are not supported nor recommended.
+It is also imperative to install the US English language pack in
+Visual Studio. For details, see Microsoft Visual Studio .
Cygwin
Install Cygwin as instructed on
the home page. It is strongly recommended to use the 64-bit version of
@@ -626,6 +650,27 @@
Microsoft Visual Studio
If you have Visual Studio installed but configure
fails
to detect it, it may be because of spaces in
path .
+You must install the US English locale, otherwise the build system
+might not be able to interact properly with the compiler. You can add
+additional language packs when installing Visual Studio.
+If you have already installed Visual Studio without the US English
+language pack, you can modify the installation to add this. You can
+either do this via a GUI like this:
+
+Click on "Visual Studio Installer" in Start menu.
+Click "Modify".
+Select the tab "Language packs".
+Choose "English".
+Click "Modify".
+
+or you can run it on the command line. For this to work, you need to
+start cmd.exe
using "Run as Administrator". Then execute
+the following line: (note that the " characters are essential)
+"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --channelId VisualStudio.16.Release --productId Microsoft.VisualStudio.Product.BuildTools --addProductLang en-us -p
+VisualStudio.16.Release
represent VS 2019, so adjust the
+version number accordingly. If you have not installed the
+BuildTools
, but e.g. Professional
, adjust the
+product ID accordingly.
IBM XL C/C++
Please consult the AIX section of the Supported
@@ -653,7 +698,7 @@ Boot JDK Requirements
locations on most platforms, this heuristics has a high likelihood to
fail. 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.
-Getting JDK binaries
+Getting JDK Binaries
An overview of common ways to download and install prebuilt JDK
binaries can be found on https://openjdk.org/install. An alternative is
to download the macOS
or the specified identity is valid. If hardened isn't possible, then
debug
signing is chosen if it works. If nothing works, the
codesign build step is disabled.
-Cross-compiling
+Cross-Compiling
Cross-compiling means using one platform (the build
platform) to generate output that can ran on another platform (the
target platform).
@@ -1354,7 +1399,7 @@ Verifying the Build
contain the newly built JDK, for your target system.
Copy these folders to your target system. Then you can run
e.g. images/jdk/bin/java -version
.
-Cross compiling the easy way
+Cross-Compiling the Easy Way
Setting up a proper cross-compilation environment can be a lot of
work. Fortunately there are ways that more or less automate this
process. Here are two recommended methods, using the "devkits" that can
@@ -1364,7 +1409,7 @@
Cross compiling the easy way
solution only work for gcc.
The devkit method is regularly used for testing by Oracle, and the
debootstrap method is regularly used in GitHub Actions testing.
-Using OpenJDK devkits
+Using OpenJDK Devkits
The JDK build system provides out-of-the box support for creating and
using so called devkits. A devkit
is basically a collection
of a cross-compiling toolchain and a sysroot environment which can
@@ -1615,8 +1660,8 @@
Using Debian debootstrap
-Considerations for specific
-targets
+Considerations for Specific
+Targets
Building for ARM32
A common cross-compilation target is the ARM CPU. When building for
ARM, it is recommended to set the ABI profile. A number of pre-defined
@@ -1727,7 +1772,7 @@
circumstances, it can actually slow things down.
You can experiment by disabling pre-compiled headers using
--disable-precompiled-headers
.
-Icecc / icecream
+Icecc / Icecream
icecc/icecream is a
simple way to setup a distributed compiler network. If you have multiple
machines available for building the JDK, you can drastically cut
@@ -1735,7 +1780,7 @@
Icecc / icecream
To use, setup an icecc network, and install icecc on the build
machine. Then run configure
using
--enable-icecc
.
-Using the javac server
+Using the javac Server
To speed up compilation of Java code, especially during incremental
compilations, the javac server is automatically enabled in the
configuration step by default. To explicitly enable or disable the javac
@@ -2411,7 +2456,7 @@
Contributing to the JDK
your contribution.
The official place to start is the OpenJDK Developers’ Guide .
-Editing this document
+Editing This Document
If you want to contribute changes to this document, edit
doc/building.md
and then run
make update-build-docs
to generate the same changes in
diff --git a/doc/building.md b/doc/building.md
index 704c747d18dcb..611cfe15915c8 100644
--- a/doc/building.md
+++ b/doc/building.md
@@ -52,8 +52,8 @@ repositories. Commonly used repositories are:
in development): https://git.openjdk.org/jdk
* The [JDK Updates Project](https://openjdk.org/projects/jdk-updates/), which
- has one repository per update release, e.g. https://git.openjdk.org/jdk17u for
- JDK 17.
+ has one repository per update release, e.g. https://git.openjdk.org/jdk17u
+ for JDK 17.
If you want to build an older version, e.g. JDK 17, it is strongly recommended
that you use the JDK Updates repository, e.g. the `jdk17u`, which contains
@@ -61,57 +61,57 @@ incremental updates, instead of the JDK Project repository `jdk17`, which was
frozen at JDK 17 GA.
If you are new to Git, a good place to start is the book [Pro
-Git](https://git-scm.com/book/en/v2). The rest of this document
-assumes a working knowledge of Git.
+Git](https://git-scm.com/book/en/v2). The rest of this document assumes a
+working knowledge of Git.
### 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
+* 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.
+ 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.
+* 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, if using [Cygwin](#cygwin), extra care must be taken to make sure
the environment is consistent. It is recommended that you follow this
procedure:
- * Create the directory that is going to contain the top directory of the
- JDK 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.
+ * Create the directory that is going to contain the top directory of the JDK
+ 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 JDK 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.
+ * Do not put the JDK 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.
- * You need to install a git client. You have two choices, Cygwin git or
- Git for Windows. Unfortunately there are pros and cons with each choice.
+ * You need to install a git client. You have two choices, Cygwin git or Git
+ for Windows. Unfortunately there are pros and cons with each choice.
- * The Cygwin `git` client has no line ending issues and understands
- Cygwin paths (which are used throughout the JDK build system).
- However, it does not currently work well with the Skara CLI tooling.
- Please see the [Skara wiki on Git clients](
- https://wiki.openjdk.org/display/SKARA/Skara#Skara-Git) for
- up-to-date information about the Skara git client support.
+ * The Cygwin `git` client has no line ending issues and understands Cygwin
+ paths (which are used throughout the JDK build system). However, it does
+ not currently work well with the Skara CLI tooling. Please see the [Skara
+ wiki on Git clients](
+ https://wiki.openjdk.org/display/SKARA/Skara#Skara-Git) for up-to-date
+ information about the Skara git client support.
- * The [Git for Windows](https://gitforwindows.org) client has issues
- with line endings, and do not understand Cygwin paths. It does work
- well with the Skara CLI tooling, however. To alleviate the line ending
- problems, make sure you set `core.autocrlf` to `false` (this is asked
- during installation).
+ * The [Git for Windows](https://gitforwindows.org) client has issues with
+ line endings, and do not understand Cygwin paths. It does work well with
+ the Skara CLI tooling, however. To alleviate the line ending problems,
+ make sure you set `core.autocrlf` to `false` (this is asked during
+ installation).
Failure to follow this procedure might result in hard-to-debug build
problems.
@@ -134,35 +134,35 @@ space is required.
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`.
-Note: The Windows 32-bit x86 port is deprecated and may be removed in a future release.
+Note: The Windows 32-bit x86 port is deprecated and may be removed in a future
+release.
### Building on aarch64
-At a minimum, a machine with 8 cores is advisable, as well as 8 GB of RAM.
-(The more cores to use, the more memory you need.) At least 6 GB of free disk
-space is required.
+At a minimum, a machine with 8 cores is advisable, as well as 8 GB of RAM. (The
+more cores to use, the more memory you need.) At least 6 GB of free disk space
+is required.
If you do not have access to sufficiently powerful hardware, it is also
possible to use [cross-compiling](#cross-compiling).
#### Branch Protection
-In order to use Branch Protection features in the VM, `--enable-branch-protection`
-must be used. This option requires C++ compiler support (GCC 9.1.0+ or Clang
-10+). The resulting build can be run on both machines with and without support
-for branch protection in hardware. Branch Protection is only supported for
-Linux targets.
+In order to use Branch Protection features in the VM,
+`--enable-branch-protection` must be used. This option requires C++ compiler
+support (GCC 9.1.0+ or Clang 10+). The resulting build can be run on both
+machines with and without support for branch protection in hardware. Branch
+Protection is only supported for Linux targets.
-### Building on 32-bit arm
+### Building on 32-bit ARM
This is not recommended. Instead, see the section on [Cross-compiling](
#cross-compiling).
## Operating System Requirements
-The mainline JDK project supports Linux, macOS, AIX and Windows.
-Support for other operating system, e.g. BSD, exists in separate "port"
-projects.
+The mainline JDK project supports Linux, macOS, AIX and Windows. Support for
+other operating system, e.g. BSD, exists in separate "port" projects.
In general, the JDK 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
@@ -184,32 +184,58 @@ Oracle, where header files and external libraries from an older version are
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.org/display/Build/Supported+Build+Platforms). From
-time to time, this is updated by contributors to list successes or failures of
-building on different platforms.
+https://wiki.openjdk.org/display/Build/Supported+Build+Platforms). From time to
+time, this is updated by contributors 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 the JDK.
+build the JDK. (Note: The Windows 32-bit x86 port is deprecated and may be
+removed in a future release.)
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 the JDK, and as such, requires
some extra care. A POSIX support layer is required to build on Windows.
-Currently, the supported such layers are Cygwin, MSYS2 and Windows Subsystem for
-Linux (WSL). Of these, Cygwin is the one that has received the most real-world
-testing and is likely to cause least trouble.
+Currently, the supported such layers are Cygwin, MSYS2 and Windows Subsystem
+for Linux (WSL). Of these, Cygwin is the one that has received the most
+real-world testing and is likely to cause least trouble.
Internally in the build system, all paths are represented as Unix-style paths,
e.g. `/cygdrive/c/git/jdk/Makefile` rather than `C:\git\jdk\Makefile`. This
rule also applies to input to the build system, e.g. in arguments to
`configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than
-`--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
-on [Fixpath](#fixpath).
-
-Note: The Windows 32-bit x86 port is deprecated and may be removed in a future release.
+`--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the
+section on [Fixpath](#fixpath).
+
+#### Locale Requirements
+
+Building and testing the JDK requires a well-defined locale to be guaranteed to
+run correctly. On non-Windows operating systems, this is achieved using the
+`LC_*` variables, which propagate to all child processes of the build.
+Unfortunately, there is no way to set the locale for a specific process like
+this in Windows. Instead, changes to locale can only be made globally, which
+will affect all applications run by the user. Furthermore, Windows makes a
+difference between user locale and system locale, where the latter determines
+e.g. the file path encoding. Both this locale settings affect building and
+testing the JDK.
+
+The **recommended** and **supported** way of building the JDK on Windows is to
+set both the system locale and the user locale to **US English**. The system
+setting can be changed by going to the Control Panel, choosing "Regional
+Settings" -> "Administrative" and then pressing on the "Change System Locale"
+button.
+
+Since this is annoying for users who prefer another locale, we strive to get
+the building and testing to work on other locales as well. This is on a "best
+effort" level, so beware! You might get odd results in both building and
+testing. If you do, remember that locales other than US English are not
+supported nor recommended.
+
+It is also imperative to install the US English language pack in Visual Studio.
+For details, see [Microsoft Visual Studio](#microsoft-visual-studio).
#### Cygwin
@@ -280,17 +306,17 @@ later, and you will need to install an Ubuntu guest.
It is possible to build both Windows and Linux binaries from WSL. To build
Windows binaries, you must use a Windows boot JDK (located in a
Windows-accessible directory). To build Linux binaries, you must use a Linux
-boot JDK. The default behavior is to build for Windows. To build for Linux, pass
-`--build=x86_64-unknown-linux-gnu --openjdk-target=x86_64-unknown-linux-gnu`
-to `configure`.
+boot JDK. The default behavior is to build for Windows. To build for Linux,
+pass `--build=x86_64-unknown-linux-gnu
+--openjdk-target=x86_64-unknown-linux-gnu` to `configure`.
If building Windows binaries, the source code must be located in a Windows-
-accessible directory. This is because Windows executables (such as Visual Studio
-and the boot JDK) must be able to access the source code. Also, the drive where
-the source is stored must be mounted as case-insensitive by changing either
-/etc/fstab or /etc/wsl.conf in WSL. Individual directories may be corrected
-using the fsutil tool in case the source was cloned before changing the mount
-options.
+accessible directory. This is because Windows executables (such as Visual
+Studio and the boot JDK) must be able to access the source code. Also, the
+drive where the source is stored must be mounted as case-insensitive by
+changing either /etc/fstab or /etc/wsl.conf in WSL. Individual directories may
+be corrected using the fsutil tool in case the source was cloned before
+changing the mount options.
Note that while it's possible to build on WSL, testing is still not fully
supported.
@@ -299,12 +325,12 @@ supported.
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 such as the JDK 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.
+difficult for a project such as the JDK 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 macOS 13 (Ventura) and Xcode
-14, but earlier versions may also work.
+It is recommended that you use at least macOS 13 (Ventura) and Xcode 14, but
+earlier versions may also work.
The standard macOS environment contains the basic tooling needed to build, but
for external libraries a package manager is recommended. The JDK uses
@@ -342,8 +368,8 @@ sudo apk add build-base bash grep zip
### AIX
Please consult the AIX section of the [Supported Build Platforms](
-https://wiki.openjdk.org/display/Build/Supported+Build+Platforms) OpenJDK
-Build Wiki page for details about which versions of AIX are supported.
+https://wiki.openjdk.org/display/Build/Supported+Build+Platforms) OpenJDK Build
+Wiki page for details about which versions of AIX are supported.
## Native Compiler (Toolchain) Requirements
@@ -377,8 +403,8 @@ C, and C++14 for C++.
### gcc
-The minimum accepted version of gcc is 6.0. Older versions will not be
-accepted by `configure`.
+The minimum accepted version of gcc is 6.0. Older versions will not be accepted
+by `configure`.
The JDK is currently known to compile successfully with gcc version 13.2 or
newer.
@@ -396,21 +422,24 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
The oldest supported version of Xcode is 8.
-You will need the Xcode command line developer tools to be able to build
-the JDK. (Actually, *only* the command line tools are needed, not the IDE.)
-The simplest way to install these is to run:
+You will need the Xcode command line developer tools to be able to build the
+JDK. (Actually, *only* the command line tools are needed, not the IDE.) The
+simplest way to install these is to run:
```
xcode-select --install
```
-When updating Xcode, it is advisable to keep an older version for building the JDK.
-To use a specific version of Xcode you have multiple options:
+When updating Xcode, it is advisable to keep an older version for building the
+JDK. To use a specific version of Xcode you have multiple options:
-* Use `xcode-select -s` before running `configure`, e.g. `xcode-select -s /Applications/Xcode13.1.app`. The drawback is that the setting
- is system wide and you may have to revert it after a JDK build.
-* Use configure option `--with-xcode-path`, e.g. `configure --with-xcode-path=/Applications/Xcode13.1.app`
- This allows using a specific Xcode version for a JDK build, independently of the active Xcode version by `xcode-select`.
+* Use `xcode-select -s` before running `configure`, e.g.
+`xcode-select -s /Applications/Xcode13.1.app`. The drawback is that the setting
+is system wide and you may have to revert it after a JDK build.
+* Use configure option `--with-xcode-path`, e.g.
+`configure --with-xcode-path=/Applications/Xcode13.1.app` This allows using a
+specific Xcode version for a JDK build, independently of the active Xcode
+version by `xcode-select`.
If you have recently (inadvertently) updated your OS and/or Xcode version, and
the JDK can no longer be built, please see the section on [Problems with the
@@ -420,10 +449,10 @@ available for this update.
### Microsoft Visual Studio
-The minimum accepted version is Visual Studio 2019 version 16.8. (Note that this
-version is often presented as "MSVC 14.28", and reported by cl.exe as 19.28.)
-Older versions will not be accepted by `configure` and will not work. The
-maximum accepted version of Visual Studio is 2022.
+The minimum accepted version is Visual Studio 2019 version 16.8. (Note that
+this version is often presented as "MSVC 14.28", and reported by cl.exe as
+19.28.) Older versions will not be accepted by `configure` and will not work.
+The maximum accepted version of Visual Studio is 2022.
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
@@ -432,30 +461,56 @@ setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2022`.
If you have Visual Studio installed but `configure` fails to detect it, it may
be because of [spaces in path](#spaces-in-path).
+You must install the US English locale, otherwise the build system might not be
+able to interact properly with the compiler. You can add additional language
+packs when installing Visual Studio.
+
+If you have already installed Visual Studio without the US English language
+pack, you can modify the installation to add this. You can either do this via a
+GUI like this:
+
+* Click on "Visual Studio Installer" in Start menu.
+* Click "Modify".
+* Select the tab "Language packs".
+* Choose "English".
+* Click "Modify".
+
+or you can run it on the command line. For this to work, you need to start
+`cmd.exe` using "Run as Administrator". Then execute the following line: (note
+that the " characters are essential)
+
+```
+"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --channelId VisualStudio.16.Release --productId Microsoft.VisualStudio.Product.BuildTools --addProductLang en-us -p
+```
+
+`VisualStudio.16.Release` represent VS 2019, so adjust the version number
+accordingly. If you have not installed the `BuildTools`, but e.g.
+`Professional`, adjust the product ID accordingly.
+
### IBM XL C/C++
Please consult the AIX section of the [Supported Build Platforms](
-https://wiki.openjdk.org/display/Build/Supported+Build+Platforms) OpenJDK
-Build Wiki page for details about which versions of XLC are supported.
+https://wiki.openjdk.org/display/Build/Supported+Build+Platforms) OpenJDK Build
+Wiki page for details about which versions of XLC are supported.
## Boot JDK Requirements
Paradoxically, building the JDK requires a pre-existing JDK. This is called the
-"boot JDK". The boot JDK does not, however, have to be a JDK built directly from
-the source code available in the OpenJDK Community. If you are porting the JDK
-to a new platform, chances are that there already exists another JDK for that
-platform that is usable as boot JDK.
+"boot JDK". The boot JDK does not, however, have to be a JDK built directly
+from the source code available in the OpenJDK Community. If you are porting the
+JDK 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 a JDK of major version *N-1*, so for building JDK 18 a JDK 17 would be
-suitable as boot JDK. However, the JDK should be able to "build itself", so an
-up-to-date build of the current JDK source is an acceptable alternative. If
+should be a JDK of major version *N-1*, so for building JDK 18 a JDK 17 would
+be suitable as boot JDK. However, the JDK should be able to "build itself", so
+an up-to-date build of the current JDK source is an acceptable alternative. If
you are following the *N-1* rule, make sure you've got the latest update
version, since e.g. JDK 8 GA might not be able to build JDK 9 on all platforms.
Early in the release cycle, version *N-1* may not yet have been released. In
-that case, the preferred boot JDK will be version *N-2* until version *N-1*
-is available.
+that case, the preferred boot JDK will be version *N-2* until version *N-1* is
+available.
The `configure` scripts tries to locate a suitable boot JDK automatically, but
due to the lack of standard installation locations on most platforms, this
@@ -463,11 +518,11 @@ heuristics has a high likelihood to fail. 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.
-### Getting JDK binaries
+### Getting JDK Binaries
-An overview of common ways to download and install prebuilt JDK binaries
-can be found on https://openjdk.org/install. An alternative is to download the
-[Oracle JDK](https://www.oracle.com/java/technologies/downloads). Another is
+An overview of common ways to download and install prebuilt JDK binaries can be
+found on https://openjdk.org/install. An alternative is to download the [Oracle
+JDK](https://www.oracle.com/java/technologies/downloads). Another is
[Adoptium](https://adoptium.net/), which publishes prebuilt binaries for
various platforms.
@@ -493,10 +548,10 @@ include directory and the lib directory separately.
### FreeType
-FreeType2 from [The FreeType Project](https://www.freetype.org/) is not required
-on any platform. The exception is on Unix-based platforms when configuring such
-that the build artifacts will reference a system installed library,
-rather than bundling the JDK's own copy.
+FreeType2 from [The FreeType Project](https://www.freetype.org/) is not
+required on any platform. The exception is on Unix-based platforms when
+configuring such that the build artifacts will reference a system installed
+library, rather than bundling the JDK's own copy.
* To install on an apt-based Linux, try running `sudo apt-get install
libfreetype6-dev`.
@@ -505,21 +560,21 @@ freetype-devel`.
* To install on Alpine Linux, try running `sudo apk add freetype-dev`.
* To install on macOS, try running `brew install freetype`.
-Use `--with-freetype-include=` and `--with-freetype-lib=`
-if `configure` does not automatically locate the platform FreeType files.
+Use `--with-freetype-include=` and `--with-freetype-lib=` if
+`configure` does not automatically locate the platform FreeType files.
### Fontconfig
-Fontconfig from [freedesktop.org Fontconfig](https://fontconfig.org) is required
-on all platforms except Windows and macOS.
+Fontconfig from [freedesktop.org Fontconfig](https://fontconfig.org) is
+required on all platforms except Windows and macOS.
* To install on an apt-based Linux, try running `sudo apt-get install
libfontconfig-dev`.
* To install on an rpm-based Linux, try running `sudo yum install
fontconfig-devel`.
-Use `--with-fontconfig-include=` and `--with-fontconfig=`
-if `configure` does not automatically locate the platform Fontconfig files.
+Use `--with-fontconfig-include=` and `--with-fontconfig=` if
+`configure` does not automatically locate the platform Fontconfig files.
### CUPS
@@ -529,8 +584,7 @@ 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 an rpm-based Linux, try running `sudo yum install cups-devel`.
* To install on Alpine Linux, try running `sudo apk add cups-dev`.
Use `--with-cups=` if `configure` does not properly locate your CUPS
@@ -543,10 +597,10 @@ Linux.
* To install on an apt-based Linux, try running `sudo apt-get install
libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev`.
-* To install on an rpm-based Linux, try running `sudo yum install
-libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel`.
-* To install on Alpine Linux, try running `sudo apk add libx11-dev
-libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev`.
+* To install on an rpm-based Linux, try running `sudo yum install libXtst-devel
+libXt-devel libXrender-devel libXrandr-devel libXi-devel`.
+* To install on Alpine Linux, try running `sudo apk add libx11-dev libxext-dev
+libxrender-dev libxrandr-dev libxtst-dev libxt-dev`.
Use `--with-x=` if `configure` does not properly locate your X11 files.
@@ -588,12 +642,11 @@ platforms. At least version 2.69 is required.
* To install on an apt-based Linux, try running `sudo apt-get install
autoconf`.
-* To install on an rpm-based Linux, try running `sudo yum install
-autoconf`.
+* To install on an rpm-based Linux, try running `sudo yum install autoconf`.
* To install on Alpine Linux, try running `sudo apk add autoconf`.
* To install on macOS, try running `brew install autoconf`.
-* To install on Windows, try running `/setup-x86_64 -q
--P autoconf`.
+* To install on Windows, try running `/setup-x86_64 -q -P
+autoconf`.
If `configure` has problems locating your installation of autoconf, you can
specify it using the `AUTOCONF` environment variable, like this:
@@ -690,42 +743,42 @@ features, use `bash configure --help=short` instead.)
* `--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.
+ `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.
+ `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`, `custom`. Note that not all
- variants are possible to combine in a single build.
+ (or variants) of Hotspot. Valid variants are: `server`, `client`, `minimal`,
+ `core`, `zero`, `custom`. Note that not all variants are possible to combine
+ in a single build.
* `--enable-jvm-feature-` or `--disable-jvm-feature-` -
Include (or exclude) `` as a JVM feature in Hotspot. You can also
specify a list of features to be enabled, separated by space or comma, as
`--with-jvm-features=[,...]`. If you prefix ``
with a `-`, it will be disabled. These options will modify the default list
of features for the JVM variant(s) you are building. For the `custom` JVM
- variant, the default list is empty. A complete list of valid 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
+ variant, the default list is empty. A complete list of valid 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.)
On Linux, BSD and AIX, it is possible to override where Java by default
searches for runtime/JNI libraries. This can be useful in situations where
-there is a special shared directory for system JNI libraries. This setting
-can in turn be overridden at runtime by setting the `java.library.path` property.
+there is a special shared directory for system JNI libraries. This setting can
+in turn be overridden at runtime by setting the `java.library.path` property.
-* `--with-jni-libpath=` - Use the specified path as a default
-when searching for runtime libraries.
+* `--with-jni-libpath=` - Use the specified path as a default when
+searching for runtime libraries.
#### Configure Arguments for Native Compilation
@@ -735,8 +788,7 @@ when searching for runtime libraries.
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-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
@@ -755,13 +807,12 @@ when searching for runtime libraries.
#running-tests)
Certain third-party libraries used by the JDK (libjpeg, giflib, libpng, lcms
-and zlib) are included in the JDK repository. The default behavior of the
-JDK build is to use the included ("bundled") versions of libjpeg, giflib,
-libpng and lcms.
-For zlib, the system lib (if present) is used except on Windows and AIX.
-However the bundled libraries may be replaced by an external version.
-To do so, specify `system` as the `` option in these arguments.
-(The default is `bundled`).
+and zlib) are included in the JDK repository. The default behavior of the JDK
+build is to use the included ("bundled") versions of libjpeg, giflib, libpng
+and lcms. For zlib, the system lib (if present) is used except on Windows and
+AIX. However the bundled libraries may 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
@@ -788,9 +839,9 @@ 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 overridden 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
+that are supposed to be overridden 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`.
@@ -845,15 +896,14 @@ patterns. A phase can be either of `gensrc`, `gendata`, `copy`, `java`,
* `` - 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
+* `-` - 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 build phase
* `clean-` - Remove all build results related to a certain module
* `clean--` - Remove all build results related to a certain
module and phase
@@ -868,15 +918,15 @@ 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 overridden on the command line. These make up the "make time"
-configuration, as opposed to the "configure time" configuration.
+are supposed to be overridden 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)
+* `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)
@@ -907,27 +957,28 @@ Suggestions for Advanced Users](#hints-and-suggestions-for-advanced-users) and
## Running Tests
-Most of the JDK tests are using the [JTReg](https://openjdk.org/jtreg)
-test framework. Make sure that your configuration knows where to find your
+Most of the JDK tests are using the [JTReg](https://openjdk.org/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.
-The [Adoption Group](https://wiki.openjdk.org/display/Adoption) provides
-recent builds of jtreg [here](
+The [Adoption Group](https://wiki.openjdk.org/display/Adoption) provides recent
+builds of jtreg [here](
https://ci.adoptium.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
`jtreg` directory that you just unpacked.
-Building of Hotspot Gtest suite requires the source code of Google
-Test framework. The top directory, which contains both `googletest`
-and `googlemock` directories, should be specified via `--with-gtest`.
-The minimum supported version of Google Test is 1.14.0, whose source
-code can be obtained:
+Building of Hotspot Gtest suite requires the source code of Google Test
+framework. The top directory, which contains both `googletest` and `googlemock`
+directories, should be specified via `--with-gtest`. The minimum supported
+version of Google Test is 1.14.0, whose source code can be obtained:
-* by downloading and unpacking the source bundle from [here](https://github.com/google/googletest/releases/tag/v1.14.0), or
-* by checking out `v1.14.0` tag of `googletest` project: `git clone -b v1.14.0 https://github.com/google/googletest`
+* by downloading and unpacking the source bundle from
+ [here](https://github.com/google/googletest/releases/tag/v1.14.0), or
+* by checking out `v1.14.0` tag of `googletest` project:
+ `git clone -b v1.14.0 https://github.com/google/googletest`
To execute the most basic tests (tier 1), use:
@@ -945,26 +996,27 @@ For more details on how to run tests, please see **Testing the JDK**
Modern versions of macOS require applications to be signed and notarized before
distribution. See Apple's documentation for more background on what this means
and how it works. To help support this, the JDK build can be configured to
-automatically sign all native binaries, and the JDK bundle, with all the options
-needed for successful notarization, as well as all the entitlements required by
-the JDK. To enable `hardened` signing, use configure parameter
-`--with-macosx-codesign=hardened` and configure the signing identity you wish to
-use with `--with-macosx-codesign-identity=`. The identity refers to a
-signing identity from Apple that needs to be preinstalled on the build host.
+automatically sign all native binaries, and the JDK bundle, with all the
+options needed for successful notarization, as well as all the entitlements
+required by the JDK. To enable `hardened` signing, use configure parameter
+`--with-macosx-codesign=hardened` and configure the signing identity you wish
+to use with `--with-macosx-codesign-identity=`. The identity refers
+to a signing identity from Apple that needs to be preinstalled on the build
+host.
When not signing for distribution with the hardened option, the JDK build will
still attempt to perform `adhoc` signing to add the special entitlement
-`com.apple.security.get-task-allow` to each binary. This entitlement is required
-to be able to dump core files from a process. Note that adding this entitlement
-makes the build invalid for notarization, so it is only added when signing in
-`debug` mode. To explicitly enable this kind of ad hoc signing, use configure
-parameter `--with-macosx-codesign=debug`. It will be enabled by default in most
-cases.
+`com.apple.security.get-task-allow` to each binary. This entitlement is
+required to be able to dump core files from a process. Note that adding this
+entitlement makes the build invalid for notarization, so it is only added when
+signing in `debug` mode. To explicitly enable this kind of ad hoc signing, use
+configure parameter `--with-macosx-codesign=debug`. It will be enabled by
+default in most cases.
It's also possible to completely disable any explicit codesign operations done
-by the JDK build using the configure parameter `--without-macosx-codesign`.
-The exact behavior then depends on the architecture. For macOS on x64, it (at
-least at the time of this writing) results in completely unsigned binaries that
+by the JDK build using the configure parameter `--without-macosx-codesign`. The
+exact behavior then depends on the architecture. For macOS on x64, it (at least
+at the time of this writing) results in completely unsigned binaries that
should still work fine for development and debugging purposes. On aarch64, the
Xcode linker will apply a default "ad hoc" signing, without any entitlements.
Such a build does not allow dumping core files.
@@ -974,7 +1026,7 @@ The default mode "auto" will try for `hardened` signing if the debug level is
If hardened isn't possible, then `debug` signing is chosen if it works. If
nothing works, the codesign build step is disabled.
-## Cross-compiling
+## Cross-Compiling
Cross-compiling means using one platform (the *build* platform) to generate
output that can ran on another platform (the *target* platform).
@@ -1012,10 +1064,9 @@ 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 `--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.)
+This will automatically set the `--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.)
If `--build` has not been explicitly passed to configure, `--openjdk-target`
will autodetect the build platform and internally set the flag automatically,
@@ -1071,8 +1122,8 @@ present on the *build* machine while building.
Take care not to replace the *build* system's version of these libraries by
mistake, as that can render the *build* machine unusable.
-Make sure that the libraries you point to (ALSA, X11, etc) are for the
-*target* platform, not the *build* platform.
+Make sure that the libraries you point to (ALSA, X11, etc) are for the *target*
+platform, not the *build* platform.
#### ALSA
@@ -1148,8 +1199,8 @@ Note that X11 is needed even if you only want to build a headless JDK.
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`.
+* If the X11 libraries are not properly detected by `configure`, you can point
+ them out by `--with-x`.
### Verifying the Build
@@ -1162,7 +1213,7 @@ built JDK, for your *target* system.
Copy these folders to your *target* system. Then you can run e.g.
`images/jdk/bin/java -version`.
-### Cross compiling the easy way
+### Cross-Compiling the Easy Way
Setting up a proper cross-compilation environment can be a lot of work.
Fortunately there are ways that more or less automate this process. Here are
@@ -1174,13 +1225,13 @@ solution only work for gcc.
The devkit method is regularly used for testing by Oracle, and the debootstrap
method is regularly used in GitHub Actions testing.
-#### Using OpenJDK devkits
+#### Using OpenJDK Devkits
-The JDK build system provides out-of-the box support for creating and using
-so called devkits. A `devkit` is basically a collection of a cross-compiling
+The JDK build system provides out-of-the box support for creating and using so
+called devkits. A `devkit` is basically a collection of a cross-compiling
toolchain and a sysroot environment which can easily be used together with the
-`--with-devkit` configure option to cross compile the JDK. On Linux/x86_64,
-the following command:
+`--with-devkit` configure option to cross compile the JDK. On Linux/x86_64, the
+following command:
```
bash configure --with-devkit= --openjdk-target=ppc64-linux-gnu && make
@@ -1195,11 +1246,11 @@ Devkits can be created from the `make/devkit` directory by executing:
make [ TARGETS="+" ] [ BASE_OS= ] [ BASE_OS_VERSION= ]
```
-where `TARGETS` contains one or more `TARGET_TRIPLET`s of the form
-described in [section 3.4 of the GNU Autobook](
-https://sourceware.org/autobook/autobook/autobook_17.html). If no
-targets are given, a native toolchain for the current platform will be
-created. Currently, at least the following targets are known to work:
+where `TARGETS` contains one or more `TARGET_TRIPLET`s of the form described in
+[section 3.4 of the GNU Autobook](
+https://sourceware.org/autobook/autobook/autobook_17.html). If no targets are
+given, a native toolchain for the current platform will be created. Currently,
+at least the following targets are known to work:
| Supported devkit targets |
| ------------------------ |
@@ -1210,12 +1261,12 @@ created. Currently, at least the following targets are known to work:
| ppc64le-linux-gnu |
| s390x-linux-gnu |
-`BASE_OS` must be one of "OEL6" for Oracle Enterprise Linux 6 or
-"Fedora" (if not specified "OEL6" will be the default). If the base OS
-is "Fedora" the corresponding Fedora release can be specified with the
-help of the `BASE_OS_VERSION` option (with "27" as default version).
-If the build is successful, the new devkits can be found in the
-`build/devkit/result` subdirectory:
+`BASE_OS` must be one of "OEL6" for Oracle Enterprise Linux 6 or "Fedora" (if
+not specified "OEL6" will be the default). If the base OS is "Fedora" the
+corresponding Fedora release can be specified with the help of the
+`BASE_OS_VERSION` option (with "27" as default version). If the build is
+successful, the new devkits can be found in the `build/devkit/result`
+subdirectory:
```
cd make/devkit
@@ -1226,14 +1277,13 @@ x86_64-linux-gnu-to-ppc64le-linux-gnu
```
Notice that devkits are not only useful for targeting different build
-platforms. Because they contain the full build dependencies for a
-system (i.e. compiler and root file system), they can easily be used
-to build well-known, reliable and reproducible build environments. You
-can for example create and use a devkit with GCC 7.3 and a Fedora 12
-sysroot environment (with glibc 2.11) on Ubuntu 14.04 (which doesn't
-have GCC 7.3 by default) to produce JDK binaries which will run on
-all Linux systems with runtime libraries newer than the ones from
-Fedora 12 (e.g. Ubuntu 16.04, SLES 11 or RHEL 6).
+platforms. Because they contain the full build dependencies for a system (i.e.
+compiler and root file system), they can easily be used to build well-known,
+reliable and reproducible build environments. You can for example create and
+use a devkit with GCC 7.3 and a Fedora 12 sysroot environment (with glibc 2.11)
+on Ubuntu 14.04 (which doesn't have GCC 7.3 by default) to produce JDK binaries
+which will run on all Linux systems with runtime libraries newer than the ones
+from Fedora 12 (e.g. Ubuntu 16.04, SLES 11 or RHEL 6).
#### Using Debian debootstrap
@@ -1285,7 +1335,8 @@ For example, cross-compiling to AArch64 from x86_64 could be done like this:
Note that `symlinks` is in the universe repository.
-* Make sure the symlinks inside the newly created chroot point to proper locations:
+* Make sure the symlinks inside the newly created chroot point to proper
+ locations:
```
sudo chroot ~/sysroot-arm64 symlinks -cr .
@@ -1301,19 +1352,22 @@ For example, cross-compiling to AArch64 from x86_64 could be done like this:
ls build/linux-aarch64-server-release/
```
-The build does not create new files in that chroot, so it can be reused for multiple builds
-without additional cleanup.
+The build does not create new files in that chroot, so it can be reused for
+multiple builds without additional cleanup.
-The build system should automatically detect the toolchain paths and dependencies, but sometimes
-it might require a little nudge with:
+The build system should automatically detect the toolchain paths and
+dependencies, but sometimes it might require a little nudge with:
* Native compilers: override `CC` or `CXX` for `./configure`
-* Freetype lib location: override `--with-freetype-lib`, for example `${sysroot}/usr/lib/${target}/`
+* Freetype lib location: override `--with-freetype-lib`, for example
+ `${sysroot}/usr/lib/${target}/`
-* Freetype includes location: override `--with-freetype-include` for example `${sysroot}/usr/include/freetype2/`
+* Freetype includes location: override `--with-freetype-include` for example
+ `${sysroot}/usr/include/freetype2/`
-* X11 libraries location: override `--x-libraries`, for example `${sysroot}/usr/lib/${target}/`
+* X11 libraries location: override `--x-libraries`, for example
+ `${sysroot}/usr/lib/${target}/`
Architectures that are known to successfully cross-compile like this are:
@@ -1334,23 +1388,23 @@ Architectures that are known to successfully cross-compile like this are:
| sh4 | sid | sh4 | sh4-linux-gnu | zero |
| riscv64 | sid | riscv64 | riscv64-linux-gnu | (all) |
-### Considerations for specific targets
+### Considerations for Specific Targets
#### Building for ARM32
A common cross-compilation target is the ARM CPU. When building for ARM, it is
recommended 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` and `armv6-vfp-hflt`. Note that soft-float ABIs are
-no longer properly supported by the JDK.
+`arm-sflt`, `armv5-vfp-sflt` and `armv6-vfp-hflt`. Note that soft-float ABIs
+are no longer properly supported by the JDK.
#### Building for RISC-V
-The RISC-V community provides a basic
-[GNU compiler toolchain](https://github.com/riscv-collab/riscv-gnu-toolchain),
-but the [external libraries](#external-library-requirements) required by the JDK
-complicate the building process. The placeholder ``
-shown below is the path where you want to install the toolchain.
+The RISC-V community provides a basic [GNU compiler toolchain](
+https://github.com/riscv-collab/riscv-gnu-toolchain), but the [external
+libraries](#external-library-requirements) required by the JDK complicate the
+building process. The placeholder `` shown below is
+the path where you want to install the toolchain.
* Install the RISC-V GNU compiler toolchain:
@@ -1388,8 +1442,8 @@ shown below is the path where you want to install the toolchain.
#### Building for musl
Just like it's possible to cross-compile for a different CPU, it's possible to
-cross-compile for `musl` libc on a glibc-based *build* system.
-A devkit suitable for most target CPU architectures can be obtained from
+cross-compile for `musl` libc on a glibc-based *build* system. A devkit
+suitable for most target CPU architectures can be obtained from
[musl.cc](https://musl.cc). After installing the required packages in the
sysroot, configure the build with `--openjdk-target`:
@@ -1472,7 +1526,7 @@ things down.
You can experiment by disabling pre-compiled headers using
`--disable-precompiled-headers`.
-### Icecc / icecream
+### Icecc / Icecream
[icecc/icecream](https://github.com/icecc/icecream) is a simple way to setup a
distributed compiler network. If you have multiple machines available for
@@ -1482,7 +1536,7 @@ it.
To use, setup an icecc network, and install icecc on the build machine. Then
run `configure` using `--enable-icecc`.
-### Using the javac server
+### Using the javac Server
To speed up compilation of Java code, especially during incremental
compilations, the javac server is automatically enabled in the configuration
@@ -1700,11 +1754,11 @@ order. Most issues will be solved at step 1 or 2.
4. Re-clone the Git repository
- Sometimes the Git repository 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 repository, and re-clone it.
- If you have local changes, save them first to a different location using
- `git format-patch`.
+ Sometimes the Git repository 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 repository, and re-clone it. If
+ you have local changes, save them first to a different location using `git
+ format-patch`.
### Specific Build Issues
@@ -1742,9 +1796,9 @@ temporarily.
#### Spaces in Path
-On Windows, when configuring, `fixpath.sh` may report that some directory
-names have spaces. Usually, it assumes those directories have
-[short paths](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name).
+On Windows, when configuring, `fixpath.sh` may report that some directory names
+have spaces. Usually, it assumes those directories have [short
+paths](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name).
You can run `fsutil file setshortname` in `cmd` on certain directories, such as
`Microsoft Visual Studio` or `Windows Kits`, to assign arbitrary short paths so
`configure` can access them.
@@ -1753,8 +1807,8 @@ You can run `fsutil file setshortname` in `cmd` on certain directories, such as
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.org](mailto:build-dev@openjdk.org).
-Please include the relevant parts of the configure and/or build log.
+a mail to [build-dev@openjdk.org](mailto:build-dev@openjdk.org). Please include
+the relevant parts of the configure and/or build log.
If you need general help or advice about developing for the JDK, you can also
contact the Adoption Group. See the section on [Contributing to OpenJDK](
@@ -1764,10 +1818,10 @@ contact the Adoption Group. See the section on [Contributing to OpenJDK](
Build reproducibility is the property of getting exactly the same bits out when
building, every time, independent on who builds the product, or where. This is
-for many reasons a harder goal than it initially appears, but it is an important
-goal, for security reasons and others. Please see [Reproducible Builds](
-https://reproducible-builds.org) for more information about the background and
-reasons for reproducible builds.
+for many reasons a harder goal than it initially appears, but it is an
+important goal, for security reasons and others. Please see [Reproducible
+Builds]( https://reproducible-builds.org) for more information about the
+background and reasons for reproducible builds.
Currently, it is not possible to build the JDK fully reproducibly, but getting
there is an ongoing effort.
@@ -1779,14 +1833,14 @@ standard]( https://reproducible-builds.org/docs/source-date-epoch/), that many
tools, such as gcc, recognize, and use in place of the current time when
generating output.
-To generate reproducible builds, you must set `SOURCE_DATE_EPOCH` before running
-`configure`. The value in `SOURCE_DATE_EPOCH` will be stored in the
+To generate reproducible builds, you must set `SOURCE_DATE_EPOCH` before
+running `configure`. The value in `SOURCE_DATE_EPOCH` will be stored in the
configuration, and used by `make`. Setting `SOURCE_DATE_EPOCH` before running
`make` will have no effect on the build.
-You must also make sure your build does not rely on `configure`'s default ad hoc
-version strings. Default ad hoc version strings `OPT` segment include user name
-and source directory. You can either override just the `OPT` segment using
+You must also make sure your build does not rely on `configure`'s default ad
+hoc version strings. Default ad hoc version strings `OPT` segment include user
+name and source directory. You can either override just the `OPT` segment using
`--with-version-opt=`, or you can specify the entire version
string using `--with-version-string=`.
@@ -1805,21 +1859,21 @@ unless `SOURCE_DATE_EPOCH` is found by in the environment by `configure`), the
source date value will be determined at configure time.
There are several aspects of reproducible builds that can be individually
-adjusted by `configure` arguments. If any of these are given, they will override
-the value derived from `SOURCE_DATE_EPOCH`. These arguments are:
+adjusted by `configure` arguments. If any of these are given, they will
+override the value derived from `SOURCE_DATE_EPOCH`. These arguments are:
* `--with-source-date`
- This option controls how the JDK build sets `SOURCE_DATE_EPOCH` when
- building. It can be set to a value describing a date, either an epoch based
- timestamp as an integer, or a valid ISO-8601 date.
+ This option controls how the JDK build sets `SOURCE_DATE_EPOCH` when building.
+ It can be set to a value describing a date, either an epoch based timestamp as
+ an integer, or a valid ISO-8601 date.
It can also be set to one of the special values `current`, `updated` or
- `version`. `current` means that the time of running `configure` will be
- used. `version` will use the nominal release date for the current JDK
- version. `updated`, which means that `SOURCE_DATE_EPOCH` will be set to the
- current time each time you are running `make`. All choices, except for
- `updated`, will set a fixed value for the source date timestamp.
+ `version`. `current` means that the time of running `configure` will be used.
+ `version` will use the nominal release date for the current JDK version.
+ `updated`, which means that `SOURCE_DATE_EPOCH` will be set to the current
+ time each time you are running `make`. All choices, except for `updated`, will
+ set a fixed value for the source date timestamp.
When `SOURCE_DATE_EPOCH` is set, the default value for `--with-source-date`
will be the value given by `SOURCE_DATE_EPOCH`. Otherwise, the default value
@@ -1828,19 +1882,19 @@ the value derived from `SOURCE_DATE_EPOCH`. These arguments are:
* `--with-hotspot-build-time`
This option controls the build time string that will be included in the
- hotspot library (`libjvm.so` or `jvm.dll`). If the source date is fixed
- (e.g. by setting `SOURCE_DATE_EPOCH`), the default value for
+ hotspot library (`libjvm.so` or `jvm.dll`). If the source date is fixed (e.g.
+ by setting `SOURCE_DATE_EPOCH`), the default value for
`--with-hotspot-build-time` will be an ISO 8601 representation of that time
stamp. Otherwise the default value will be the current time when building
hotspot.
* `--with-copyright-year`
- This option controls the copyright year in some generated text files. When
- the source date is fixed (e.g. by setting `SOURCE_DATE_EPOCH`), the default
- value for `--with-copyright-year` will be the year of that time stamp.
- Otherwise the default is the current year at the time of running configure.
- This can be overridden by `--with-copyright-year=`.
+ This option controls the copyright year in some generated text files. When the
+ source date is fixed (e.g. by setting `SOURCE_DATE_EPOCH`), the default value
+ for `--with-copyright-year` will be the year of that time stamp. Otherwise the
+ default is the current year at the time of running configure. This can be
+ overridden by `--with-copyright-year=`.
* `--enable-reproducible-build`
@@ -1987,10 +2041,10 @@ the largest module in the JDK) could be overcome by using the make control
variable `JDK_FILTER`. This is not needed anymore for performance reasons, but
the functionality is still present.
-To use this, set 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` will limit the compilation
-to files in the `javax.crypto` package.
+To use this, set 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` will limit the compilation to files in
+the `javax.crypto` package.
## Understanding the Build System
@@ -2029,8 +2083,8 @@ 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`.
+* `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`.
@@ -2041,18 +2095,18 @@ This is what they are used for:
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.
+ 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.
+* `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.
+ contain files that are needed by the build system for `configure`, `make` and
+ for running tests.
### Fixpath
@@ -2118,9 +2172,9 @@ 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 JDK 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`.
+The JDK 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.
@@ -2131,8 +2185,8 @@ are `none`, `internal`, `external`, `zipped`.
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.
+* `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
@@ -2201,25 +2255,26 @@ 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.
+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](
-https://openjdk.org/groups/build/doc/code-conventions.html) before
-submitting patches.
+https://openjdk.org/groups/build/doc/code-conventions.html) before submitting
+patches.
## Contributing to the JDK
So, now you've built your JDK, 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.
-However, please bear in mind that the JDK is a massive project, and we must ask
-you to follow our rules and guidelines to be able to accept your contribution.
+First of all: Thank you! We gladly welcome your contribution. However, please
+bear in mind that the JDK 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 [OpenJDK Developers’ Guide](https://openjdk.org/guide/).
+The official place to start is the [OpenJDK Developers’ Guide](
+https://openjdk.org/guide/).
-## Editing this document
+## Editing This Document
If you want to contribute changes to this document, edit `doc/building.md` and
then run `make update-build-docs` to generate the same changes in
diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp
index fde19eb105ee7..2899319f3e8e5 100644
--- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp
@@ -1088,8 +1088,8 @@ class Assembler : public AbstractAssembler {
#undef INSN
// we only provide mrs and msr for the special purpose system
- // registers where op1 (instr[20:19]) == 11 and, (currently) only
- // use it for FPSR n.b msr has L (instr[21]) == 0 mrs has L == 1
+ // registers where op1 (instr[20:19]) == 11
+ // n.b msr has L (instr[21]) == 0 mrs has L == 1
void msr(int op1, int CRn, int CRm, int op2, Register rt) {
starti;
diff --git a/src/hotspot/cpu/aarch64/c2_CodeStubs_aarch64.cpp b/src/hotspot/cpu/aarch64/c2_CodeStubs_aarch64.cpp
index 69ea37fa45b34..dabafb9288b83 100644
--- a/src/hotspot/cpu/aarch64/c2_CodeStubs_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c2_CodeStubs_aarch64.cpp
@@ -55,7 +55,7 @@ int C2EntryBarrierStub::max_size() const {
void C2EntryBarrierStub::emit(C2_MacroAssembler& masm) {
__ bind(entry());
- __ movptr(rscratch1, (uintptr_t) StubRoutines::aarch64::method_entry_barrier());
+ __ lea(rscratch1, RuntimeAddress(StubRoutines::method_entry_barrier()));
__ blr(rscratch1);
__ b(continuation());
diff --git a/src/hotspot/cpu/aarch64/frame_aarch64.hpp b/src/hotspot/cpu/aarch64/frame_aarch64.hpp
index e58d66d5cf50e..558bd80a0e0c2 100644
--- a/src/hotspot/cpu/aarch64/frame_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/frame_aarch64.hpp
@@ -93,7 +93,7 @@
// Entry frames
// n.b. these values are determined by the layout defined in
// stubGenerator for the Java call stub
- entry_frame_after_call_words = 27,
+ entry_frame_after_call_words = 29,
entry_frame_call_wrapper_offset = -8,
// we don't need a save area
diff --git a/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp
index bfe29ddc8f716..070c685a07bb7 100644
--- a/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp
@@ -358,7 +358,7 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slo
__ br(condition, barrier_target);
if (slow_path == nullptr) {
- __ movptr(rscratch1, (uintptr_t) StubRoutines::aarch64::method_entry_barrier());
+ __ lea(rscratch1, RuntimeAddress(StubRoutines::method_entry_barrier()));
__ blr(rscratch1);
__ b(skip_barrier);
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
index 3f8b8be511ef3..3bd22ee25fb81 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
@@ -571,6 +571,19 @@ class MacroAssembler: public Assembler {
msr(0b011, 0b0100, 0b0100, 0b001, zr);
}
+ // FPCR : op1 == 011
+ // CRn == 0100
+ // CRm == 0100
+ // op2 == 000
+
+ inline void get_fpcr(Register reg) {
+ mrs(0b11, 0b0100, 0b0100, 0b000, reg);
+ }
+
+ inline void set_fpcr(Register reg) {
+ msr(0b011, 0b0100, 0b0100, 0b000, reg);
+ }
+
// DCZID_EL0: op1 == 011
// CRn == 0000
// CRm == 0000
diff --git a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
index 7b36f42986e41..97ca90ac76454 100644
--- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
@@ -141,7 +141,8 @@ class StubGenerator: public StubCodeGenerator {
// [ return_from_Java ] <--- sp
// [ argument word n ]
// ...
- // -27 [ argument word 1 ]
+ // -29 [ argument word 1 ]
+ // -28 [ saved Floating-point Control Register ]
// -26 [ saved v15 ] <--- sp_after_call
// -25 [ saved v14 ]
// -24 [ saved v13 ]
@@ -173,8 +174,9 @@ class StubGenerator: public StubCodeGenerator {
// Call stub stack layout word offsets from fp
enum call_stub_layout {
- sp_after_call_off = -26,
+ sp_after_call_off = -28,
+ fpcr_off = sp_after_call_off,
d15_off = -26,
d13_off = -24,
d11_off = -22,
@@ -204,8 +206,9 @@ class StubGenerator: public StubCodeGenerator {
StubCodeMark mark(this, "StubRoutines", "call_stub");
address start = __ pc();
- const Address sp_after_call(rfp, sp_after_call_off * wordSize);
+ const Address sp_after_call (rfp, sp_after_call_off * wordSize);
+ const Address fpcr_save (rfp, fpcr_off * wordSize);
const Address call_wrapper (rfp, call_wrapper_off * wordSize);
const Address result (rfp, result_off * wordSize);
const Address result_type (rfp, result_type_off * wordSize);
@@ -254,6 +257,14 @@ class StubGenerator: public StubCodeGenerator {
__ stpd(v13, v12, d13_save);
__ stpd(v15, v14, d15_save);
+ __ get_fpcr(rscratch1);
+ __ str(rscratch1, fpcr_save);
+ // Set FPCR to the state we need. We do want Round to Nearest. We
+ // don't want non-IEEE rounding modes or floating-point traps.
+ __ bfi(rscratch1, zr, 22, 4); // Clear DN, FZ, and Rmode
+ __ bfi(rscratch1, zr, 8, 5); // Clear exception-control bits (8-12)
+ __ set_fpcr(rscratch1);
+
// install Java thread in global register now we have saved
// whatever value it held
__ mov(rthread, c_rarg7);
@@ -367,6 +378,10 @@ class StubGenerator: public StubCodeGenerator {
__ ldp(r22, r21, r22_save);
__ ldp(r20, r19, r20_save);
+ // restore fpcr
+ __ ldr(rscratch1, fpcr_save);
+ __ set_fpcr(rscratch1);
+
__ ldp(c_rarg0, c_rarg1, call_wrapper);
__ ldrw(c_rarg2, result_type);
__ ldr(c_rarg3, method);
@@ -8378,7 +8393,7 @@ class StubGenerator: public StubCodeGenerator {
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
if (bs_nm != nullptr) {
- StubRoutines::aarch64::_method_entry_barrier = generate_method_entry_barrier();
+ StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
}
StubRoutines::aarch64::_spin_wait = generate_spin_wait();
diff --git a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp
index 3b6d3b5c40a28..80875a3b3cdcf 100644
--- a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp
@@ -56,7 +56,6 @@ address StubRoutines::aarch64::_string_indexof_linear_ll = nullptr;
address StubRoutines::aarch64::_string_indexof_linear_uu = nullptr;
address StubRoutines::aarch64::_string_indexof_linear_ul = nullptr;
address StubRoutines::aarch64::_large_byte_array_inflate = nullptr;
-address StubRoutines::aarch64::_method_entry_barrier = nullptr;
static void empty_spin_wait() { }
address StubRoutines::aarch64::_spin_wait = CAST_FROM_FN_PTR(address, empty_spin_wait);
diff --git a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.hpp b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.hpp
index 2fcb35a1ae160..e6438908ce4c6 100644
--- a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.hpp
@@ -71,8 +71,6 @@ class aarch64 {
static address _string_indexof_linear_ul;
static address _large_byte_array_inflate;
- static address _method_entry_barrier;
-
static address _spin_wait;
static bool _completed;
@@ -179,10 +177,6 @@ class aarch64 {
return _large_byte_array_inflate;
}
- static address method_entry_barrier() {
- return _method_entry_barrier;
- }
-
static address spin_wait() {
return _spin_wait;
}
diff --git a/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp b/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp
index d6570283e60ac..9329876b808b2 100644
--- a/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp
+++ b/src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp
@@ -227,7 +227,7 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm) {
__ cmp(tmp0, tmp1);
__ b(skip, eq);
- __ mov_address(tmp0, StubRoutines::Arm::method_entry_barrier());
+ __ mov_address(tmp0, StubRoutines::method_entry_barrier());
__ call(tmp0);
__ b(skip);
diff --git a/src/hotspot/cpu/arm/interp_masm_arm.cpp b/src/hotspot/cpu/arm/interp_masm_arm.cpp
index 643aea681ddde..481c3d09e584e 100644
--- a/src/hotspot/cpu/arm/interp_masm_arm.cpp
+++ b/src/hotspot/cpu/arm/interp_masm_arm.cpp
@@ -39,6 +39,7 @@
#include "oops/methodData.hpp"
#include "oops/resolvedFieldEntry.hpp"
#include "oops/resolvedIndyEntry.hpp"
+#include "oops/resolvedMethodEntry.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "runtime/basicLock.hpp"
@@ -222,48 +223,6 @@ void InterpreterMacroAssembler::get_index_at_bcp(Register index, int bcp_offset,
}
}
-// Sets cache, index.
-void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache, Register index, int bcp_offset, size_t index_size) {
- assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
- assert_different_registers(cache, index);
-
- get_index_at_bcp(index, bcp_offset, cache, index_size);
-
- // load constant pool cache pointer
- ldr(cache, Address(FP, frame::interpreter_frame_cache_offset * wordSize));
-
- // convert from field index to ConstantPoolCacheEntry index
- assert(sizeof(ConstantPoolCacheEntry) == 4*wordSize, "adjust code below");
- logical_shift_left(index, index, 2);
-}
-
-// Sets cache, index, bytecode.
-void InterpreterMacroAssembler::get_cache_and_index_and_bytecode_at_bcp(Register cache, Register index, Register bytecode, int byte_no, int bcp_offset, size_t index_size) {
- get_cache_and_index_at_bcp(cache, index, bcp_offset, index_size);
- // caution index and bytecode can be the same
- add(bytecode, cache, AsmOperand(index, lsl, LogBytesPerWord));
- ldrb(bytecode, Address(bytecode, (1 + byte_no) + in_bytes(ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::indices_offset())));
- TemplateTable::volatile_barrier(MacroAssembler::LoadLoad, noreg, true);
-}
-
-// Sets cache. Blows reg_tmp.
-void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache, Register reg_tmp, int bcp_offset, size_t index_size) {
- assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
- assert_different_registers(cache, reg_tmp);
-
- get_index_at_bcp(reg_tmp, bcp_offset, cache, index_size);
-
- // load constant pool cache pointer
- ldr(cache, Address(FP, frame::interpreter_frame_cache_offset * wordSize));
-
- // skip past the header
- add(cache, cache, in_bytes(ConstantPoolCache::base_offset()));
- // convert from field index to ConstantPoolCacheEntry index
- // and from word offset to byte offset
- assert(sizeof(ConstantPoolCacheEntry) == 4*wordSize, "adjust code below");
- add(cache, cache, AsmOperand(reg_tmp, lsl, 2 + LogBytesPerWord));
-}
-
// Load object from cpool->resolved_references(index)
void InterpreterMacroAssembler::load_resolved_reference_at_index(
Register result, Register index) {
@@ -343,6 +302,20 @@ void InterpreterMacroAssembler::load_field_entry(Register cache, Register index,
}
}
+void InterpreterMacroAssembler::load_method_entry(Register cache, Register index, int bcp_offset) {
+ // Get index out of bytecode pointer
+ get_index_at_bcp(index, bcp_offset, cache /* as tmp */, sizeof(u2));
+ mov(cache, sizeof(ResolvedMethodEntry));
+ mul(index, index, cache); // Scale the index to be the entry index * sizeof(ResolvedMethodEntry)
+
+ // load constant pool cache pointer
+ ldr(cache, Address(FP, frame::interpreter_frame_cache_offset * wordSize));
+ // Get address of method entries array
+ ldr(cache, Address(cache, ConstantPoolCache::method_entries_offset()));
+ add(cache, cache, Array::base_offset_in_bytes());
+ add(cache, cache, index);
+}
+
// Generate a subtype check: branch to not_subtype if sub_klass is
// not a subtype of super_klass.
// Profiling code for the subtype check failure (profile_typecheck_failed)
diff --git a/src/hotspot/cpu/arm/interp_masm_arm.hpp b/src/hotspot/cpu/arm/interp_masm_arm.hpp
index f02c474f0c08e..58eeda6fbbbf2 100644
--- a/src/hotspot/cpu/arm/interp_masm_arm.hpp
+++ b/src/hotspot/cpu/arm/interp_masm_arm.hpp
@@ -89,11 +89,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
// Sets index. Blows reg_tmp.
void get_index_at_bcp(Register index, int bcp_offset, Register reg_tmp, size_t index_size = sizeof(u2));
- // Sets cache, index.
- void get_cache_and_index_at_bcp(Register cache, Register index, int bcp_offset, size_t index_size = sizeof(u2));
- void get_cache_and_index_and_bytecode_at_bcp(Register cache, Register index, Register bytecode, int byte_no, int bcp_offset, size_t index_size = sizeof(u2));
- // Sets cache. Blows reg_tmp.
- void get_cache_entry_pointer_at_bcp(Register cache, Register reg_tmp, int bcp_offset, size_t index_size = sizeof(u2));
// Load object from cpool->resolved_references(*bcp+1)
void load_resolved_reference_at_index(Register result, Register tmp);
@@ -103,6 +98,7 @@ class InterpreterMacroAssembler: public MacroAssembler {
void load_resolved_indy_entry(Register cache, Register index);
void load_field_entry(Register cache, Register index, int bcp_offset = 1);
+ void load_method_entry(Register cache, Register index, int bcp_offset = 1);
void pop_ptr(Register r);
void pop_i(Register r = R0_tos);
diff --git a/src/hotspot/cpu/arm/stubGenerator_arm.cpp b/src/hotspot/cpu/arm/stubGenerator_arm.cpp
index 6e5484c98cbd4..7f9645f749ada 100644
--- a/src/hotspot/cpu/arm/stubGenerator_arm.cpp
+++ b/src/hotspot/cpu/arm/stubGenerator_arm.cpp
@@ -3188,7 +3188,7 @@ class StubGenerator: public StubCodeGenerator {
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
if (bs_nm != nullptr) {
- StubRoutines::Arm::_method_entry_barrier = generate_method_entry_barrier();
+ StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
}
}
diff --git a/src/hotspot/cpu/arm/stubRoutines_arm.cpp b/src/hotspot/cpu/arm/stubRoutines_arm.cpp
index ab4df1cd337fb..0cd174d8da673 100644
--- a/src/hotspot/cpu/arm/stubRoutines_arm.cpp
+++ b/src/hotspot/cpu/arm/stubRoutines_arm.cpp
@@ -33,5 +33,3 @@ address StubRoutines::Arm::_partial_subtype_check = nullptr;
address StubRoutines::_atomic_load_long_entry = nullptr;
address StubRoutines::_atomic_store_long_entry = nullptr;
-
-address StubRoutines::Arm::_method_entry_barrier = nullptr;
diff --git a/src/hotspot/cpu/arm/stubRoutines_arm.hpp b/src/hotspot/cpu/arm/stubRoutines_arm.hpp
index 46e66d5dcfee2..05c82881cd5f6 100644
--- a/src/hotspot/cpu/arm/stubRoutines_arm.hpp
+++ b/src/hotspot/cpu/arm/stubRoutines_arm.hpp
@@ -45,13 +45,11 @@ class Arm {
static address _idiv_irem_entry;
static address _partial_subtype_check;
- static address _method_entry_barrier;
public:
static address idiv_irem_entry() { return _idiv_irem_entry; }
static address partial_subtype_check() { return _partial_subtype_check; }
- static address method_entry_barrier() { return _method_entry_barrier; }
};
static bool returns_to_call_stub(address return_pc) {
diff --git a/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp b/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp
index 4c65c05eb1d21..ba9a3fd7a9b2a 100644
--- a/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp
+++ b/src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp
@@ -37,6 +37,7 @@
#include "oops/method.inline.hpp"
#include "oops/oop.inline.hpp"
#include "oops/resolvedIndyEntry.hpp"
+#include "oops/resolvedMethodEntry.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "prims/methodHandles.hpp"
@@ -373,12 +374,11 @@ address TemplateInterpreterGenerator::generate_return_entry_for(TosState state,
__ add(Rstack_top, Rstack_top, AsmOperand(Rcache, lsl, Interpreter::logStackElementSize));
} else {
// Pop N words from the stack
- __ get_cache_and_index_at_bcp(Rcache, Rindex, 1, index_size);
-
- __ add(Rtemp, Rcache, AsmOperand(Rindex, lsl, LogBytesPerWord));
- __ ldrb(Rtemp, Address(Rtemp, ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset()));
+ assert(index_size == sizeof(u2), "Can only be u2");
+ __ load_method_entry(Rcache, Rindex);
+ __ ldrh(Rcache, Address(Rcache, in_bytes(ResolvedIndyEntry::num_parameters_offset())));
__ check_stack_top();
- __ add(Rstack_top, Rstack_top, AsmOperand(Rtemp, lsl, Interpreter::logStackElementSize));
+ __ add(Rstack_top, Rstack_top, AsmOperand(Rcache, lsl, Interpreter::logStackElementSize));
}
__ convert_retval_to_tos(state);
diff --git a/src/hotspot/cpu/arm/templateTable_arm.cpp b/src/hotspot/cpu/arm/templateTable_arm.cpp
index 334e6fb9441ea..e478f08c977b6 100644
--- a/src/hotspot/cpu/arm/templateTable_arm.cpp
+++ b/src/hotspot/cpu/arm/templateTable_arm.cpp
@@ -40,6 +40,7 @@
#include "oops/oop.inline.hpp"
#include "oops/resolvedIndyEntry.hpp"
#include "oops/resolvedFieldEntry.hpp"
+#include "oops/resolvedMethodEntry.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/frame.inline.hpp"
@@ -544,14 +545,12 @@ void TemplateTable::condy_helper(Label& Done)
// VMr2 = flags = (tos, off) using format of CPCE::_flags
__ mov(off, flags);
- __ logical_shift_left( off, off, 32 - ConstantPoolCacheEntry::field_index_bits);
- __ logical_shift_right(off, off, 32 - ConstantPoolCacheEntry::field_index_bits);
+ __ logical_shift_left( off, off, 32 - ConstantPoolCache::field_index_bits);
+ __ logical_shift_right(off, off, 32 - ConstantPoolCache::field_index_bits);
const Address field(obj, off);
- __ logical_shift_right(flags, flags, ConstantPoolCacheEntry::tos_state_shift);
- // Make sure we don't need to mask flags after the above shift
- ConstantPoolCacheEntry::verify_tos_state_shift();
+ __ logical_shift_right(flags, flags, ConstantPoolCache::tos_state_shift);
switch (bytecode()) {
case Bytecodes::_ldc:
@@ -2569,16 +2568,26 @@ void TemplateTable::volatile_barrier(MacroAssembler::Membar_mask_bits order_cons
}
// Blows all volatile registers: R0-R3, Rtemp, LR.
-void TemplateTable::resolve_cache_and_index(int byte_no,
- Register Rcache,
- Register Rindex,
- size_t index_size) {
+void TemplateTable::resolve_cache_and_index_for_method(int byte_no,
+ Register Rcache,
+ Register Rindex) {
assert_different_registers(Rcache, Rindex, Rtemp);
+ assert(byte_no == f1_byte || byte_no == f2_byte, "byte_no out of range");
Label resolved;
Bytecodes::Code code = bytecode();
- assert(byte_no == f1_byte || byte_no == f2_byte, "byte_no out of range");
- __ get_cache_and_index_and_bytecode_at_bcp(Rcache, Rindex, Rtemp, byte_no, 1, index_size);
+ __ load_method_entry(Rcache, Rindex);
+ switch(byte_no) {
+ case f1_byte:
+ __ add(Rtemp, Rcache, in_bytes(ResolvedMethodEntry::bytecode1_offset()));
+ break;
+ case f2_byte:
+ __ add(Rtemp, Rcache, in_bytes(ResolvedMethodEntry::bytecode2_offset()));
+ break;
+ }
+ // Load-acquire the bytecode to match store-release in InterpreterRuntime
+ __ ldrb(Rtemp, Rtemp);
+ __ membar(MacroAssembler::Membar_mask_bits(MacroAssembler::LoadLoad | MacroAssembler::LoadStore), noreg, true);
__ cmp(Rtemp, code); // have we resolved this bytecode?
__ b(resolved, eq);
@@ -2587,7 +2596,7 @@ void TemplateTable::resolve_cache_and_index(int byte_no,
__ mov(R1, code);
__ call_VM(noreg, entry, R1);
// Update registers with resolved info
- __ get_cache_and_index_at_bcp(Rcache, Rindex, 1, index_size);
+ __ load_method_entry(Rcache, Rindex);
__ bind(resolved);
}
@@ -2655,38 +2664,6 @@ void TemplateTable::load_resolved_field_entry(Register obj,
}
}
-// The Rcache and Rindex registers must be set before call
-void TemplateTable::load_field_cp_cache_entry(Register Rcache,
- Register Rindex,
- Register Roffset,
- Register Rflags,
- Register Robj,
- bool is_static = false) {
-
- assert_different_registers(Rcache, Rindex, Rtemp);
- assert_different_registers(Roffset, Rflags, Robj, Rtemp);
-
- ByteSize cp_base_offset = ConstantPoolCache::base_offset();
-
- __ add(Rtemp, Rcache, AsmOperand(Rindex, lsl, LogBytesPerWord));
-
- // Field offset
- __ ldr(Roffset, Address(Rtemp,
- cp_base_offset + ConstantPoolCacheEntry::f2_offset()));
-
- // Flags
- __ ldr_u32(Rflags, Address(Rtemp,
- cp_base_offset + ConstantPoolCacheEntry::flags_offset()));
-
- if (is_static) {
- __ ldr(Robj, Address(Rtemp,
- cp_base_offset + ConstantPoolCacheEntry::f1_offset()));
- const int mirror_offset = in_bytes(Klass::java_mirror_offset());
- __ ldr(Robj, Address(Robj, mirror_offset));
- __ resolve_oop_handle(Robj);
- }
-}
-
// The rmethod register is input and overwritten to be the adapter method for the
// indy call. Link Register (lr) is set to the return address for the adapter and
// an appendix may be pushed to the stack. Registers R1-R3, Rtemp (R12) are clobbered
@@ -2749,46 +2726,99 @@ void TemplateTable::load_invokedynamic_entry(Register method) {
}
// Blows all volatile registers: R0-R3, Rtemp, LR.
-void TemplateTable::load_invoke_cp_cache_entry(int byte_no,
- Register method,
- Register itable_index,
- Register flags,
- bool is_invokevirtual,
- bool is_invokevfinal/*unused*/,
- bool is_invokedynamic /*unused*/) {
+void TemplateTable::load_resolved_method_entry_special_or_static(Register Rcache,
+ Register method,
+ Register flags) {
+ Register index = flags;
+ assert_different_registers(Rcache, method, flags);
+ resolve_cache_and_index_for_method(f1_byte, Rcache, index);
+ __ ldrb(flags, Address(Rcache, in_bytes(ResolvedMethodEntry::flags_offset())));
+ __ ldr(method, Address(Rcache, in_bytes(ResolvedMethodEntry::method_offset())));
+}
+
+void TemplateTable::load_resolved_method_entry_handle(Register Rcache,
+ Register method,
+ Register ref_index,
+ Register flags) {
+ Register index = ref_index;
+ assert_different_registers(method, flags);
+ assert_different_registers(Rcache, method, index);
+
+
+ resolve_cache_and_index_for_method(f1_byte, Rcache, index);
+ __ ldrb(flags, Address(Rcache, in_bytes(ResolvedMethodEntry::flags_offset())));
+
+ // maybe push appendix to arguments (just before return address)
+ Label L_no_push;
+ __ tbz(flags, ResolvedMethodEntry::has_appendix_shift, L_no_push);
+ // invokehandle uses an index into the resolved references array
+ __ ldrh(ref_index, Address(Rcache, in_bytes(ResolvedMethodEntry::resolved_references_index_offset())));
+ // Push the appendix as a trailing parameter.
+ // This must be done before we get the receiver,
+ // since the parameter_size includes it.
+ Register appendix = method;
+ __ load_resolved_reference_at_index(appendix, ref_index);
+ __ push(appendix); // push appendix (MethodType, CallSite, etc.)
+ __ bind(L_no_push);
+
+ __ ldr(method, Address(Rcache, in_bytes(ResolvedMethodEntry::method_offset())));
+}
+
+void TemplateTable::load_resolved_method_entry_interface(Register Rcache,
+ Register klass,
+ Register method_or_table_index,
+ Register flags) {
// setup registers
- const Register cache = R2_tmp;
- const Register index = R3_tmp;
- const Register temp_reg = Rtemp;
- assert_different_registers(cache, index, temp_reg);
- assert_different_registers(method, itable_index, temp_reg);
+ const Register index = method_or_table_index;
+ assert_different_registers(method_or_table_index, Rcache, flags);
// determine constant pool cache field offsets
- assert(is_invokevirtual == (byte_no == f2_byte), "is_invokevirtual flag redundant");
- const int method_offset = in_bytes(
- ConstantPoolCache::base_offset() +
- ((byte_no == f2_byte)
- ? ConstantPoolCacheEntry::f2_offset()
- : ConstantPoolCacheEntry::f1_offset()
- )
- );
- const int flags_offset = in_bytes(ConstantPoolCache::base_offset() +
- ConstantPoolCacheEntry::flags_offset());
- // access constant pool cache fields
- const int index_offset = in_bytes(ConstantPoolCache::base_offset() +
- ConstantPoolCacheEntry::f2_offset());
-
- size_t index_size = sizeof(u2);
- resolve_cache_and_index(byte_no, cache, index, index_size);
- __ add(temp_reg, cache, AsmOperand(index, lsl, LogBytesPerWord));
- __ ldr(method, Address(temp_reg, method_offset));
-
- if (itable_index != noreg) {
- __ ldr(itable_index, Address(temp_reg, index_offset));
- }
- __ ldr_u32(flags, Address(temp_reg, flags_offset));
+ resolve_cache_and_index_for_method(f1_byte, Rcache, index);
+ __ ldrb(flags, Address(Rcache, in_bytes(ResolvedMethodEntry::flags_offset())));
+
+ // Invokeinterface can behave in different ways:
+ // If calling a method from java.lang.Object, the forced virtual flag is true so the invocation will
+ // behave like an invokevirtual call. The state of the virtual final flag will determine whether a method or
+ // vtable index is placed in the register.
+ // Otherwise, the registers will be populated with the klass and method.
+
+ Label NotVirtual; Label NotVFinal; Label Done;
+ __ tbz(flags, ResolvedMethodEntry::is_forced_virtual_shift, NotVirtual);
+ __ tbz(flags, ResolvedMethodEntry::is_vfinal_shift, NotVFinal);
+ __ ldr(method_or_table_index, Address(Rcache, in_bytes(ResolvedMethodEntry::method_offset())));
+ __ b(Done);
+
+ __ bind(NotVFinal);
+ __ ldrh(method_or_table_index, Address(Rcache, in_bytes(ResolvedMethodEntry::table_index_offset())));
+ __ b(Done);
+
+ __ bind(NotVirtual);
+ __ ldr(method_or_table_index, Address(Rcache, in_bytes(ResolvedMethodEntry::method_offset())));
+ __ ldr(klass, Address(Rcache, in_bytes(ResolvedMethodEntry::klass_offset())));
+ __ bind(Done);
}
+void TemplateTable::load_resolved_method_entry_virtual(Register Rcache,
+ Register method_or_table_index,
+ Register flags) {
+ // setup registers
+ const Register index = flags;
+ assert_different_registers(method_or_table_index, Rcache, flags);
+
+ // determine constant pool cache field offsets
+ resolve_cache_and_index_for_method(f2_byte, Rcache, index);
+ __ ldrb(flags, Address(Rcache, in_bytes(ResolvedMethodEntry::flags_offset())));
+
+ // method_or_table_index can either be an itable index or a method depending on the virtual final flag
+ Label NotVFinal; Label Done;
+ __ tbz(flags, ResolvedMethodEntry::is_vfinal_shift, NotVFinal);
+ __ ldr(method_or_table_index, Address(Rcache, in_bytes(ResolvedMethodEntry::method_offset())));
+ __ b(Done);
+
+ __ bind(NotVFinal);
+ __ ldrh(method_or_table_index, Address(Rcache, in_bytes(ResolvedMethodEntry::table_index_offset())));
+ __ bind(Done);
+}
// The registers cache and index expected to be set before call, and should not be Rtemp.
// Blows volatile registers R0-R3, Rtemp, LR,
@@ -3620,63 +3650,31 @@ void TemplateTable::fast_xaccess(TosState state) {
//----------------------------------------------------------------------------------------------------
// Calls
-void TemplateTable::prepare_invoke(int byte_no,
- Register method, // linked method (or i-klass)
- Register index, // itable index, MethodType, etc.
- Register recv, // if caller wants to see it
- Register flags // if caller wants to test it
- ) {
- // determine flags
- const Bytecodes::Code code = bytecode();
- const bool is_invokeinterface = code == Bytecodes::_invokeinterface;
- const bool is_invokedynamic = code == Bytecodes::_invokedynamic;
- const bool is_invokehandle = code == Bytecodes::_invokehandle;
- const bool is_invokevirtual = code == Bytecodes::_invokevirtual;
- const bool is_invokespecial = code == Bytecodes::_invokespecial;
- const bool load_receiver = (recv != noreg);
- assert(load_receiver == (code != Bytecodes::_invokestatic && code != Bytecodes::_invokedynamic), "");
- assert(recv == noreg || recv == R2, "");
- assert(flags == noreg || flags == R3, "");
-
- // setup registers & access constant pool cache
- if (recv == noreg) recv = R2;
- if (flags == noreg) flags = R3;
- const Register temp = Rtemp;
+void TemplateTable::prepare_invoke(Register Rcache, Register recv) {
+
const Register ret_type = R1_tmp;
- assert_different_registers(method, index, flags, recv, LR, ret_type, temp);
+
+ const Bytecodes::Code code = bytecode();
+ const bool load_receiver = (code != Bytecodes::_invokestatic && code != Bytecodes::_invokedynamic);
// save 'interpreter return address'
__ save_bcp();
- load_invoke_cp_cache_entry(byte_no, method, index, flags, is_invokevirtual, false, is_invokedynamic);
-
- // maybe push extra argument
- if (is_invokehandle) {
- Label L_no_push;
- __ tbz(flags, ConstantPoolCacheEntry::has_appendix_shift, L_no_push);
- __ mov(temp, index);
- __ load_resolved_reference_at_index(index, temp);
- __ verify_oop(index);
- __ push_ptr(index); // push appendix (MethodType, CallSite, etc.)
- __ bind(L_no_push);
- }
+ // Load TOS state for later
+ __ ldrb(ret_type, Address(Rcache, in_bytes(ResolvedMethodEntry::type_offset())));
// load receiver if needed (after extra argument is pushed so parameter size is correct)
if (load_receiver) {
- __ andr(temp, flags, (uintx)ConstantPoolCacheEntry::parameter_size_mask); // get parameter size
- Address recv_addr = __ receiver_argument_address(Rstack_top, temp, recv);
+ __ ldrh(recv, Address(Rcache, in_bytes(ResolvedMethodEntry::num_parameters_offset())));
+ Address recv_addr = __ receiver_argument_address(Rstack_top, Rtemp, recv);
__ ldr(recv, recv_addr);
__ verify_oop(recv);
}
- // compute return type
- __ logical_shift_right(ret_type, flags, ConstantPoolCacheEntry::tos_state_shift);
- // Make sure we don't need to mask flags after the above shift
- ConstantPoolCacheEntry::verify_tos_state_shift();
// load return address
{ const address table = (address) Interpreter::invoke_return_entry_table_for(code);
- __ mov_slow(temp, table);
- __ ldr(LR, Address::indexed_ptr(temp, ret_type));
+ __ mov_slow(Rtemp, table);
+ __ ldr(LR, Address::indexed_ptr(Rtemp, ret_type));
}
}
@@ -3692,7 +3690,7 @@ void TemplateTable::invokevirtual_helper(Register index,
// Test for an invoke of a final method
Label notFinal;
- __ tbz(flags, ConstantPoolCacheEntry::is_vfinal_shift, notFinal);
+ __ tbz(flags, ResolvedMethodEntry::is_vfinal_shift, notFinal);
assert(index == Rmethod, "Method* must be Rmethod, for interpreter calling convention");
@@ -3729,7 +3727,10 @@ void TemplateTable::invokevirtual(int byte_no) {
const Register Rrecv = R2_tmp;
const Register Rflags = R3_tmp;
- prepare_invoke(byte_no, Rmethod, noreg, Rrecv, Rflags);
+ load_resolved_method_entry_virtual(Rrecv, // ResolvedMethodEntry*
+ Rmethod, // Method* or itable index
+ Rflags); // Flags
+ prepare_invoke(Rrecv, Rrecv);
// Rmethod: index
// Rrecv: receiver
@@ -3744,7 +3745,10 @@ void TemplateTable::invokespecial(int byte_no) {
transition(vtos, vtos);
assert(byte_no == f1_byte, "use this argument");
const Register Rrecv = R2_tmp;
- prepare_invoke(byte_no, Rmethod, noreg, Rrecv);
+ load_resolved_method_entry_special_or_static(R2_tmp, // ResolvedMethodEntry*
+ Rmethod, // Method*
+ R3_tmp); // Flags
+ prepare_invoke(Rrecv, Rrecv);
__ verify_oop(Rrecv);
__ null_check(Rrecv, Rtemp);
// do the call
@@ -3756,7 +3760,10 @@ void TemplateTable::invokespecial(int byte_no) {
void TemplateTable::invokestatic(int byte_no) {
transition(vtos, vtos);
assert(byte_no == f1_byte, "use this argument");
- prepare_invoke(byte_no, Rmethod);
+ load_resolved_method_entry_special_or_static(R2_tmp, // ResolvedMethodEntry*
+ Rmethod, // Method*
+ R3_tmp); // Flags
+ prepare_invoke(R2_tmp, R2_tmp);
// do the call
__ profile_call(R2_tmp);
__ jump_from_interpreted(Rmethod);
@@ -3781,7 +3788,11 @@ void TemplateTable::invokeinterface(int byte_no) {
const Register Rflags = R3_tmp;
const Register Rklass = R2_tmp; // Note! Same register with Rrecv
- prepare_invoke(byte_no, Rinterf, Rmethod, Rrecv, Rflags);
+ load_resolved_method_entry_interface(R2_tmp, // ResolvedMethodEntry*
+ R1_tmp, // Klass*
+ Rmethod, // Method* or itable/vtable index
+ R3_tmp); // Flags
+ prepare_invoke(Rrecv, Rrecv);
// First check for Object case, then private interface method,
// then regular interface method.
@@ -3789,7 +3800,7 @@ void TemplateTable::invokeinterface(int byte_no) {
// Special case of invokeinterface called for virtual method of
// java.lang.Object. See cpCache.cpp for details.
Label notObjectMethod;
- __ tbz(Rflags, ConstantPoolCacheEntry::is_forced_virtual_shift, notObjectMethod);
+ __ tbz(Rflags, ResolvedMethodEntry::is_forced_virtual_shift, notObjectMethod);
invokevirtual_helper(Rmethod, Rrecv, Rflags);
__ bind(notObjectMethod);
@@ -3800,7 +3811,7 @@ void TemplateTable::invokeinterface(int byte_no) {
Label no_such_interface;
Label notVFinal;
- __ tbz(Rflags, ConstantPoolCacheEntry::is_vfinal_shift, notVFinal);
+ __ tbz(Rflags, ResolvedMethodEntry::is_vfinal_shift, notVFinal);
Label subtype;
__ check_klass_subtype(Rklass, Rinterf, R1_tmp, R3_tmp, noreg, subtype);
@@ -3874,9 +3885,12 @@ void TemplateTable::invokehandle(int byte_no) {
const Register Rrecv = R2_tmp;
const Register Rmtype = R4_tmp;
- const Register R5_method = R5_tmp; // can't reuse Rmethod!
- prepare_invoke(byte_no, R5_method, Rmtype, Rrecv);
+ load_resolved_method_entry_handle(R2_tmp, // ResolvedMethodEntry*
+ Rmethod, // Method*
+ Rmtype, // Resolved Reference
+ R3_tmp); // Flags
+ prepare_invoke(Rrecv, Rrecv);
__ null_check(Rrecv, Rtemp);
// Rmtype: MethodType object (from cpool->resolved_references[f1], if necessary)
@@ -3886,7 +3900,6 @@ void TemplateTable::invokehandle(int byte_no) {
// do the call
__ profile_final_call(R3_tmp); // FIXME: profile the LambdaForm also
- __ mov(Rmethod, R5_method);
__ jump_from_interpreted(Rmethod);
}
diff --git a/src/hotspot/cpu/arm/templateTable_arm.hpp b/src/hotspot/cpu/arm/templateTable_arm.hpp
index 06c9d665ae74f..5b19bc68e7719 100644
--- a/src/hotspot/cpu/arm/templateTable_arm.hpp
+++ b/src/hotspot/cpu/arm/templateTable_arm.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,7 @@
#ifndef CPU_ARM_TEMPLATETABLE_ARM_HPP
#define CPU_ARM_TEMPLATETABLE_ARM_HPP
- static void prepare_invoke(int byte_no,
- Register method, // linked method (or i-klass)
- Register index = noreg, // itable index, MethodType, etc.
- Register recv = noreg, // if caller wants to see it
- Register flags = noreg // if caller wants to test it
- );
+ static void prepare_invoke(Register cache, Register recv);
static void invokevirtual_helper(Register index, Register recv,
Register flags);
diff --git a/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp
index fbe37a0a35c35..f15e79534a2e5 100644
--- a/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp
@@ -188,7 +188,7 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Register t
__ block_comment("nmethod_entry_barrier (nmethod_entry_barrier) {");
// Load stub address using toc (fixed instruction size, unlike load_const_optimized)
- __ calculate_address_from_global_toc(tmp, StubRoutines::ppc::nmethod_entry_barrier(),
+ __ calculate_address_from_global_toc(tmp, StubRoutines::method_entry_barrier(),
true, true, false); // 2 instructions
__ mtctr(tmp);
diff --git a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp
index efcc8c897216d..e26f03f52d802 100644
--- a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp
+++ b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp
@@ -3558,7 +3558,7 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
- address generate_nmethod_entry_barrier() {
+ address generate_method_entry_barrier() {
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", "nmethod_entry_barrier");
@@ -4806,7 +4806,7 @@ class StubGenerator: public StubCodeGenerator {
// nmethod entry barriers for concurrent class unloading
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
if (bs_nm != nullptr) {
- StubRoutines::ppc::_nmethod_entry_barrier = generate_nmethod_entry_barrier();
+ StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
}
// arraycopy stubs used by compilers
diff --git a/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp b/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp
index 1e1172c9ada43..4db0227e81b4e 100644
--- a/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp
+++ b/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp
@@ -53,11 +53,7 @@ class ppc {
friend class StubGenerator;
private:
- static address _nmethod_entry_barrier;
-
public:
- static address nmethod_entry_barrier();
-
static address generate_crc_constants(juint reverse_poly);
};
diff --git a/src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp b/src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp
index f2dc214456779..7df905b90682c 100644
--- a/src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp
+++ b/src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp
@@ -206,8 +206,3 @@ address StubRoutines::ppc::generate_crc_constants(juint reverse_poly) {
return consts;
}
-
-address StubRoutines::ppc::_nmethod_entry_barrier = nullptr;
-address StubRoutines::ppc::nmethod_entry_barrier() {
- return _nmethod_entry_barrier;
-}
diff --git a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp
index fedb8ad86e9f7..7d6e14d26c127 100644
--- a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp
+++ b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
+#include "cds/cdsConfig.hpp"
#include "compiler/disassembler.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
#include "gc/shared/tlab_globals.hpp"
@@ -3483,7 +3484,7 @@ void TemplateTable::invokevirtual(int byte_no) {
__ testbitdi(CCR0, R0, Rflags, ResolvedMethodEntry::is_vfinal_shift);
__ bfalse(CCR0, LnotFinal);
- if (RewriteBytecodes && !UseSharedSpaces && !DumpSharedSpaces) {
+ if (RewriteBytecodes && !UseSharedSpaces && !CDSConfig::is_dumping_static_archive()) {
patch_bytecode(Bytecodes::_fast_invokevfinal, Rnew_bc, R12_scratch2);
}
invokevfinal_helper(Rcache, R11_scratch1, R12_scratch2, Rflags /* tmp */);
diff --git a/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp b/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp
index d0b21fb1f0dc2..953478d05ae7e 100644
--- a/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp
+++ b/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp
@@ -363,7 +363,7 @@ int LIR_Assembler::emit_unwind_handler() {
if (LockingMode == LM_MONITOR) {
__ j(*stub->entry());
} else {
- __ unlock_object(x15, x14, x10, *stub->entry());
+ __ unlock_object(x15, x14, x10, x16, *stub->entry());
}
__ bind(*stub->continuation());
}
@@ -1512,6 +1512,7 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
Register obj = op->obj_opr()->as_register(); // may not be an oop
Register hdr = op->hdr_opr()->as_register();
Register lock = op->lock_opr()->as_register();
+ Register temp = op->scratch_opr()->as_register();
if (LockingMode == LM_MONITOR) {
if (op->info() != nullptr) {
add_debug_info_for_null_check_here(op->info());
@@ -1521,13 +1522,13 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
} else if (op->code() == lir_lock) {
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
// add debug info for NullPointerException only if one is possible
- int null_check_offset = __ lock_object(hdr, obj, lock, *op->stub()->entry());
+ int null_check_offset = __ lock_object(hdr, obj, lock, temp, *op->stub()->entry());
if (op->info() != nullptr) {
add_debug_info_for_null_check(null_check_offset, op->info());
}
} else if (op->code() == lir_unlock) {
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
- __ unlock_object(hdr, obj, lock, *op->stub()->entry());
+ __ unlock_object(hdr, obj, lock, temp, *op->stub()->entry());
} else {
Unimplemented();
}
diff --git a/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp b/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp
index 11fde72bc047a..c3928b8b318dc 100644
--- a/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp
+++ b/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp
@@ -274,6 +274,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
// "lock" stores the address of the monitor stack slot, so this is not an oop
LIR_Opr lock = new_register(T_INT);
+ LIR_Opr scratch = new_register(T_INT);
CodeEmitInfo* info_for_exception = nullptr;
if (x->needs_null_check()) {
@@ -282,7 +283,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
// this CodeEmitInfo must not have the xhandlers because here the
// object is already locked (xhandlers expect object to be unlocked)
CodeEmitInfo* info = state_for(x, x->state(), true);
- monitor_enter(obj.result(), lock, syncTempOpr(), LIR_OprFact::illegalOpr,
+ monitor_enter(obj.result(), lock, syncTempOpr(), scratch,
x->monitor_no(), info_for_exception, info);
}
@@ -294,8 +295,9 @@ void LIRGenerator::do_MonitorExit(MonitorExit* x) {
LIR_Opr lock = new_register(T_INT);
LIR_Opr obj_temp = new_register(T_INT);
+ LIR_Opr scratch = new_register(T_INT);
set_no_result(x);
- monitor_exit(obj_temp, lock, syncTempOpr(), LIR_OprFact::illegalOpr, x->monitor_no());
+ monitor_exit(obj_temp, lock, syncTempOpr(), scratch, x->monitor_no());
}
// neg
diff --git a/src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.cpp b/src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.cpp
index 1ab33e024877e..6c1dce0de1598 100644
--- a/src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.cpp
+++ b/src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.cpp
@@ -49,10 +49,10 @@ void C1_MacroAssembler::float_cmp(bool is_float, int unordered_result,
}
}
-int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case) {
+int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Register temp, Label& slow_case) {
const int aligned_mask = BytesPerWord - 1;
const int hdr_offset = oopDesc::mark_offset_in_bytes();
- assert_different_registers(hdr, obj, disp_hdr);
+ assert_different_registers(hdr, obj, disp_hdr, temp, t0, t1);
int null_check_offset = -1;
verify_oop(obj);
@@ -65,15 +65,15 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
if (DiagnoseSyncOnValueBasedClasses != 0) {
load_klass(hdr, obj);
lwu(hdr, Address(hdr, Klass::access_flags_offset()));
- test_bit(t0, hdr, exact_log2(JVM_ACC_IS_VALUE_BASED_CLASS));
- bnez(t0, slow_case, true /* is_far */);
+ test_bit(temp, hdr, exact_log2(JVM_ACC_IS_VALUE_BASED_CLASS));
+ bnez(temp, slow_case, true /* is_far */);
}
// Load object header
ld(hdr, Address(obj, hdr_offset));
if (LockingMode == LM_LIGHTWEIGHT) {
- lightweight_lock(obj, hdr, t0, t1, slow_case);
+ lightweight_lock(obj, hdr, temp, t1, slow_case);
} else if (LockingMode == LM_LEGACY) {
Label done;
// and mark it as unlocked
@@ -83,8 +83,8 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
// test if object header is still the same (i.e. unlocked), and if so, store the
// displaced header address in the object header - if it is not the same, get the
// object header instead
- la(t1, Address(obj, hdr_offset));
- cmpxchgptr(hdr, disp_hdr, t1, t0, done, /*fallthough*/nullptr);
+ la(temp, Address(obj, hdr_offset));
+ cmpxchgptr(hdr, disp_hdr, temp, t1, done, /*fallthough*/nullptr);
// if the object header was the same, we're done
// if the object header was not the same, it is now in the hdr register
// => test if it is a stack pointer into the same stack (recursive locking), i.e.:
@@ -100,8 +100,8 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
// assuming both the stack pointer and page_size have their least
// significant 2 bits cleared and page_size is a power of 2
sub(hdr, hdr, sp);
- mv(t0, aligned_mask - (int)os::vm_page_size());
- andr(hdr, hdr, t0);
+ mv(temp, aligned_mask - (int)os::vm_page_size());
+ andr(hdr, hdr, temp);
// for recursive locking, the result is zero => save it in the displaced header
// location (null in the displaced hdr location indicates recursive locking)
sd(hdr, Address(disp_hdr, 0));
@@ -115,10 +115,10 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
return null_check_offset;
}
-void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case) {
+void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_hdr, Register temp, Label& slow_case) {
const int aligned_mask = BytesPerWord - 1;
const int hdr_offset = oopDesc::mark_offset_in_bytes();
- assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
+ assert_different_registers(hdr, obj, disp_hdr, temp, t0, t1);
Label done;
if (LockingMode != LM_LIGHTWEIGHT) {
@@ -135,9 +135,9 @@ void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_
if (LockingMode == LM_LIGHTWEIGHT) {
ld(hdr, Address(obj, oopDesc::mark_offset_in_bytes()));
- test_bit(t0, hdr, exact_log2(markWord::monitor_value));
- bnez(t0, slow_case, /* is_far */ true);
- lightweight_unlock(obj, hdr, t0, t1, slow_case);
+ test_bit(temp, hdr, exact_log2(markWord::monitor_value));
+ bnez(temp, slow_case, /* is_far */ true);
+ lightweight_unlock(obj, hdr, temp, t1, slow_case);
} else if (LockingMode == LM_LEGACY) {
// test if object header is pointing to the displaced header, and if so, restore
// the displaced header in the object - if the object header is not pointing to
@@ -145,8 +145,8 @@ void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_
// if the object header was not pointing to the displaced header,
// we do unlocking via runtime call
if (hdr_offset) {
- la(t0, Address(obj, hdr_offset));
- cmpxchgptr(disp_hdr, hdr, t0, t1, done, &slow_case);
+ la(temp, Address(obj, hdr_offset));
+ cmpxchgptr(disp_hdr, hdr, temp, t1, done, &slow_case);
} else {
cmpxchgptr(disp_hdr, hdr, obj, t1, done, &slow_case);
}
diff --git a/src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.hpp b/src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.hpp
index 738dac78f9df3..b737a438511c8 100644
--- a/src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.hpp
+++ b/src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.hpp
@@ -59,14 +59,16 @@ using MacroAssembler::null_check;
// hdr : must be x10, contents destroyed
// obj : must point to the object to lock, contents preserved
// disp_hdr: must point to the displaced header location, contents preserved
+ // temp : temporary register, must not be scratch register t0 or t1
// returns code offset at which to add null check debug information
- int lock_object (Register swap, Register obj, Register disp_hdr, Label& slow_case);
+ int lock_object(Register swap, Register obj, Register disp_hdr, Register temp, Label& slow_case);
// unlocking
// hdr : contents destroyed
// obj : must point to the object to lock, contents preserved
// disp_hdr: must be x10 & must point to the displaced header location, contents destroyed
- void unlock_object(Register swap, Register obj, Register lock, Label& slow_case);
+ // temp : temporary register, must not be scratch register t0 or t1
+ void unlock_object(Register swap, Register obj, Register lock, Register temp, Label& slow_case);
void initialize_object(
Register obj, // result: pointer to object after successful allocation
diff --git a/src/hotspot/cpu/riscv/c2_CodeStubs_riscv.cpp b/src/hotspot/cpu/riscv/c2_CodeStubs_riscv.cpp
index e9556fe4dcf9f..d1c66ce1da76a 100644
--- a/src/hotspot/cpu/riscv/c2_CodeStubs_riscv.cpp
+++ b/src/hotspot/cpu/riscv/c2_CodeStubs_riscv.cpp
@@ -60,10 +60,13 @@ int C2EntryBarrierStub::max_size() const {
void C2EntryBarrierStub::emit(C2_MacroAssembler& masm) {
__ bind(entry());
+ RuntimeAddress target(StubRoutines::method_entry_barrier());
+ __ relocate(target.rspec(), [&] {
+ int32_t offset;
+ __ la_patchable(t0, target, offset);
+ __ jalr(ra, t0, offset);
+ });
- int32_t offset = 0;
- __ movptr(t0, StubRoutines::riscv::method_entry_barrier(), offset);
- __ jalr(ra, t0, offset);
__ j(continuation());
// make guard value 4-byte aligned so that it can be accessed by atomic instructions on RISC-V
diff --git a/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp b/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp
index 9f70d28af13bc..647f56db73eed 100644
--- a/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp
+++ b/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp
@@ -43,8 +43,8 @@
#define BIND(label) bind(label); BLOCK_COMMENT(#label ":")
-void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register tmp1Reg,
- Register tmp2Reg) {
+void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg,
+ Register tmp1Reg, Register tmp2Reg, Register tmp3Reg) {
// Use cr register to indicate the fast_lock result: zero for success; non-zero for failure.
Register flag = t1;
Register oop = objectReg;
@@ -55,7 +55,7 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
Label object_has_monitor;
Label count, no_count;
- assert_different_registers(oop, box, tmp, disp_hdr, t0);
+ assert_different_registers(oop, box, tmp, disp_hdr, flag, tmp3Reg, t0);
// Load markWord from object into displaced_header.
ld(disp_hdr, Address(oop, oopDesc::mark_offset_in_bytes()));
@@ -109,7 +109,7 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
} else {
assert(LockingMode == LM_LIGHTWEIGHT, "");
Label slow;
- lightweight_lock(oop, disp_hdr, tmp, t0, slow);
+ lightweight_lock(oop, disp_hdr, tmp, tmp3Reg, slow);
// Indicate success on completion.
mv(flag, zr);
@@ -157,8 +157,8 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
bind(no_count);
}
-void C2_MacroAssembler::fast_unlock(Register objectReg, Register boxReg, Register tmp1Reg,
- Register tmp2Reg) {
+void C2_MacroAssembler::fast_unlock(Register objectReg, Register boxReg,
+ Register tmp1Reg, Register tmp2Reg) {
// Use cr register to indicate the fast_unlock result: zero for success; non-zero for failure.
Register flag = t1;
Register oop = objectReg;
@@ -169,7 +169,7 @@ void C2_MacroAssembler::fast_unlock(Register objectReg, Register boxReg, Registe
Label object_has_monitor;
Label count, no_count;
- assert_different_registers(oop, box, tmp, disp_hdr, flag);
+ assert_different_registers(oop, box, tmp, disp_hdr, flag, t0);
if (LockingMode == LM_LEGACY) {
// Find the lock address and load the displaced header from the stack.
diff --git a/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.hpp b/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.hpp
index 0e2d7d3fb04a0..f36615809c0ee 100644
--- a/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.hpp
+++ b/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.hpp
@@ -45,7 +45,7 @@
public:
// Code used by cmpFastLock and cmpFastUnlock mach instructions in .ad file.
// See full description in macroAssembler_riscv.cpp.
- void fast_lock(Register object, Register box, Register tmp1, Register tmp2);
+ void fast_lock(Register object, Register box, Register tmp1, Register tmp2, Register tmp3);
void fast_unlock(Register object, Register box, Register tmp1, Register tmp2);
void string_compare(Register str1, Register str2,
diff --git a/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp b/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp
index ed045c37a6ffa..a4440890b0961 100644
--- a/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp
+++ b/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp
@@ -308,9 +308,13 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slo
Label skip_barrier;
__ beq(t0, t1, skip_barrier);
- int32_t offset = 0;
- __ movptr(t0, StubRoutines::riscv::method_entry_barrier(), offset);
- __ jalr(ra, t0, offset);
+ RuntimeAddress target(StubRoutines::method_entry_barrier());
+ __ relocate(target.rspec(), [&] {
+ int32_t offset;
+ __ la_patchable(t0, target, offset);
+ __ jalr(ra, t0, offset);
+ });
+
__ j(skip_barrier);
__ bind(local_guard);
diff --git a/src/hotspot/cpu/riscv/interp_masm_riscv.cpp b/src/hotspot/cpu/riscv/interp_masm_riscv.cpp
index 18ec889b932ed..1240566e26cc4 100644
--- a/src/hotspot/cpu/riscv/interp_masm_riscv.cpp
+++ b/src/hotspot/cpu/riscv/interp_masm_riscv.cpp
@@ -727,7 +727,7 @@ void InterpreterMacroAssembler::remove_activation(
//
// Kills:
// x10
-// c_rarg0, c_rarg1, c_rarg2, c_rarg3, .. (param regs)
+// c_rarg0, c_rarg1, c_rarg2, c_rarg3, c_rarg4, c_rarg5, .. (param regs)
// t0, t1 (temp regs)
void InterpreterMacroAssembler::lock_object(Register lock_reg)
{
@@ -742,6 +742,8 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
const Register swap_reg = x10;
const Register tmp = c_rarg2;
const Register obj_reg = c_rarg3; // Will contain the oop
+ const Register tmp2 = c_rarg4;
+ const Register tmp3 = c_rarg5;
const int obj_offset = in_bytes(BasicObjectLock::obj_offset());
const int lock_offset = in_bytes(BasicObjectLock::lock_offset());
@@ -762,7 +764,7 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
if (LockingMode == LM_LIGHTWEIGHT) {
ld(tmp, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
- lightweight_lock(obj_reg, tmp, t0, t1, slow_case);
+ lightweight_lock(obj_reg, tmp, tmp2, tmp3, slow_case);
j(count);
} else if (LockingMode == LM_LEGACY) {
// Load (object->mark() | 1) into swap_reg
@@ -826,7 +828,7 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
//
// Kills:
// x10
-// c_rarg0, c_rarg1, c_rarg2, c_rarg3, ... (param regs)
+// c_rarg0, c_rarg1, c_rarg2, c_rarg3, c_rarg4, ... (param regs)
// t0, t1 (temp regs)
void InterpreterMacroAssembler::unlock_object(Register lock_reg)
{
@@ -840,6 +842,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg)
const Register swap_reg = x10;
const Register header_reg = c_rarg2; // Will contain the old oopMark
const Register obj_reg = c_rarg3; // Will contain the oop
+ const Register tmp_reg = c_rarg4; // Temporary used by lightweight_unlock
save_bcp(); // Save in case of exception
@@ -875,7 +878,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg)
ld(header_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
test_bit(t0, header_reg, exact_log2(markWord::monitor_value));
bnez(t0, slow_case);
- lightweight_unlock(obj_reg, header_reg, swap_reg, t0, slow_case);
+ lightweight_unlock(obj_reg, header_reg, swap_reg, tmp_reg, slow_case);
j(count);
bind(slow_case);
diff --git a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
index 14eb294cc0233..5201486c8c634 100644
--- a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
+++ b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
@@ -2048,6 +2048,23 @@ void MacroAssembler::cmp_klass(Register oop, Register trial_klass, Register tmp1
beq(trial_klass, tmp1, L);
}
+// Multiply and multiply-accumulate unsigned 64-bit registers.
+void MacroAssembler::wide_mul(Register prod_lo, Register prod_hi, Register n, Register m) {
+ assert_different_registers(prod_lo, prod_hi);
+
+ mul(prod_lo, n, m);
+ mulhu(prod_hi, n, m);
+}
+void MacroAssembler::wide_madd(Register sum_lo, Register sum_hi, Register n,
+ Register m, Register tmp1, Register tmp2) {
+ assert_different_registers(sum_lo, sum_hi);
+ assert_different_registers(sum_hi, tmp2);
+
+ wide_mul(tmp1, tmp2, n, m);
+ cad(sum_lo, sum_lo, tmp1, tmp1); // Add tmp1 to sum_lo with carry output to tmp1
+ adc(sum_hi, sum_hi, tmp2, tmp1); // Add tmp2 with carry to sum_hi
+}
+
// Move an oop into a register.
void MacroAssembler::movoop(Register dst, jobject obj) {
int oop_index;
@@ -4701,7 +4718,7 @@ void MacroAssembler::test_bit(Register Rd, Register Rs, uint32_t bit_pos) {
// - tmp1, tmp2: temporary registers, will be destroyed
void MacroAssembler::lightweight_lock(Register obj, Register hdr, Register tmp1, Register tmp2, Label& slow) {
assert(LockingMode == LM_LIGHTWEIGHT, "only used with new lightweight locking");
- assert_different_registers(obj, hdr, tmp1, tmp2);
+ assert_different_registers(obj, hdr, tmp1, tmp2, t0);
// Check if we would have space on lock-stack for the object.
lwu(tmp1, Address(xthread, JavaThread::lock_stack_top_offset()));
@@ -4735,7 +4752,7 @@ void MacroAssembler::lightweight_lock(Register obj, Register hdr, Register tmp1,
// - tmp1, tmp2: temporary registers
void MacroAssembler::lightweight_unlock(Register obj, Register hdr, Register tmp1, Register tmp2, Label& slow) {
assert(LockingMode == LM_LIGHTWEIGHT, "only used with new lightweight locking");
- assert_different_registers(obj, hdr, tmp1, tmp2);
+ assert_different_registers(obj, hdr, tmp1, tmp2, t0);
#ifdef ASSERT
{
diff --git a/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp b/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp
index 7e1606136db7e..51bcba2f1a3fc 100644
--- a/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp
+++ b/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp
@@ -198,6 +198,10 @@ class MacroAssembler: public Assembler {
void store_klass(Register dst, Register src, Register tmp = t0);
void cmp_klass(Register oop, Register trial_klass, Register tmp1, Register tmp2, Label &L);
+ void wide_mul(Register prod_lo, Register prod_hi, Register n, Register m);
+ void wide_madd(Register sum_lo, Register sum_hi, Register n,
+ Register m, Register tmp1, Register tmp2);
+
void encode_klass_not_null(Register r, Register tmp = t0);
void decode_klass_not_null(Register r, Register tmp = t0);
void encode_klass_not_null(Register dst, Register src, Register tmp);
diff --git a/src/hotspot/cpu/riscv/riscv.ad b/src/hotspot/cpu/riscv/riscv.ad
index 6465691bbcb12..cb2d540322aee 100644
--- a/src/hotspot/cpu/riscv/riscv.ad
+++ b/src/hotspot/cpu/riscv/riscv.ad
@@ -10401,16 +10401,16 @@ instruct tlsLoadP(javaThread_RegP dst)
// inlined locking and unlocking
// using t1 as the 'flag' register to bridge the BoolNode producers and consumers
-instruct cmpFastLock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2)
+instruct cmpFastLock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2, iRegPNoSp tmp3)
%{
match(Set cr (FastLock object box));
- effect(TEMP tmp1, TEMP tmp2);
+ effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
ins_cost(LOAD_COST * 2 + STORE_COST * 3 + ALU_COST * 6 + BRANCH_COST * 3);
- format %{ "fastlock $object,$box\t! kills $tmp1,$tmp2, #@cmpFastLock" %}
+ format %{ "fastlock $object,$box\t! kills $tmp1,$tmp2,$tmp3, #@cmpFastLock" %}
ins_encode %{
- __ fast_lock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register);
+ __ fast_lock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
%}
ins_pipe(pipe_serial);
diff --git a/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp b/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
index e98f714ae0cd0..fa718e5b08e86 100644
--- a/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
+++ b/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
@@ -1648,6 +1648,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
const Register obj_reg = x9; // Will contain the oop
const Register lock_reg = x30; // Address of compiler lock object (BasicLock)
const Register old_hdr = x30; // value of old header at unlock time
+ const Register lock_tmp = x31; // Temporary used by lightweight_lock/unlock
const Register tmp = ra;
Label slow_path_lock;
@@ -1699,7 +1700,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
} else {
assert(LockingMode == LM_LIGHTWEIGHT, "");
__ ld(swap_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
- __ lightweight_lock(obj_reg, swap_reg, tmp, t0, slow_path_lock);
+ __ lightweight_lock(obj_reg, swap_reg, tmp, lock_tmp, slow_path_lock);
}
__ bind(count);
@@ -1827,7 +1828,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
__ ld(old_hdr, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
__ test_bit(t0, old_hdr, exact_log2(markWord::monitor_value));
__ bnez(t0, slow_path_unlock);
- __ lightweight_unlock(obj_reg, old_hdr, swap_reg, t0, slow_path_unlock);
+ __ lightweight_unlock(obj_reg, old_hdr, swap_reg, lock_tmp, slow_path_unlock);
__ decrement(Address(xthread, JavaThread::held_monitor_count_offset()));
}
diff --git a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp
index a2815db2b4e5a..e10357c4a5a50 100644
--- a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp
+++ b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp
@@ -4419,6 +4419,214 @@ class StubGenerator: public StubCodeGenerator {
return (address) start;
}
+#ifdef COMPILER2
+
+static const int64_t right_2_bits = right_n_bits(2);
+static const int64_t right_3_bits = right_n_bits(3);
+
+ // In sun.security.util.math.intpoly.IntegerPolynomial1305, integers
+ // are represented as long[5], with BITS_PER_LIMB = 26.
+ // Pack five 26-bit limbs into three 64-bit registers.
+ void poly1305_pack_26(Register dest0, Register dest1, Register dest2, Register src, Register tmp1, Register tmp2) {
+ assert_different_registers(dest0, dest1, dest2, src, tmp1, tmp2);
+
+ // The goal is to have 128-bit value in dest2:dest1:dest0
+ __ ld(dest0, Address(src, 0)); // 26 bits in dest0
+
+ __ ld(tmp1, Address(src, sizeof(jlong)));
+ __ slli(tmp1, tmp1, 26);
+ __ add(dest0, dest0, tmp1); // 52 bits in dest0
+
+ __ ld(tmp2, Address(src, 2 * sizeof(jlong)));
+ __ slli(tmp1, tmp2, 52);
+ __ add(dest0, dest0, tmp1); // dest0 is full
+
+ __ srli(dest1, tmp2, 12); // 14-bit in dest1
+
+ __ ld(tmp1, Address(src, 3 * sizeof(jlong)));
+ __ slli(tmp1, tmp1, 14);
+ __ add(dest1, dest1, tmp1); // 40-bit in dest1
+
+ __ ld(tmp1, Address(src, 4 * sizeof(jlong)));
+ __ slli(tmp2, tmp1, 40);
+ __ add(dest1, dest1, tmp2); // dest1 is full
+
+ if (dest2->is_valid()) {
+ __ srli(tmp1, tmp1, 24);
+ __ mv(dest2, tmp1); // 2 bits in dest2
+ } else {
+#ifdef ASSERT
+ Label OK;
+ __ srli(tmp1, tmp1, 24);
+ __ beq(zr, tmp1, OK); // 2 bits
+ __ stop("high bits of Poly1305 integer should be zero");
+ __ should_not_reach_here();
+ __ bind(OK);
+#endif
+ }
+ }
+
+ // As above, but return only a 128-bit integer, packed into two
+ // 64-bit registers.
+ void poly1305_pack_26(Register dest0, Register dest1, Register src, Register tmp1, Register tmp2) {
+ poly1305_pack_26(dest0, dest1, noreg, src, tmp1, tmp2);
+ }
+
+ // U_2:U_1:U_0: += (U_2 >> 2) * 5
+ void poly1305_reduce(Register U_2, Register U_1, Register U_0, Register tmp1, Register tmp2) {
+ assert_different_registers(U_2, U_1, U_0, tmp1, tmp2);
+
+ // First, U_2:U_1:U_0 += (U_2 >> 2)
+ __ srli(tmp1, U_2, 2);
+ __ cad(U_0, U_0, tmp1, tmp2); // Add tmp1 to U_0 with carry output to tmp2
+ __ andi(U_2, U_2, right_2_bits); // Clear U_2 except for the lowest two bits
+ __ cad(U_1, U_1, tmp2, tmp2); // Add carry to U_1 with carry output to tmp2
+ __ add(U_2, U_2, tmp2);
+
+ // Second, U_2:U_1:U_0 += (U_2 >> 2) << 2
+ __ slli(tmp1, tmp1, 2);
+ __ cad(U_0, U_0, tmp1, tmp2); // Add tmp1 to U_0 with carry output to tmp2
+ __ cad(U_1, U_1, tmp2, tmp2); // Add carry to U_1 with carry output to tmp2
+ __ add(U_2, U_2, tmp2);
+ }
+
+ // Poly1305, RFC 7539
+ // void com.sun.crypto.provider.Poly1305.processMultipleBlocks(byte[] input, int offset, int length, long[] aLimbs, long[] rLimbs)
+
+ // Arguments:
+ // c_rarg0: input_start -- where the input is stored
+ // c_rarg1: length
+ // c_rarg2: acc_start -- where the output will be stored
+ // c_rarg3: r_start -- where the randomly generated 128-bit key is stored
+
+ // See https://loup-vaillant.fr/tutorials/poly1305-design for a
+ // description of the tricks used to simplify and accelerate this
+ // computation.
+
+ address generate_poly1305_processBlocks() {
+ __ align(CodeEntryAlignment);
+ StubCodeMark mark(this, "StubRoutines", "poly1305_processBlocks");
+ address start = __ pc();
+ __ enter();
+ Label here;
+
+ RegSet saved_regs = RegSet::range(x18, x21);
+ RegSetIterator regs = (RegSet::range(x14, x31) - RegSet::range(x22, x27)).begin();
+ __ push_reg(saved_regs, sp);
+
+ // Arguments
+ const Register input_start = c_rarg0, length = c_rarg1, acc_start = c_rarg2, r_start = c_rarg3;
+
+ // R_n is the 128-bit randomly-generated key, packed into two
+ // registers. The caller passes this key to us as long[5], with
+ // BITS_PER_LIMB = 26.
+ const Register R_0 = *regs, R_1 = *++regs;
+ poly1305_pack_26(R_0, R_1, r_start, t1, t2);
+
+ // RR_n is (R_n >> 2) * 5
+ const Register RR_0 = *++regs, RR_1 = *++regs;
+ __ srli(t1, R_0, 2);
+ __ shadd(RR_0, t1, t1, t2, 2);
+ __ srli(t1, R_1, 2);
+ __ shadd(RR_1, t1, t1, t2, 2);
+
+ // U_n is the current checksum
+ const Register U_0 = *++regs, U_1 = *++regs, U_2 = *++regs;
+ poly1305_pack_26(U_0, U_1, U_2, acc_start, t1, t2);
+
+ static constexpr int BLOCK_LENGTH = 16;
+ Label DONE, LOOP;
+
+ __ mv(t1, BLOCK_LENGTH);
+ __ blt(length, t1, DONE); {
+ __ bind(LOOP);
+
+ // S_n is to be the sum of U_n and the next block of data
+ const Register S_0 = *++regs, S_1 = *++regs, S_2 = *++regs;
+ __ ld(S_0, Address(input_start, 0));
+ __ ld(S_1, Address(input_start, wordSize));
+
+ __ cad(S_0, S_0, U_0, t1); // Add U_0 to S_0 with carry output to t1
+ __ cadc(S_1, S_1, U_1, t1); // Add U_1 with carry to S_1 with carry output to t1
+ __ add(S_2, U_2, t1);
+
+ __ addi(S_2, S_2, 1);
+
+ const Register U_0HI = *++regs, U_1HI = *++regs;
+
+ // NB: this logic depends on some of the special properties of
+ // Poly1305 keys. In particular, because we know that the top
+ // four bits of R_0 and R_1 are zero, we can add together
+ // partial products without any risk of needing to propagate a
+ // carry out.
+ __ wide_mul(U_0, U_0HI, S_0, R_0);
+ __ wide_madd(U_0, U_0HI, S_1, RR_1, t1, t2);
+ __ wide_madd(U_0, U_0HI, S_2, RR_0, t1, t2);
+
+ __ wide_mul(U_1, U_1HI, S_0, R_1);
+ __ wide_madd(U_1, U_1HI, S_1, R_0, t1, t2);
+ __ wide_madd(U_1, U_1HI, S_2, RR_1, t1, t2);
+
+ __ andi(U_2, R_0, right_2_bits);
+ __ mul(U_2, S_2, U_2);
+
+ // Partial reduction mod 2**130 - 5
+ __ cad(U_1, U_1, U_0HI, t1); // Add U_0HI to U_1 with carry output to t1
+ __ adc(U_2, U_2, U_1HI, t1);
+ // Sum is now in U_2:U_1:U_0.
+
+ // U_2:U_1:U_0: += (U_2 >> 2) * 5
+ poly1305_reduce(U_2, U_1, U_0, t1, t2);
+
+ __ sub(length, length, BLOCK_LENGTH);
+ __ addi(input_start, input_start, BLOCK_LENGTH);
+ __ mv(t1, BLOCK_LENGTH);
+ __ bge(length, t1, LOOP);
+ }
+
+ // Further reduce modulo 2^130 - 5
+ poly1305_reduce(U_2, U_1, U_0, t1, t2);
+
+ // Unpack the sum into five 26-bit limbs and write to memory.
+ // First 26 bits is the first limb
+ __ slli(t1, U_0, 38); // Take lowest 26 bits
+ __ srli(t1, t1, 38);
+ __ sd(t1, Address(acc_start)); // First 26-bit limb
+
+ // 27-52 bits of U_0 is the second limb
+ __ slli(t1, U_0, 12); // Take next 27-52 bits
+ __ srli(t1, t1, 38);
+ __ sd(t1, Address(acc_start, sizeof (jlong))); // Second 26-bit limb
+
+ // Getting 53-64 bits of U_0 and 1-14 bits of U_1 in one register
+ __ srli(t1, U_0, 52);
+ __ slli(t2, U_1, 50);
+ __ srli(t2, t2, 38);
+ __ add(t1, t1, t2);
+ __ sd(t1, Address(acc_start, 2 * sizeof (jlong))); // Third 26-bit limb
+
+ // Storing 15-40 bits of U_1
+ __ slli(t1, U_1, 24); // Already used up 14 bits
+ __ srli(t1, t1, 38); // Clear all other bits from t1
+ __ sd(t1, Address(acc_start, 3 * sizeof (jlong))); // Fourth 26-bit limb
+
+ // Storing 41-64 bits of U_1 and first three bits from U_2 in one register
+ __ srli(t1, U_1, 40);
+ __ andi(t2, U_2, right_3_bits);
+ __ slli(t2, t2, 24);
+ __ add(t1, t1, t2);
+ __ sd(t1, Address(acc_start, 4 * sizeof (jlong))); // Fifth 26-bit limb
+
+ __ bind(DONE);
+ __ pop_reg(saved_regs, sp);
+ __ leave(); // Required for proper stackwalking
+ __ ret();
+
+ return start;
+ }
+
+#endif // COMPILER2
+
#if INCLUDE_JFR
static void jfr_prologue(address the_pc, MacroAssembler* _masm, Register thread) {
@@ -4605,7 +4813,7 @@ class StubGenerator: public StubCodeGenerator {
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
if (bs_nm != nullptr) {
- StubRoutines::riscv::_method_entry_barrier = generate_method_entry_barrier();
+ StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
}
StubRoutines::_upcall_stub_exception_handler = generate_upcall_stub_exception_handler();
@@ -4640,6 +4848,10 @@ class StubGenerator: public StubCodeGenerator {
StubRoutines::_montgomerySquare = g.generate_square();
}
+ if (UsePoly1305Intrinsics) {
+ StubRoutines::_poly1305_processBlocks = generate_poly1305_processBlocks();
+ }
+
if (UseRVVForBigIntegerShiftIntrinsics) {
StubRoutines::_bigIntegerLeftShiftWorker = generate_bigIntegerLeftShift();
StubRoutines::_bigIntegerRightShiftWorker = generate_bigIntegerRightShift();
diff --git a/src/hotspot/cpu/riscv/stubRoutines_riscv.cpp b/src/hotspot/cpu/riscv/stubRoutines_riscv.cpp
index dd72044b0ce6b..39068a9a026ac 100644
--- a/src/hotspot/cpu/riscv/stubRoutines_riscv.cpp
+++ b/src/hotspot/cpu/riscv/stubRoutines_riscv.cpp
@@ -53,6 +53,5 @@ address StubRoutines::riscv::_string_indexof_linear_ll = nullptr;
address StubRoutines::riscv::_string_indexof_linear_uu = nullptr;
address StubRoutines::riscv::_string_indexof_linear_ul = nullptr;
address StubRoutines::riscv::_large_byte_array_inflate = nullptr;
-address StubRoutines::riscv::_method_entry_barrier = nullptr;
bool StubRoutines::riscv::_completed = false;
diff --git a/src/hotspot/cpu/riscv/stubRoutines_riscv.hpp b/src/hotspot/cpu/riscv/stubRoutines_riscv.hpp
index fde88f5e30b62..7c604e8c11cc2 100644
--- a/src/hotspot/cpu/riscv/stubRoutines_riscv.hpp
+++ b/src/hotspot/cpu/riscv/stubRoutines_riscv.hpp
@@ -70,8 +70,6 @@ class riscv {
static address _string_indexof_linear_ul;
static address _large_byte_array_inflate;
- static address _method_entry_barrier;
-
static bool _completed;
public:
@@ -148,10 +146,6 @@ class riscv {
return _large_byte_array_inflate;
}
- static address method_entry_barrier() {
- return _method_entry_barrier;
- }
-
static bool complete() {
return _completed;
}
diff --git a/src/hotspot/cpu/riscv/vm_version_riscv.cpp b/src/hotspot/cpu/riscv/vm_version_riscv.cpp
index c450b3754df89..2f1fb5055f609 100644
--- a/src/hotspot/cpu/riscv/vm_version_riscv.cpp
+++ b/src/hotspot/cpu/riscv/vm_version_riscv.cpp
@@ -191,6 +191,10 @@ void VM_Version::initialize() {
FLAG_SET_DEFAULT(UseMD5Intrinsics, true);
}
+ if (FLAG_IS_DEFAULT(UsePoly1305Intrinsics)) {
+ FLAG_SET_DEFAULT(UsePoly1305Intrinsics, true);
+ }
+
if (FLAG_IS_DEFAULT(UseCopySignIntrinsic)) {
FLAG_SET_DEFAULT(UseCopySignIntrinsic, true);
}
diff --git a/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp b/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp
index 9613de903d9b3..480af074a4c1e 100644
--- a/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp
+++ b/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp
@@ -132,7 +132,7 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm) {
__ block_comment("nmethod_entry_barrier (nmethod_entry_barrier) {");
// Load jump addr:
- __ load_const(Z_R1_scratch, (uint64_t)StubRoutines::zarch::nmethod_entry_barrier()); // 2*6 bytes
+ __ load_const(Z_R1_scratch, (uint64_t)StubRoutines::method_entry_barrier()); // 2*6 bytes
// Load value from current java object:
__ z_lg(Z_R0_scratch, in_bytes(bs_nm->thread_disarmed_guard_value_offset()), Z_thread); // 6 bytes
diff --git a/src/hotspot/cpu/s390/stubGenerator_s390.cpp b/src/hotspot/cpu/s390/stubGenerator_s390.cpp
index 64d8d9fa978c8..db686158f2107 100644
--- a/src/hotspot/cpu/s390/stubGenerator_s390.cpp
+++ b/src/hotspot/cpu/s390/stubGenerator_s390.cpp
@@ -3015,7 +3015,7 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
- address generate_nmethod_entry_barrier() {
+ address generate_method_entry_barrier() {
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", "nmethod_entry_barrier");
@@ -3187,7 +3187,7 @@ class StubGenerator: public StubCodeGenerator {
// nmethod entry barriers for concurrent class unloading
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
if (bs_nm != nullptr) {
- StubRoutines::zarch::_nmethod_entry_barrier = generate_nmethod_entry_barrier();
+ StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
}
StubRoutines::_upcall_stub_exception_handler = generate_upcall_stub_exception_handler();
diff --git a/src/hotspot/cpu/s390/stubRoutines_s390.cpp b/src/hotspot/cpu/s390/stubRoutines_s390.cpp
index 711de63fdeafc..2a60f71557c71 100644
--- a/src/hotspot/cpu/s390/stubRoutines_s390.cpp
+++ b/src/hotspot/cpu/s390/stubRoutines_s390.cpp
@@ -38,8 +38,6 @@ address StubRoutines::zarch::_partial_subtype_check = nullptr;
// Comapct string intrinsics: Translate table for string inflate intrinsic. Used by trot instruction.
address StubRoutines::zarch::_trot_table_addr = nullptr;
-address StubRoutines::zarch::_nmethod_entry_barrier = nullptr;
-
int StubRoutines::zarch::_atomic_memory_operation_lock = StubRoutines::zarch::unlocked;
#define __ masm->
diff --git a/src/hotspot/cpu/s390/stubRoutines_s390.hpp b/src/hotspot/cpu/s390/stubRoutines_s390.hpp
index 68e6b3f2b47a4..7116d441715ad 100644
--- a/src/hotspot/cpu/s390/stubRoutines_s390.hpp
+++ b/src/hotspot/cpu/s390/stubRoutines_s390.hpp
@@ -80,8 +80,6 @@ class zarch {
static address _trot_table_addr;
static jlong _trot_table[TROT_COLUMN_SIZE];
- static address _nmethod_entry_barrier;
-
public:
// Global lock for everyone who needs to use atomic_compare_and_exchange
// or atomic_increment -- should probably use more locks for more
@@ -102,8 +100,6 @@ class zarch {
// Comapct string intrinsics: Translate table for string inflate intrinsic. Used by trot instruction.
static void generate_load_trot_table_addr(MacroAssembler* masm, Register table);
-
- static address nmethod_entry_barrier() { return _nmethod_entry_barrier; }
};
#endif // CPU_S390_STUBROUTINES_S390_HPP
diff --git a/src/hotspot/cpu/x86/c2_CodeStubs_x86.cpp b/src/hotspot/cpu/x86/c2_CodeStubs_x86.cpp
index cd5e87b29ec4c..b9b4e8af02c5f 100644
--- a/src/hotspot/cpu/x86/c2_CodeStubs_x86.cpp
+++ b/src/hotspot/cpu/x86/c2_CodeStubs_x86.cpp
@@ -69,7 +69,7 @@ int C2EntryBarrierStub::max_size() const {
void C2EntryBarrierStub::emit(C2_MacroAssembler& masm) {
__ bind(entry());
- __ call(RuntimeAddress(StubRoutines::x86::method_entry_barrier()));
+ __ call(RuntimeAddress(StubRoutines::method_entry_barrier()));
__ jmp(continuation(), false /* maybe_short */);
}
diff --git a/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp b/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp
index 6a7ac54f4734c..f09e1c9216206 100644
--- a/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp
+++ b/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp
@@ -402,7 +402,7 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slo
} else {
Label done;
__ jccb(Assembler::equal, done);
- __ call(RuntimeAddress(StubRoutines::x86::method_entry_barrier()));
+ __ call(RuntimeAddress(StubRoutines::method_entry_barrier()));
__ bind(done);
}
}
@@ -423,7 +423,7 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label*, La
__ cmpl_imm32(disarmed_addr, 0);
__ pop(tmp);
__ jcc(Assembler::equal, continuation);
- __ call(RuntimeAddress(StubRoutines::x86::method_entry_barrier()));
+ __ call(RuntimeAddress(StubRoutines::method_entry_barrier()));
__ bind(continuation);
}
#endif
diff --git a/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp b/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp
index d21233b258fb0..e6305ded69624 100644
--- a/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp
@@ -4218,7 +4218,7 @@ class StubGenerator: public StubCodeGenerator {
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
if (bs_nm != nullptr) {
- StubRoutines::x86::_method_entry_barrier = generate_method_entry_barrier();
+ StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
}
}
diff --git a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp
index 894f225d3bc79..c73e0759b57f7 100644
--- a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp
@@ -4052,7 +4052,7 @@ void StubGenerator::generate_final_stubs() {
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
if (bs_nm != nullptr) {
- StubRoutines::x86::_method_entry_barrier = generate_method_entry_barrier();
+ StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
}
if (UseVectorizedMismatchIntrinsic) {
diff --git a/src/hotspot/cpu/x86/stubRoutines_x86.hpp b/src/hotspot/cpu/x86/stubRoutines_x86.hpp
index 375cefd5e1df5..6c602324f3ef2 100644
--- a/src/hotspot/cpu/x86/stubRoutines_x86.hpp
+++ b/src/hotspot/cpu/x86/stubRoutines_x86.hpp
@@ -132,8 +132,6 @@ class x86 {
static address _verify_mxcsr_entry;
- static address _method_entry_barrier;
-
// masks and table for CRC32
static const uint64_t _crc_by128_masks[];
static const juint _crc_table[];
diff --git a/src/hotspot/cpu/x86/stubRoutines_x86_32.cpp b/src/hotspot/cpu/x86/stubRoutines_x86_32.cpp
index 0da5a3eca7db9..7916a3b36305a 100644
--- a/src/hotspot/cpu/x86/stubRoutines_x86_32.cpp
+++ b/src/hotspot/cpu/x86/stubRoutines_x86_32.cpp
@@ -32,7 +32,6 @@
// a description of how to extend it, see the stubRoutines.hpp file.
address StubRoutines::x86::_verify_fpu_cntrl_wrd_entry = nullptr;
-address StubRoutines::x86::_method_entry_barrier = nullptr;
address StubRoutines::x86::_d2i_wrapper = nullptr;
address StubRoutines::x86::_d2l_wrapper = nullptr;
diff --git a/src/hotspot/cpu/x86/stubRoutines_x86_64.cpp b/src/hotspot/cpu/x86/stubRoutines_x86_64.cpp
index 4287580e7f921..417b32eb4a64c 100644
--- a/src/hotspot/cpu/x86/stubRoutines_x86_64.cpp
+++ b/src/hotspot/cpu/x86/stubRoutines_x86_64.cpp
@@ -44,5 +44,4 @@ address StubRoutines::x86::_float_sign_mask = nullptr;
address StubRoutines::x86::_float_sign_flip = nullptr;
address StubRoutines::x86::_double_sign_mask = nullptr;
address StubRoutines::x86::_double_sign_flip = nullptr;
-address StubRoutines::x86::_method_entry_barrier = nullptr;
diff --git a/src/hotspot/cpu/zero/vm_version_zero.cpp b/src/hotspot/cpu/zero/vm_version_zero.cpp
index 3d17e159a619c..07f99d647ac60 100644
--- a/src/hotspot/cpu/zero/vm_version_zero.cpp
+++ b/src/hotspot/cpu/zero/vm_version_zero.cpp
@@ -145,6 +145,12 @@ void VM_Version::initialize_cpu_information(void) {
return;
}
+ // Supports 8-byte cmpxchg with compiler built-ins.
+ // These built-ins are supposed to be implemented on
+ // all platforms (even if not natively), so we claim
+ // the support unconditionally.
+ _supports_cx8 = true;
+
_no_of_cores = os::processor_count();
_no_of_threads = _no_of_cores;
_no_of_sockets = _no_of_cores;
diff --git a/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp b/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp
index 4d5d97fddcd7e..37cd93e765d97 100644
--- a/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp
+++ b/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp
@@ -31,135 +31,6 @@
// Implementation of class atomic
-#ifdef M68K
-
-/*
- * __m68k_cmpxchg
- *
- * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
- * Returns newval on success and oldval if no exchange happened.
- * This implementation is processor specific and works on
- * 68020 68030 68040 and 68060.
- *
- * It will not work on ColdFire, 68000 and 68010 since they lack the CAS
- * instruction.
- * Using a kernelhelper would be better for arch complete implementation.
- *
- */
-
-static inline int __m68k_cmpxchg(int oldval, int newval, volatile int *ptr) {
- int ret;
- __asm __volatile ("cas%.l %0,%2,%1"
- : "=d" (ret), "+m" (*(ptr))
- : "d" (newval), "0" (oldval));
- return ret;
-}
-
-/* Perform an atomic compare and swap: if the current value of `*PTR'
- is OLDVAL, then write NEWVAL into `*PTR'. Return the contents of
- `*PTR' before the operation.*/
-static inline int m68k_compare_and_swap(int newval,
- volatile int *ptr,
- int oldval) {
- for (;;) {
- int prev = *ptr;
- if (prev != oldval)
- return prev;
-
- if (__m68k_cmpxchg (prev, newval, ptr) == newval)
- // Success.
- return prev;
-
- // We failed even though prev == oldval. Try again.
- }
-}
-
-/* Atomically add an int to memory. */
-static inline int m68k_add_then_fetch(int add_value, volatile int *ptr) {
- for (;;) {
- // Loop until success.
-
- int prev = *ptr;
-
- if (__m68k_cmpxchg (prev, prev + add_value, ptr) == prev + add_value)
- return prev + add_value;
- }
-}
-
-/* Atomically write VALUE into `*PTR' and returns the previous
- contents of `*PTR'. */
-static inline int m68k_lock_test_and_set(int newval, volatile int *ptr) {
- for (;;) {
- // Loop until success.
- int prev = *ptr;
-
- if (__m68k_cmpxchg (prev, newval, ptr) == prev)
- return prev;
- }
-}
-#endif // M68K
-
-#ifdef ARM
-
-/*
- * __kernel_cmpxchg
- *
- * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
- * Return zero if *ptr was changed or non-zero if no exchange happened.
- * The C flag is also set if *ptr was changed to allow for assembly
- * optimization in the calling code.
- *
- */
-
-typedef int (__kernel_cmpxchg_t)(int oldval, int newval, volatile int *ptr);
-#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0)
-
-
-
-/* Perform an atomic compare and swap: if the current value of `*PTR'
- is OLDVAL, then write NEWVAL into `*PTR'. Return the contents of
- `*PTR' before the operation.*/
-static inline int arm_compare_and_swap(int newval,
- volatile int *ptr,
- int oldval) {
- for (;;) {
- int prev = *ptr;
- if (prev != oldval)
- return prev;
-
- if (__kernel_cmpxchg (prev, newval, ptr) == 0)
- // Success.
- return prev;
-
- // We failed even though prev == oldval. Try again.
- }
-}
-
-/* Atomically add an int to memory. */
-static inline int arm_add_then_fetch(int add_value, volatile int *ptr) {
- for (;;) {
- // Loop until a __kernel_cmpxchg succeeds.
-
- int prev = *ptr;
-
- if (__kernel_cmpxchg (prev, prev + add_value, ptr) == 0)
- return prev + add_value;
- }
-}
-
-/* Atomically write VALUE into `*PTR' and returns the previous
- contents of `*PTR'. */
-static inline int arm_lock_test_and_set(int newval, volatile int *ptr) {
- for (;;) {
- // Loop until a __kernel_cmpxchg succeeds.
- int prev = *ptr;
-
- if (__kernel_cmpxchg (prev, newval, ptr) == 0)
- return prev;
- }
-}
-#endif // ARM
-
template
struct Atomic::PlatformAdd {
template
@@ -178,17 +49,9 @@ inline D Atomic::PlatformAdd<4>::add_then_fetch(D volatile* dest, I add_value,
STATIC_ASSERT(4 == sizeof(I));
STATIC_ASSERT(4 == sizeof(D));
-#ifdef ARM
- return add_using_helper(arm_add_then_fetch, dest, add_value);
-#else
-#ifdef M68K
- return add_using_helper(m68k_add_then_fetch, dest, add_value);
-#else
D res = __atomic_add_fetch(dest, add_value, __ATOMIC_RELEASE);
FULL_MEM_BARRIER;
return res;
-#endif // M68K
-#endif // ARM
}
template<>
@@ -209,26 +72,10 @@ inline T Atomic::PlatformXchg<4>::operator()(T volatile* dest,
T exchange_value,
atomic_memory_order order) const {
STATIC_ASSERT(4 == sizeof(T));
-#ifdef ARM
- return xchg_using_helper(arm_lock_test_and_set, dest, exchange_value);
-#else
-#ifdef M68K
- return xchg_using_helper(m68k_lock_test_and_set, dest, exchange_value);
-#else
- // __sync_lock_test_and_set is a bizarrely named atomic exchange
- // operation. Note that some platforms only support this with the
- // limitation that the only valid value to store is the immediate
- // constant 1. There is a test for this in JNI_CreateJavaVM().
- T result = __sync_lock_test_and_set (dest, exchange_value);
- // All atomic operations are expected to be full memory barriers
- // (see atomic.hpp). However, __sync_lock_test_and_set is not
- // a full memory barrier, but an acquire barrier. Hence, this added
- // barrier. Some platforms (notably ARM) have peculiarities with
- // their barrier implementations, delegate it to OrderAccess.
- OrderAccess::fence();
+ FULL_MEM_BARRIER;
+ T result = __atomic_exchange_n(dest, exchange_value, __ATOMIC_RELAXED);
+ FULL_MEM_BARRIER;
return result;
-#endif // M68K
-#endif // ARM
}
template<>
@@ -237,8 +84,9 @@ inline T Atomic::PlatformXchg<8>::operator()(T volatile* dest,
T exchange_value,
atomic_memory_order order) const {
STATIC_ASSERT(8 == sizeof(T));
- T result = __sync_lock_test_and_set (dest, exchange_value);
- OrderAccess::fence();
+ FULL_MEM_BARRIER;
+ T result = __atomic_exchange_n(dest, exchange_value, __ATOMIC_RELAXED);
+ FULL_MEM_BARRIER;
return result;
}
@@ -253,20 +101,12 @@ inline T Atomic::PlatformCmpxchg<4>::operator()(T volatile* dest,
T exchange_value,
atomic_memory_order order) const {
STATIC_ASSERT(4 == sizeof(T));
-#ifdef ARM
- return cmpxchg_using_helper(arm_compare_and_swap, dest, compare_value, exchange_value);
-#else
-#ifdef M68K
- return cmpxchg_using_helper(m68k_compare_and_swap, dest, compare_value, exchange_value);
-#else
T value = compare_value;
FULL_MEM_BARRIER;
__atomic_compare_exchange(dest, &value, &exchange_value, /*weak*/false,
__ATOMIC_RELAXED, __ATOMIC_RELAXED);
FULL_MEM_BARRIER;
return value;
-#endif // M68K
-#endif // ARM
}
template<>
diff --git a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp
index 3e95d404c9222..012f85ac0ff4a 100644
--- a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp
+++ b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp
@@ -311,22 +311,6 @@ extern "C" {
}
};
-/////////////////////////////////////////////////////////////////////////////
-// Implementations of atomic operations not supported by processors.
-// -- http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Atomic-Builtins.html
-
-#ifndef _LP64
-extern "C" {
- long long unsigned int __sync_val_compare_and_swap_8(
- volatile void *ptr,
- long long unsigned int oldval,
- long long unsigned int newval) {
- ShouldNotCallThis();
- return 0; // silence compiler warnings
- }
-};
-#endif // !_LP64
-
#ifndef PRODUCT
void os::verify_stack_alignment() {
}
diff --git a/src/hotspot/os_cpu/linux_zero/atomic_linux_zero.hpp b/src/hotspot/os_cpu/linux_zero/atomic_linux_zero.hpp
index 7b7beba656514..6409942c07de9 100644
--- a/src/hotspot/os_cpu/linux_zero/atomic_linux_zero.hpp
+++ b/src/hotspot/os_cpu/linux_zero/atomic_linux_zero.hpp
@@ -71,17 +71,9 @@ inline T Atomic::PlatformXchg<4>::operator()(T volatile* dest,
T exchange_value,
atomic_memory_order order) const {
STATIC_ASSERT(4 == sizeof(T));
- // __sync_lock_test_and_set is a bizarrely named atomic exchange
- // operation. Note that some platforms only support this with the
- // limitation that the only valid value to store is the immediate
- // constant 1. There is a test for this in JNI_CreateJavaVM().
- T result = __sync_lock_test_and_set (dest, exchange_value);
- // All atomic operations are expected to be full memory barriers
- // (see atomic.hpp). However, __sync_lock_test_and_set is not
- // a full memory barrier, but an acquire barrier. Hence, this added
- // barrier. Some platforms (notably ARM) have peculiarities with
- // their barrier implementations, delegate it to OrderAccess.
- OrderAccess::fence();
+ FULL_MEM_BARRIER;
+ T result = __atomic_exchange_n(dest, exchange_value, __ATOMIC_RELAXED);
+ FULL_MEM_BARRIER;
return result;
}
@@ -91,8 +83,9 @@ inline T Atomic::PlatformXchg<8>::operator()(T volatile* dest,
T exchange_value,
atomic_memory_order order) const {
STATIC_ASSERT(8 == sizeof(T));
- T result = __sync_lock_test_and_set (dest, exchange_value);
- OrderAccess::fence();
+ FULL_MEM_BARRIER;
+ T result = __atomic_exchange_n(dest, exchange_value, __ATOMIC_RELAXED);
+ FULL_MEM_BARRIER;
return result;
}
diff --git a/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp b/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp
index 26a620cc81906..1ce73588524c1 100644
--- a/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp
+++ b/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp
@@ -471,22 +471,6 @@ extern "C" {
}
};
-/////////////////////////////////////////////////////////////////////////////
-// Implementations of atomic operations not supported by processors.
-// -- http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Atomic-Builtins.html
-
-#ifndef _LP64
-extern "C" {
- long long unsigned int __sync_val_compare_and_swap_8(
- volatile void *ptr,
- long long unsigned int oldval,
- long long unsigned int newval) {
- ShouldNotCallThis();
- return 0; // silence compiler warnings
- }
-};
-#endif // !_LP64
-
#ifndef PRODUCT
void os::verify_stack_alignment() {
}
diff --git a/src/hotspot/share/cds/archiveBuilder.cpp b/src/hotspot/share/cds/archiveBuilder.cpp
index 0bc204d270ba3..d563e8f264953 100644
--- a/src/hotspot/share/cds/archiveBuilder.cpp
+++ b/src/hotspot/share/cds/archiveBuilder.cpp
@@ -239,7 +239,7 @@ void ArchiveBuilder::gather_klasses_and_symbols() {
#endif
doit.finish();
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
// To ensure deterministic contents in the static archive, we need to ensure that
// we iterate the MetaspaceObjs in a deterministic order. It doesn't matter where
// the MetaspaceObjs are located originally, as they are copied sequentially into
@@ -339,7 +339,7 @@ address ArchiveBuilder::reserve_buffer() {
// The bottom of the archive (that I am writing now) should be mapped at this address by default.
address my_archive_requested_bottom;
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
my_archive_requested_bottom = _requested_static_archive_bottom;
} else {
_mapped_static_archive_bottom = (address)MetaspaceObj::shared_metaspace_base();
@@ -367,7 +367,7 @@ address ArchiveBuilder::reserve_buffer() {
MetaspaceShared::unrecoverable_writing_error();
}
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
// We don't want any valid object to be at the very bottom of the archive.
// See ArchivePtrMarker::mark_pointer().
rw_region()->allocate(16);
@@ -642,7 +642,7 @@ void ArchiveBuilder::make_shallow_copy(DumpRegion *dump_region, SourceObjInfo* s
memcpy(dest, src, bytes);
// Update the hash of buffered sorted symbols for static dump so that the symbols have deterministic contents
- if (DumpSharedSpaces && (src_info->msotype() == MetaspaceObj::SymbolType)) {
+ if (CDSConfig::is_dumping_static_archive() && (src_info->msotype() == MetaspaceObj::SymbolType)) {
Symbol* buffered_symbol = (Symbol*)dest;
assert(((Symbol*)src)->is_permanent(), "archived symbols must be permanent");
buffered_symbol->update_identity_hash();
@@ -825,7 +825,7 @@ uintx ArchiveBuilder::any_to_offset(address p) const {
#if INCLUDE_CDS_JAVA_HEAP
narrowKlass ArchiveBuilder::get_requested_narrow_klass(Klass* k) {
- assert(DumpSharedSpaces, "sanity");
+ assert(CDSConfig::is_dumping_heap(), "sanity");
k = get_buffered_klass(k);
Klass* requested_k = to_requested(k);
address narrow_klass_base = _requested_static_archive_bottom; // runtime encoding base == runtime mapping start
@@ -916,7 +916,7 @@ void ArchiveBuilder::relocate_to_requested() {
size_t my_archive_size = buffer_top() - buffer_bottom();
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
_requested_static_archive_top = _requested_static_archive_bottom + my_archive_size;
RelocateBufferToRequested patcher(this);
patcher.doit();
@@ -1238,7 +1238,7 @@ class ArchiveBuilder::CDSMapLogger : AllStatic {
static void log(ArchiveBuilder* builder, FileMapInfo* mapinfo,
ArchiveHeapInfo* heap_info,
char* bitmap, size_t bitmap_size_in_bytes) {
- log_info(cds, map)("%s CDS archive map for %s", DumpSharedSpaces ? "Static" : "Dynamic", mapinfo->full_path());
+ log_info(cds, map)("%s CDS archive map for %s", CDSConfig::is_dumping_static_archive() ? "Static" : "Dynamic", mapinfo->full_path());
address header = address(mapinfo->header());
address header_end = header + mapinfo->header()->header_size();
diff --git a/src/hotspot/share/cds/cdsConfig.cpp b/src/hotspot/share/cds/cdsConfig.cpp
index 20e407defafd2..6261321fc1fe0 100644
--- a/src/hotspot/share/cds/cdsConfig.cpp
+++ b/src/hotspot/share/cds/cdsConfig.cpp
@@ -29,6 +29,7 @@
#include "classfile/classLoaderDataShared.hpp"
#include "logging/log.hpp"
+bool CDSConfig::_is_dumping_static_archive = false;
bool CDSConfig::_is_dumping_dynamic_archive = false;
// The ability to dump the FMG depends on many factors checked by
@@ -37,10 +38,6 @@ bool CDSConfig::_is_dumping_dynamic_archive = false;
bool CDSConfig::_dumping_full_module_graph_disabled = false;
bool CDSConfig::_loading_full_module_graph_disabled = false;
-bool CDSConfig::is_dumping_static_archive() {
- return DumpSharedSpaces;
-}
-
#if INCLUDE_CDS_JAVA_HEAP
bool CDSConfig::is_dumping_heap() {
// heap dump is not supported in dynamic dump
diff --git a/src/hotspot/share/cds/cdsConfig.hpp b/src/hotspot/share/cds/cdsConfig.hpp
index ff75de741a6ca..cc3c5556d0abe 100644
--- a/src/hotspot/share/cds/cdsConfig.hpp
+++ b/src/hotspot/share/cds/cdsConfig.hpp
@@ -30,6 +30,7 @@
class CDSConfig : public AllStatic {
#if INCLUDE_CDS
+ static bool _is_dumping_static_archive;
static bool _is_dumping_dynamic_archive;
static bool _dumping_full_module_graph_disabled;
static bool _loading_full_module_graph_disabled;
@@ -38,7 +39,8 @@ class CDSConfig : public AllStatic {
public:
// Basic CDS features
static bool is_dumping_archive() { return is_dumping_static_archive() || is_dumping_dynamic_archive(); }
- static bool is_dumping_static_archive() NOT_CDS_RETURN_(false);
+ static bool is_dumping_static_archive() { return CDS_ONLY(_is_dumping_static_archive) NOT_CDS(false); }
+ static void enable_dumping_static_archive() { CDS_ONLY(_is_dumping_static_archive = true); }
static bool is_dumping_dynamic_archive() { return CDS_ONLY(_is_dumping_dynamic_archive) NOT_CDS(false); }
static void enable_dumping_dynamic_archive() { CDS_ONLY(_is_dumping_dynamic_archive = true); }
static void disable_dumping_dynamic_archive() { CDS_ONLY(_is_dumping_dynamic_archive = false); }
diff --git a/src/hotspot/share/cds/classPrelinker.cpp b/src/hotspot/share/cds/classPrelinker.cpp
index abc1e62ec1f35..21946ebe9c0a8 100644
--- a/src/hotspot/share/cds/classPrelinker.cpp
+++ b/src/hotspot/share/cds/classPrelinker.cpp
@@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "cds/archiveBuilder.hpp"
+#include "cds/cdsConfig.hpp"
#include "cds/classPrelinker.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmClasses.hpp"
@@ -182,13 +183,10 @@ Klass* ClassPrelinker::maybe_resolve_class(constantPoolHandle cp, int cp_index,
#if INCLUDE_CDS_JAVA_HEAP
void ClassPrelinker::resolve_string(constantPoolHandle cp, int cp_index, TRAPS) {
- if (!DumpSharedSpaces) {
- // The archive heap is not supported for the dynamic archive.
- return;
+ if (CDSConfig::is_dumping_heap()) {
+ int cache_index = cp->cp_to_object_index(cp_index);
+ ConstantPool::string_at_impl(cp, cp_index, cache_index, CHECK);
}
-
- int cache_index = cp->cp_to_object_index(cp_index);
- ConstantPool::string_at_impl(cp, cp_index, cache_index, CHECK);
}
#endif
diff --git a/src/hotspot/share/cds/cppVtables.cpp b/src/hotspot/share/cds/cppVtables.cpp
index e737052621e59..c339ce9c0deaa 100644
--- a/src/hotspot/share/cds/cppVtables.cpp
+++ b/src/hotspot/share/cds/cppVtables.cpp
@@ -216,7 +216,7 @@ void CppVtableCloner::init_orig_cpp_vtptr(int kind) {
CppVtableInfo** CppVtables::_index = nullptr;
char* CppVtables::dumptime_init(ArchiveBuilder* builder) {
- assert(DumpSharedSpaces, "must");
+ assert(CDSConfig::is_dumping_static_archive(), "cpp tables are only dumped into static archive");
size_t vtptrs_bytes = _num_cloned_vtable_kinds * sizeof(CppVtableInfo*);
_index = (CppVtableInfo**)builder->rw_region()->allocate(vtptrs_bytes);
@@ -284,7 +284,7 @@ intptr_t* CppVtables::get_archived_vtable(MetaspaceObj::Type msotype, address ob
}
void CppVtables::zero_archived_vtables() {
- assert(DumpSharedSpaces, "dump-time only");
+ assert(CDSConfig::is_dumping_static_archive(), "cpp tables are only dumped into static archive");
for (int kind = 0; kind < _num_cloned_vtable_kinds; kind ++) {
_index[kind]->zero();
}
diff --git a/src/hotspot/share/cds/dumpTimeClassInfo.hpp b/src/hotspot/share/cds/dumpTimeClassInfo.hpp
index 30b64fcb2ad91..5ba79e54c79b9 100644
--- a/src/hotspot/share/cds/dumpTimeClassInfo.hpp
+++ b/src/hotspot/share/cds/dumpTimeClassInfo.hpp
@@ -24,8 +24,10 @@
#ifndef SHARE_CDS_DUMPTIMECLASSINFO_HPP
#define SHARE_CDS_DUMPTIMECLASSINFO_HPP
+
#include "cds/archiveBuilder.hpp"
#include "cds/archiveUtils.hpp"
+#include "cds/cdsConfig.hpp"
#include "cds/metaspaceShared.hpp"
#include "classfile/compactHashtable.hpp"
#include "memory/metaspaceClosure.hpp"
@@ -217,7 +219,7 @@ class DumpTimeClassInfo: public CHeapObj {
template
inline unsigned DumpTimeSharedClassTable_hash(T* const& k) {
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
// Deterministic archive contents
uintx delta = k->name() - MetaspaceShared::symbol_rs_base();
return primitive_hash(delta);
diff --git a/src/hotspot/share/cds/lambdaFormInvokers.cpp b/src/hotspot/share/cds/lambdaFormInvokers.cpp
index fec8118447067..8a556a48624d4 100644
--- a/src/hotspot/share/cds/lambdaFormInvokers.cpp
+++ b/src/hotspot/share/cds/lambdaFormInvokers.cpp
@@ -127,7 +127,7 @@ void LambdaFormInvokers::regenerate_holder_classes(TRAPS) {
if (!PENDING_EXCEPTION->is_a(vmClasses::OutOfMemoryError_klass())) {
log_error(cds)("%s: %s", PENDING_EXCEPTION->klass()->external_name(),
java_lang_String::as_utf8_string(java_lang_Throwable::message(PENDING_EXCEPTION)));
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
log_error(cds)("Failed to generate LambdaForm holder classes. Is your classlist out of date?");
} else {
log_error(cds)("Failed to generate LambdaForm holder classes. Was the base archive generated with an outdated classlist?");
diff --git a/src/hotspot/share/cds/metaspaceShared.cpp b/src/hotspot/share/cds/metaspaceShared.cpp
index cd59977b6a2f6..0c70dab3f60c2 100644
--- a/src/hotspot/share/cds/metaspaceShared.cpp
+++ b/src/hotspot/share/cds/metaspaceShared.cpp
@@ -244,7 +244,7 @@ static char* compute_shared_base(size_t cds_max) {
}
void MetaspaceShared::initialize_for_static_dump() {
- assert(DumpSharedSpaces, "should be called for dump time only");
+ assert(CDSConfig::is_dumping_static_archive(), "sanity");
log_info(cds)("Core region alignment: " SIZE_FORMAT, core_region_alignment());
// The max allowed size for CDS archive. We use this to limit SharedBaseAddress
// to avoid address space wrap around.
diff --git a/src/hotspot/share/cds/unregisteredClasses.cpp b/src/hotspot/share/cds/unregisteredClasses.cpp
index 06d006ea1bb97..91346a2008522 100644
--- a/src/hotspot/share/cds/unregisteredClasses.cpp
+++ b/src/hotspot/share/cds/unregisteredClasses.cpp
@@ -44,7 +44,7 @@
// a JAR file.
InstanceKlass* UnregisteredClasses::load_class(Symbol* name, const char* path, TRAPS) {
assert(name != nullptr, "invariant");
- assert(DumpSharedSpaces, "this function is only used with -Xshare:dump");
+ assert(CDSConfig::is_dumping_static_archive(), "this function is only used with -Xshare:dump");
PerfClassTraceTime vmtimer(ClassLoader::perf_app_classload_time(),
THREAD->get_thread_stat()->perf_timers_addr(),
diff --git a/src/hotspot/share/classfile/classFileParser.cpp b/src/hotspot/share/classfile/classFileParser.cpp
index 7e39cafa8113b..a7447211a1c43 100644
--- a/src/hotspot/share/classfile/classFileParser.cpp
+++ b/src/hotspot/share/classfile/classFileParser.cpp
@@ -5519,7 +5519,7 @@ ClassFileParser::ClassFileParser(ClassFileStream* stream,
assert(0 == _access_flags.as_int(), "invariant");
// Figure out whether we can skip format checking (matching classic VM behavior)
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
// verify == true means it's a 'remote' class (i.e., non-boot class)
// Verification decision is based on BytecodeVerificationRemote flag
// for those classes.
@@ -5850,7 +5850,7 @@ void ClassFileParser::mangle_hidden_class_name(InstanceKlass* const ik) {
// use an illegal char such as ';' because that causes serialization issues
// and issues with hidden classes that create their own hidden classes.
char addr_buf[20];
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
// We want stable names for the archived hidden classes (only for static
// archive for now). Spaces under default_SharedBaseAddress() will be
// occupied by the archive at run time, so we know that no dynamically
diff --git a/src/hotspot/share/classfile/classLoader.cpp b/src/hotspot/share/classfile/classLoader.cpp
index 6d37710f4ff34..43aa82b67f85f 100644
--- a/src/hotspot/share/classfile/classLoader.cpp
+++ b/src/hotspot/share/classfile/classLoader.cpp
@@ -1129,7 +1129,7 @@ InstanceKlass* ClassLoader::load_class(Symbol* name, bool search_append_only, TR
// Dynamic dumping requires UseSharedSpaces to be enabled. Since --patch-module
// is not supported with UseSharedSpaces, we can never come here during dynamic dumping.
assert(!CDSConfig::is_dumping_dynamic_archive(), "sanity");
- if (!DumpSharedSpaces) {
+ if (!CDSConfig::is_dumping_static_archive()) {
stream = search_module_entries(THREAD, _patch_mod_entries, class_name, file_name);
}
}
@@ -1490,8 +1490,7 @@ void ClassLoader::classLoader_init2(JavaThread* current) {
// As more modules are defined during module system initialization, more
// entries will be added to the exploded build array.
if (!has_jrt_entry()) {
- assert(!DumpSharedSpaces, "DumpSharedSpaces not supported with exploded module builds");
- assert(!CDSConfig::is_dumping_dynamic_archive(), "not supported with exploded module builds");
+ assert(!CDSConfig::is_dumping_archive(), "not supported with exploded module builds");
assert(!UseSharedSpaces, "UsedSharedSpaces not supported with exploded module builds");
// Set up the boot loader's _exploded_entries list. Note that this gets
// done before loading any classes, by the same thread that will
diff --git a/src/hotspot/share/classfile/classLoaderDataShared.cpp b/src/hotspot/share/classfile/classLoaderDataShared.cpp
index 5e68aaea41ea8..e6f34b2b8b93e 100644
--- a/src/hotspot/share/classfile/classLoaderDataShared.cpp
+++ b/src/hotspot/share/classfile/classLoaderDataShared.cpp
@@ -71,7 +71,7 @@ static ArchivedClassLoaderData _archived_system_loader_data;
static ModuleEntry* _archived_javabase_moduleEntry = nullptr;
void ArchivedClassLoaderData::iterate_symbols(ClassLoaderData* loader_data, MetaspaceClosure* closure) {
- assert(DumpSharedSpaces, "must be");
+ assert(CDSConfig::is_dumping_full_module_graph(), "must be");
assert_valid(loader_data);
if (loader_data != nullptr) {
loader_data->packages()->iterate_symbols(closure);
@@ -80,7 +80,7 @@ void ArchivedClassLoaderData::iterate_symbols(ClassLoaderData* loader_data, Meta
}
void ArchivedClassLoaderData::allocate(ClassLoaderData* loader_data) {
- assert(DumpSharedSpaces, "must be");
+ assert(CDSConfig::is_dumping_full_module_graph(), "must be");
assert_valid(loader_data);
if (loader_data != nullptr) {
// We can't create hashtables at dump time because the hashcode depends on the
@@ -93,7 +93,7 @@ void ArchivedClassLoaderData::allocate(ClassLoaderData* loader_data) {
}
void ArchivedClassLoaderData::init_archived_entries(ClassLoaderData* loader_data) {
- assert(DumpSharedSpaces, "must be");
+ assert(CDSConfig::is_dumping_full_module_graph(), "must be");
assert_valid(loader_data);
if (loader_data != nullptr) {
loader_data->packages()->init_archived_entries(_packages);
diff --git a/src/hotspot/share/classfile/classLoaderExt.cpp b/src/hotspot/share/classfile/classLoaderExt.cpp
index 92511d762fbd5..506d50e99c1fd 100644
--- a/src/hotspot/share/classfile/classLoaderExt.cpp
+++ b/src/hotspot/share/classfile/classLoaderExt.cpp
@@ -276,11 +276,11 @@ void ClassLoaderExt::record_result(const s2 classpath_index, InstanceKlass* resu
result->set_shared_classpath_index(classpath_index);
result->set_shared_class_loader_type(classloader_type);
#if INCLUDE_CDS_JAVA_HEAP
- if (DumpSharedSpaces && AllowArchivingWithJavaAgent && classloader_type == ClassLoader::BOOT_LOADER &&
- classpath_index < 0 && HeapShared::can_write() && redefined) {
- // During static dump, classes for the built-in loaders are always loaded from
- // known locations (jimage, classpath or modulepath), so classpath_index should
- // always be >= 0.
+ if (CDSConfig::is_dumping_heap() && AllowArchivingWithJavaAgent && classloader_type == ClassLoader::BOOT_LOADER &&
+ classpath_index < 0 && redefined) {
+ // When dumping the heap (which happens only during static dump), classes for the built-in
+ // loaders are always loaded from known locations (jimage, classpath or modulepath),
+ // so classpath_index should always be >= 0.
// The only exception is when a java agent is used during dump time (for testing
// purposes only). If a class is transformed by the agent, the CodeSource of
// this class may point to an unknown location. This may break heap object archiving,
diff --git a/src/hotspot/share/classfile/javaClasses.cpp b/src/hotspot/share/classfile/javaClasses.cpp
index 8ff8258b93c5c..c3946c862367f 100644
--- a/src/hotspot/share/classfile/javaClasses.cpp
+++ b/src/hotspot/share/classfile/javaClasses.cpp
@@ -802,9 +802,7 @@ GrowableArray* java_lang_Class::_fixup_module_field_list = nullptr;
inline static void assert_valid_static_string_field(fieldDescriptor* fd) {
assert(fd->has_initial_value(), "caller should have checked this");
assert(fd->field_type() == T_OBJECT, "caller should have checked this");
- // Can't use vmSymbols::string_signature() as fd->signature() may have been relocated
- // during DumpSharedSpaces
- assert(fd->signature()->equals("Ljava/lang/String;"), "just checking");
+ assert(fd->signature() == vmSymbols::string_signature(), "just checking");
}
#endif
diff --git a/src/hotspot/share/classfile/moduleEntry.cpp b/src/hotspot/share/classfile/moduleEntry.cpp
index b636976d09675..24beecdcaf72f 100644
--- a/src/hotspot/share/classfile/moduleEntry.cpp
+++ b/src/hotspot/share/classfile/moduleEntry.cpp
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "cds/archiveBuilder.hpp"
#include "cds/archiveUtils.hpp"
+#include "cds/cdsConfig.hpp"
#include "cds/filemap.hpp"
#include "cds/heapShared.hpp"
#include "classfile/classLoader.hpp"
@@ -488,7 +489,7 @@ void ModuleEntry::init_as_archived_entry() {
}
void ModuleEntry::update_oops_in_archived_module(int root_oop_index) {
- assert(DumpSharedSpaces, "static dump only");
+ assert(CDSConfig::is_dumping_full_module_graph(), "sanity");
assert(_archived_module_index == -1, "must be set exactly once");
assert(root_oop_index >= 0, "sanity");
@@ -576,7 +577,7 @@ Array* ModuleEntryTable::allocate_archived_entries() {
}
void ModuleEntryTable::init_archived_entries(Array* archived_modules) {
- assert(DumpSharedSpaces, "dump time only");
+ assert(CDSConfig::is_dumping_full_module_graph(), "sanity");
for (int i = 0; i < archived_modules->length(); i++) {
ModuleEntry* archived_entry = archived_modules->at(i);
archived_entry->init_as_archived_entry();
diff --git a/src/hotspot/share/classfile/modules.cpp b/src/hotspot/share/classfile/modules.cpp
index 18ae48560faca..bd4be93b86877 100644
--- a/src/hotspot/share/classfile/modules.cpp
+++ b/src/hotspot/share/classfile/modules.cpp
@@ -486,7 +486,6 @@ static bool _seen_system_unnamed_module = false;
//
// Returns true iff the oop has an archived ModuleEntry.
bool Modules::check_archived_module_oop(oop orig_module_obj) {
- assert(DumpSharedSpaces, "must be");
assert(CDSConfig::is_dumping_full_module_graph(), "must be");
assert(java_lang_Module::is_instance(orig_module_obj), "must be");
@@ -641,7 +640,7 @@ void Modules::define_archived_modules(Handle h_platform_loader, Handle h_system_
}
void Modules::check_cds_restrictions(TRAPS) {
- if (DumpSharedSpaces && Universe::is_module_initialized() && CDSConfig::is_dumping_full_module_graph()) {
+ if (CDSConfig::is_dumping_full_module_graph() && Universe::is_module_initialized()) {
THROW_MSG(vmSymbols::java_lang_UnsupportedOperationException(),
"During -Xshare:dump, module system cannot be modified after it's initialized");
}
diff --git a/src/hotspot/share/classfile/symbolTable.cpp b/src/hotspot/share/classfile/symbolTable.cpp
index 51124e5a22553..53c6bb06bec20 100644
--- a/src/hotspot/share/classfile/symbolTable.cpp
+++ b/src/hotspot/share/classfile/symbolTable.cpp
@@ -155,8 +155,9 @@ class SymbolTableConfig : public AllStatic {
assert(value.is_permanent() || (value.refcount() == 1) || (value.refcount() == 0),
"refcount %d", value.refcount());
#if INCLUDE_CDS
- if (DumpSharedSpaces) {
- // no deallocation is needed
+ if (CDSConfig::is_dumping_static_archive()) {
+ // We have allocated with MetaspaceShared::symbol_space_alloc(). No deallocation is needed.
+ // Unreferenced Symbols will not be copied into the archive.
return;
}
#endif
@@ -183,7 +184,7 @@ class SymbolTableConfig : public AllStatic {
static void* allocate_node_impl(size_t size, Value const& value) {
size_t alloc_size = size + value.byte_size() + value.effective_length();
#if INCLUDE_CDS
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
MutexLocker ml(DumpRegion_lock, Mutex::_no_safepoint_check_flag);
// To get deterministic output from -Xshare:dump, we ensure that Symbols are allocated in
// increasing addresses. When the symbols are copied into the archive, we preserve their
@@ -492,7 +493,7 @@ Symbol* SymbolTable::do_add_if_needed(const char* name, int len, uintx hash, boo
const int alloc_size = Symbol::byte_size(len);
u1* u1_buf = NEW_RESOURCE_ARRAY_IN_THREAD(current, u1, alloc_size);
Symbol* tmp = ::new ((void*)u1_buf) Symbol((const u1*)name, len,
- (is_permanent || DumpSharedSpaces) ? PERM_REFCOUNT : 1);
+ (is_permanent || CDSConfig::is_dumping_static_archive()) ? PERM_REFCOUNT : 1);
do {
if (_local_table->insert(current, lookup, *tmp, &rehash_warning, &clean_hint)) {
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
index dc5c86e060cc2..e635c825633f6 100644
--- a/src/hotspot/share/classfile/systemDictionary.cpp
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
@@ -414,7 +414,7 @@ InstanceKlass* SystemDictionary::resolve_super_or_fail(Symbol* class_name,
assert(super_name != nullptr, "null superclass for resolving");
assert(!Signature::is_array(super_name), "invalid superclass name");
#if INCLUDE_CDS
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
// Special processing for handling UNREGISTERED shared classes.
InstanceKlass* k = SystemDictionaryShared::lookup_super_for_unregistered_class(class_name,
super_name, is_superclass);
@@ -878,7 +878,7 @@ InstanceKlass* SystemDictionary::resolve_class_from_stream(
InstanceKlass* k = nullptr;
#if INCLUDE_CDS
- if (!DumpSharedSpaces) {
+ if (!CDSConfig::is_dumping_static_archive()) {
k = SystemDictionaryShared::lookup_from_stream(class_name,
class_loader,
cl_info.protection_domain(),
diff --git a/src/hotspot/share/classfile/systemDictionaryShared.cpp b/src/hotspot/share/classfile/systemDictionaryShared.cpp
index cd1d0751016ba..297483526846c 100644
--- a/src/hotspot/share/classfile/systemDictionaryShared.cpp
+++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp
@@ -460,7 +460,7 @@ bool SystemDictionaryShared::add_unregistered_class(Thread* current, InstanceKla
InstanceKlass* SystemDictionaryShared::lookup_super_for_unregistered_class(
Symbol* class_name, Symbol* super_name, bool is_superclass) {
- assert(DumpSharedSpaces, "only when static dumping");
+ assert(CDSConfig::is_dumping_static_archive(), "only when static dumping");
if (!ClassListParser::is_parsing_thread()) {
// Unregistered classes can be created only by ClassListParser::_parsing_thread.
@@ -723,7 +723,7 @@ bool SystemDictionaryShared::add_verification_constraint(InstanceKlass* k, Symbo
}
void SystemDictionaryShared::add_enum_klass_static_field(InstanceKlass* ik, int root_index) {
- assert(DumpSharedSpaces, "static dump only");
+ assert(CDSConfig::is_dumping_heap(), "sanity");
DumpTimeClassInfo* info = get_info_locked(ik);
info->add_enum_klass_static_field(root_index);
}
@@ -841,7 +841,7 @@ InstanceKlass* SystemDictionaryShared::retrieve_lambda_proxy_class(const RunTime
}
InstanceKlass* SystemDictionaryShared::get_shared_nest_host(InstanceKlass* lambda_ik) {
- assert(!DumpSharedSpaces && UseSharedSpaces, "called at run time with CDS enabled only");
+ assert(!CDSConfig::is_dumping_static_archive() && UseSharedSpaces, "called at run time with CDS enabled only");
RunTimeClassInfo* record = RunTimeClassInfo::get_for(lambda_ik);
return record->nest_host();
}
@@ -892,7 +892,7 @@ InstanceKlass* SystemDictionaryShared::prepare_shared_lambda_proxy_class(Instanc
void SystemDictionaryShared::check_verification_constraints(InstanceKlass* klass,
TRAPS) {
- assert(!DumpSharedSpaces && UseSharedSpaces, "called at run time with CDS enabled only");
+ assert(!CDSConfig::is_dumping_static_archive() && UseSharedSpaces, "called at run time with CDS enabled only");
RunTimeClassInfo* record = RunTimeClassInfo::get_for(klass);
int length = record->_num_verifier_constraints;
@@ -1002,7 +1002,7 @@ void SystemDictionaryShared::record_linking_constraint(Symbol* name, InstanceKla
// returns true IFF there's no need to re-initialize the i/v-tables for klass for
// the purpose of checking class loader constraints.
bool SystemDictionaryShared::check_linking_constraints(Thread* current, InstanceKlass* klass) {
- assert(!DumpSharedSpaces && UseSharedSpaces, "called at run time with CDS enabled only");
+ assert(!CDSConfig::is_dumping_static_archive() && UseSharedSpaces, "called at run time with CDS enabled only");
LogTarget(Info, class, loader, constraints) log;
if (klass->is_shared_boot_class()) {
// No class loader constraint check performed for boot classes.
@@ -1343,7 +1343,7 @@ InstanceKlass* SystemDictionaryShared::find_builtin_class(Symbol* name) {
}
void SystemDictionaryShared::update_shared_entry(InstanceKlass* k, int id) {
- assert(DumpSharedSpaces, "supported only when dumping");
+ assert(CDSConfig::is_dumping_static_archive(), "class ID is used only for static dump (from classlist)");
DumpTimeClassInfo* info = get_info(k);
info->_id = id;
}
diff --git a/src/hotspot/share/classfile/verifier.cpp b/src/hotspot/share/classfile/verifier.cpp
index 0978d874ff002..4aa95aff0e105 100644
--- a/src/hotspot/share/classfile/verifier.cpp
+++ b/src/hotspot/share/classfile/verifier.cpp
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
#include "classfile/classFileStream.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/javaClasses.hpp"
@@ -198,12 +199,12 @@ bool Verifier::verify(InstanceKlass* klass, bool should_verify_class, TRAPS) {
split_verifier.verify_class(THREAD);
exception_name = split_verifier.result();
- // If DumpSharedSpaces is set then don't fall back to the old verifier on
+ // If dumping static archive then don't fall back to the old verifier on
// verification failure. If a class fails verification with the split verifier,
// it might fail the CDS runtime verifier constraint check. In that case, we
// don't want to share the class. We only archive classes that pass the split
// verifier.
- bool can_failover = !DumpSharedSpaces &&
+ bool can_failover = !CDSConfig::is_dumping_static_archive() &&
klass->major_version() < NOFAILOVER_MAJOR_VERSION;
if (can_failover && !HAS_PENDING_EXCEPTION && // Split verifier doesn't set PENDING_EXCEPTION for failure
diff --git a/src/hotspot/share/code/debugInfo.cpp b/src/hotspot/share/code/debugInfo.cpp
index 5c9c308bd97df..4cc94dd13e7b1 100644
--- a/src/hotspot/share/code/debugInfo.cpp
+++ b/src/hotspot/share/code/debugInfo.cpp
@@ -265,6 +265,14 @@ ObjectValue* ObjectMergeValue::select(frame& fr, RegisterMap& reg_map) {
}
}
+Handle ObjectMergeValue::value() const {
+ if (_selected != nullptr) {
+ return _selected->value();
+ } else {
+ return Handle();
+ }
+}
+
void ObjectMergeValue::read_object(DebugInfoReadStream* stream) {
_selector = read_from(stream);
_merge_pointer = read_from(stream);
diff --git a/src/hotspot/share/code/debugInfo.hpp b/src/hotspot/share/code/debugInfo.hpp
index d8d68206af86e..1214059294df1 100644
--- a/src/hotspot/share/code/debugInfo.hpp
+++ b/src/hotspot/share/code/debugInfo.hpp
@@ -232,7 +232,7 @@ class ObjectMergeValue: public ObjectValue {
ScopeValue* field_at(int i) const { ShouldNotReachHere(); return nullptr; }
int field_size() { ShouldNotReachHere(); return -1; }
- Handle value() const { assert(_selected != nullptr, "Should call select() first."); return _selected->value(); }
+ Handle value() const;
void set_value(oop value) { assert(_selected != nullptr, "Should call select() first."); _selected->set_value(value); }
// Serialization of debugging information
diff --git a/src/hotspot/share/compiler/compilerDefinitions.cpp b/src/hotspot/share/compiler/compilerDefinitions.cpp
index 83967fe98b840..10b0f1f04a35c 100644
--- a/src/hotspot/share/compiler/compilerDefinitions.cpp
+++ b/src/hotspot/share/compiler/compilerDefinitions.cpp
@@ -606,6 +606,7 @@ void CompilerConfig::ergo_initialize() {
IncrementalInline = false;
IncrementalInlineMH = false;
IncrementalInlineVirtual = false;
+ StressIncrementalInlining = false;
}
#ifndef PRODUCT
if (!IncrementalInline) {
diff --git a/src/hotspot/share/gc/g1/g1Arguments.cpp b/src/hotspot/share/gc/g1/g1Arguments.cpp
index 10136c33abc95..b8a7c677f7f11 100644
--- a/src/hotspot/share/gc/g1/g1Arguments.cpp
+++ b/src/hotspot/share/gc/g1/g1Arguments.cpp
@@ -24,6 +24,7 @@
*/
#include "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
#include "gc/g1/g1Arguments.hpp"
#include "gc/g1/g1CardSet.hpp"
#include "gc/g1/g1CardSetContainers.inline.hpp"
@@ -173,10 +174,10 @@ void G1Arguments::initialize() {
vm_exit_during_initialization("The flag -XX:+UseG1GC can not be combined with -XX:ParallelGCThreads=0", nullptr);
}
- // When dumping the CDS archive we want to reduce fragmentation by
+ // When dumping the CDS heap we want to reduce fragmentation by
// triggering a full collection. To get as low fragmentation as
// possible we only use one worker thread.
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_heap()) {
FLAG_SET_ERGO(ParallelGCThreads, 1);
}
diff --git a/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp b/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp
index a077ec53c9004..595fcc9c65daa 100644
--- a/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp
+++ b/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
#include "classfile/javaClasses.hpp"
#include "jfr/dcmd/jfrDcmds.hpp"
#include "jfr/recorder/service/jfrMemorySizer.hpp"
@@ -150,7 +151,7 @@ bool JfrOptionSet::allow_retransforms() {
}
bool JfrOptionSet::allow_event_retransforms() {
- return allow_retransforms() && (DumpSharedSpaces || can_retransform());
+ return allow_retransforms() && (CDSConfig::is_dumping_static_archive() || can_retransform());
}
// default options for the dcmd parser
diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp
index e40e5ee856e8d..a3e2bd525ecf6 100644
--- a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp
@@ -146,8 +146,7 @@ void CompilerToVM::Data::initialize(JVMCI_TRAPS) {
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
if (bs_nm != nullptr) {
thread_disarmed_guard_value_offset = in_bytes(bs_nm->thread_disarmed_guard_value_offset());
- AMD64_ONLY(nmethod_entry_barrier = StubRoutines::x86::method_entry_barrier());
- AARCH64_ONLY(nmethod_entry_barrier = StubRoutines::aarch64::method_entry_barrier());
+ nmethod_entry_barrier = StubRoutines::method_entry_barrier();
BarrierSetAssembler* bs_asm = BarrierSet::barrier_set()->barrier_set_assembler();
AARCH64_ONLY(BarrierSetAssembler_nmethod_patching_type = (int) bs_asm->nmethod_patching_type());
AARCH64_ONLY(BarrierSetAssembler_patching_epoch_addr = bs_asm->patching_epoch_addr());
diff --git a/src/hotspot/share/memory/metaspace.cpp b/src/hotspot/share/memory/metaspace.cpp
index de36cd8c7a860..1aa0923ff9c9d 100644
--- a/src/hotspot/share/memory/metaspace.cpp
+++ b/src/hotspot/share/memory/metaspace.cpp
@@ -24,6 +24,7 @@
*/
#include "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
#include "cds/metaspaceShared.hpp"
#include "classfile/classLoaderData.hpp"
#include "gc/shared/collectedHeap.hpp"
@@ -725,7 +726,7 @@ void Metaspace::global_initialize() {
metaspace::ChunkHeaderPool::initialize();
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
assert(!UseSharedSpaces, "sanity");
MetaspaceShared::initialize_for_static_dump();
}
diff --git a/src/hotspot/share/memory/metaspace/metaspaceReporter.cpp b/src/hotspot/share/memory/metaspace/metaspaceReporter.cpp
index a417ed003281b..a7674fb1b8113 100644
--- a/src/hotspot/share/memory/metaspace/metaspaceReporter.cpp
+++ b/src/hotspot/share/memory/metaspace/metaspaceReporter.cpp
@@ -24,6 +24,7 @@
*/
#include "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
#include "classfile/classLoaderData.hpp"
#include "classfile/classLoaderDataGraph.hpp"
#include "memory/metaspace.hpp"
@@ -115,7 +116,7 @@ static void print_settings(outputStream* out, size_t scale) {
out->print("Current GC threshold: ");
print_human_readable_size(out, MetaspaceGC::capacity_until_GC(), scale);
out->cr();
- out->print_cr("CDS: %s", (UseSharedSpaces ? "on" : (DumpSharedSpaces ? "dump" : "off")));
+ out->print_cr("CDS: %s", (UseSharedSpaces ? "on" : (CDSConfig::is_dumping_static_archive() ? "dump" : "off")));
Settings::print_on(out);
}
diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp
index 1c0a5461ffe0f..21601a9303795 100644
--- a/src/hotspot/share/memory/universe.cpp
+++ b/src/hotspot/share/memory/universe.cpp
@@ -240,7 +240,7 @@ void Universe::metaspace_pointers_do(MetaspaceClosure* it) {
#if INCLUDE_CDS_JAVA_HEAP
void Universe::set_archived_basic_type_mirror_index(BasicType t, int index) {
- assert(DumpSharedSpaces, "dump-time only");
+ assert(CDSConfig::is_dumping_heap(), "sanity");
assert(!is_reference_type(t), "sanity");
_archived_basic_type_mirror_indices[t] = index;
}
@@ -484,7 +484,7 @@ void Universe::initialize_basic_type_mirrors(TRAPS) {
CDS_JAVA_HEAP_ONLY(_archived_basic_type_mirror_indices[i] = -1);
}
}
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_heap()) {
HeapShared::init_scratch_objects(CHECK);
}
}
@@ -804,8 +804,6 @@ jint universe_init() {
return JNI_EINVAL;
}
- // Create memory for metadata. Must be after initializing heap for
- // DumpSharedSpaces.
ClassLoaderData::init_null_class_loader_data();
// We have a heap so create the Method* caches before
diff --git a/src/hotspot/share/oops/arrayKlass.cpp b/src/hotspot/share/oops/arrayKlass.cpp
index 486f317dadd8f..60382daf9a4da 100644
--- a/src/hotspot/share/oops/arrayKlass.cpp
+++ b/src/hotspot/share/oops/arrayKlass.cpp
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
#include "cds/metaspaceShared.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/moduleEntry.hpp"
@@ -41,6 +42,10 @@
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
+ArrayKlass::ArrayKlass() {
+ assert(CDSConfig::is_dumping_static_archive() || UseSharedSpaces, "only for CDS");
+}
+
int ArrayKlass::static_size(int header_size) {
// size of an array klass object
assert(header_size <= InstanceKlass::header_size(), "bad header size");
diff --git a/src/hotspot/share/oops/arrayKlass.hpp b/src/hotspot/share/oops/arrayKlass.hpp
index b3d7ca5b32a86..681d101e0e2ab 100644
--- a/src/hotspot/share/oops/arrayKlass.hpp
+++ b/src/hotspot/share/oops/arrayKlass.hpp
@@ -47,7 +47,7 @@ class ArrayKlass: public Klass {
// The constructor with the Symbol argument does the real array
// initialization, the other is a dummy
ArrayKlass(Symbol* name, KlassKind kind);
- ArrayKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for cds"); }
+ ArrayKlass();
public:
// Testing operation
diff --git a/src/hotspot/share/oops/constantPool.cpp b/src/hotspot/share/oops/constantPool.cpp
index 36747bcc0b7a6..623d8e326b01e 100644
--- a/src/hotspot/share/oops/constantPool.cpp
+++ b/src/hotspot/share/oops/constantPool.cpp
@@ -104,6 +104,10 @@ static bool tag_array_is_zero_initialized(Array* tags) {
#endif
+ConstantPool::ConstantPool() {
+ assert(CDSConfig::is_dumping_static_archive() || UseSharedSpaces, "only for CDS");
+}
+
ConstantPool::ConstantPool(Array* tags) :
_tags(tags),
_length(tags->length()) {
diff --git a/src/hotspot/share/oops/constantPool.hpp b/src/hotspot/share/oops/constantPool.hpp
index 31d0239f50bce..a5a82d937ed97 100644
--- a/src/hotspot/share/oops/constantPool.hpp
+++ b/src/hotspot/share/oops/constantPool.hpp
@@ -162,7 +162,7 @@ class ConstantPool : public Metadata {
}
ConstantPool(Array* tags);
- ConstantPool() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
+ ConstantPool();
public:
static ConstantPool* allocate(ClassLoaderData* loader_data, int length, TRAPS);
diff --git a/src/hotspot/share/oops/cpCache.cpp b/src/hotspot/share/oops/cpCache.cpp
index c32566ea699e3..daa094baa7eed 100644
--- a/src/hotspot/share/oops/cpCache.cpp
+++ b/src/hotspot/share/oops/cpCache.cpp
@@ -447,7 +447,7 @@ void ConstantPoolCache::clear_archived_references() {
}
void ConstantPoolCache::set_archived_references(int root_index) {
- assert(DumpSharedSpaces, "called only during runtime");
+ assert(CDSConfig::is_dumping_heap(), "sanity");
_archived_references_index = root_index;
}
#endif
diff --git a/src/hotspot/share/oops/instanceClassLoaderKlass.cpp b/src/hotspot/share/oops/instanceClassLoaderKlass.cpp
new file mode 100644
index 0000000000000..fc6981009b866
--- /dev/null
+++ b/src/hotspot/share/oops/instanceClassLoaderKlass.cpp
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
+#include "oops/instanceClassLoaderKlass.hpp"
+
+InstanceClassLoaderKlass::InstanceClassLoaderKlass() {
+ assert(CDSConfig::is_dumping_static_archive() || UseSharedSpaces, "only for CDS");
+}
diff --git a/src/hotspot/share/oops/instanceClassLoaderKlass.hpp b/src/hotspot/share/oops/instanceClassLoaderKlass.hpp
index f5a6135c049ea..985c81c3cd662 100644
--- a/src/hotspot/share/oops/instanceClassLoaderKlass.hpp
+++ b/src/hotspot/share/oops/instanceClassLoaderKlass.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@ class InstanceClassLoaderKlass: public InstanceKlass {
InstanceClassLoaderKlass(const ClassFileParser& parser) : InstanceKlass(parser, Kind) {}
public:
- InstanceClassLoaderKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
+ InstanceClassLoaderKlass();
// Oop fields (and metadata) iterators
//
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
index c4acf1fb3ac1f..fa595142c68f6 100644
--- a/src/hotspot/share/oops/instanceKlass.cpp
+++ b/src/hotspot/share/oops/instanceKlass.cpp
@@ -501,6 +501,10 @@ static Monitor* create_init_monitor(const char* name) {
return new Monitor(Mutex::safepoint, name);
}
+InstanceKlass::InstanceKlass() {
+ assert(CDSConfig::is_dumping_static_archive() || UseSharedSpaces, "only for CDS");
+}
+
InstanceKlass::InstanceKlass(const ClassFileParser& parser, KlassKind kind, ReferenceType reference_type) :
Klass(kind),
_nest_members(nullptr),
@@ -822,8 +826,8 @@ bool InstanceKlass::link_class_or_fail(TRAPS) {
}
bool InstanceKlass::link_class_impl(TRAPS) {
- if (DumpSharedSpaces && SystemDictionaryShared::has_class_failed_verification(this)) {
- // This is for CDS dumping phase only -- we use the in_error_state to indicate that
+ if (CDSConfig::is_dumping_static_archive() && SystemDictionaryShared::has_class_failed_verification(this)) {
+ // This is for CDS static dump only -- we use the in_error_state to indicate that
// the class has failed verification. Throwing the NoClassDefFoundError here is just
// a convenient way to stop repeat attempts to verify the same (bad) class.
//
diff --git a/src/hotspot/share/oops/instanceKlass.hpp b/src/hotspot/share/oops/instanceKlass.hpp
index 58ed347f6afa5..13cc080be5b06 100644
--- a/src/hotspot/share/oops/instanceKlass.hpp
+++ b/src/hotspot/share/oops/instanceKlass.hpp
@@ -145,7 +145,7 @@ class InstanceKlass: public Klass {
InstanceKlass(const ClassFileParser& parser, KlassKind kind = Kind, ReferenceType reference_type = REF_NONE);
public:
- InstanceKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
+ InstanceKlass();
// See "The Java Virtual Machine Specification" section 2.16.2-5 for a detailed description
// of the class loading & initialization procedure, and the use of the states.
diff --git a/src/hotspot/share/oops/instanceMirrorKlass.cpp b/src/hotspot/share/oops/instanceMirrorKlass.cpp
index e1748090a184b..993e693ddb352 100644
--- a/src/hotspot/share/oops/instanceMirrorKlass.cpp
+++ b/src/hotspot/share/oops/instanceMirrorKlass.cpp
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
#include "cds/serializeClosure.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "gc/shared/collectedHeap.inline.hpp"
@@ -39,6 +40,10 @@
int InstanceMirrorKlass::_offset_of_static_fields = 0;
+InstanceMirrorKlass::InstanceMirrorKlass() {
+ assert(CDSConfig::is_dumping_static_archive() || UseSharedSpaces, "only for CDS");
+}
+
size_t InstanceMirrorKlass::instance_size(Klass* k) {
if (k != nullptr && k->is_instance_klass()) {
return align_object_size(size_helper() + InstanceKlass::cast(k)->static_field_size());
diff --git a/src/hotspot/share/oops/instanceMirrorKlass.hpp b/src/hotspot/share/oops/instanceMirrorKlass.hpp
index cb1ee2efba49a..9783d416a1d1b 100644
--- a/src/hotspot/share/oops/instanceMirrorKlass.hpp
+++ b/src/hotspot/share/oops/instanceMirrorKlass.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 InstanceMirrorKlass: public InstanceKlass {
InstanceMirrorKlass(const ClassFileParser& parser) : InstanceKlass(parser, Kind) {}
public:
- InstanceMirrorKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
+ InstanceMirrorKlass();
static InstanceMirrorKlass* cast(Klass* k) {
return const_cast(cast(const_cast(k)));
diff --git a/src/hotspot/share/oops/instanceRefKlass.cpp b/src/hotspot/share/oops/instanceRefKlass.cpp
index 3af465d718acc..b549f00b82f08 100644
--- a/src/hotspot/share/oops/instanceRefKlass.cpp
+++ b/src/hotspot/share/oops/instanceRefKlass.cpp
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
#include "classfile/classFileParser.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/vmClasses.hpp"
@@ -30,6 +31,10 @@
#include "oops/instanceRefKlass.inline.hpp"
#include "oops/oop.inline.hpp"
+InstanceRefKlass::InstanceRefKlass() {
+ assert(CDSConfig::is_dumping_static_archive() || UseSharedSpaces, "only for CDS");
+}
+
static ReferenceType reference_subclass_name_to_type(const Symbol* name) {
if ( name == vmSymbols::java_lang_ref_SoftReference()) {
return REF_SOFT;
diff --git a/src/hotspot/share/oops/instanceRefKlass.hpp b/src/hotspot/share/oops/instanceRefKlass.hpp
index 13d218723e330..e58f5cf083bca 100644
--- a/src/hotspot/share/oops/instanceRefKlass.hpp
+++ b/src/hotspot/share/oops/instanceRefKlass.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@ class InstanceRefKlass: public InstanceKlass {
InstanceRefKlass(const ClassFileParser& parser);
public:
- InstanceRefKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
+ InstanceRefKlass();
// Oop fields (and metadata) iterators
//
diff --git a/src/hotspot/share/oops/instanceStackChunkKlass.cpp b/src/hotspot/share/oops/instanceStackChunkKlass.cpp
index 7e49db27875f3..0164ad0a9ba7c 100644
--- a/src/hotspot/share/oops/instanceStackChunkKlass.cpp
+++ b/src/hotspot/share/oops/instanceStackChunkKlass.cpp
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
#include "cds/serializeClosure.hpp"
#include "classfile/vmClasses.hpp"
#include "compiler/oopMap.inline.hpp"
@@ -51,6 +52,10 @@ void InstanceStackChunkKlass::serialize_offsets(SerializeClosure* f) {
}
#endif
+InstanceStackChunkKlass::InstanceStackChunkKlass() {
+ assert(CDSConfig::is_dumping_static_archive() || UseSharedSpaces, "only for CDS");
+}
+
InstanceStackChunkKlass::InstanceStackChunkKlass(const ClassFileParser& parser)
: InstanceKlass(parser, Kind) {
// Change the layout_helper to use the slow path because StackChunkOops are
diff --git a/src/hotspot/share/oops/instanceStackChunkKlass.hpp b/src/hotspot/share/oops/instanceStackChunkKlass.hpp
index 3c6ac01d7f5ae..aa59b46f42c9d 100644
--- a/src/hotspot/share/oops/instanceStackChunkKlass.hpp
+++ b/src/hotspot/share/oops/instanceStackChunkKlass.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,7 +113,7 @@ class InstanceStackChunkKlass: public InstanceKlass {
InstanceStackChunkKlass(const ClassFileParser& parser);
public:
- InstanceStackChunkKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
+ InstanceStackChunkKlass();
// Casting from Klass*
static InstanceStackChunkKlass* cast(Klass* k) {
diff --git a/src/hotspot/share/oops/klass.cpp b/src/hotspot/share/oops/klass.cpp
index 3af4bffaeaabd..2a28978816d79 100644
--- a/src/hotspot/share/oops/klass.cpp
+++ b/src/hotspot/share/oops/klass.cpp
@@ -195,6 +195,10 @@ void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word
return Metaspace::allocate(loader_data, word_size, MetaspaceObj::ClassType, THREAD);
}
+Klass::Klass() : _kind(UnknownKlassKind) {
+ assert(CDSConfig::is_dumping_static_archive() || UseSharedSpaces, "only for cds");
+}
+
// "Normal" instantiation is preceded by a MetaspaceObj allocation
// which zeros out memory - calloc equivalent.
// The constructor is also used from CppVtableCloner,
diff --git a/src/hotspot/share/oops/klass.hpp b/src/hotspot/share/oops/klass.hpp
index 9d15894a4905d..96f8f8efdb630 100644
--- a/src/hotspot/share/oops/klass.hpp
+++ b/src/hotspot/share/oops/klass.hpp
@@ -193,9 +193,8 @@ class Klass : public Metadata {
protected:
- // Constructor
Klass(KlassKind kind);
- Klass() : _kind(UnknownKlassKind) { assert(DumpSharedSpaces || UseSharedSpaces, "only for cds"); }
+ Klass();
void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw();
diff --git a/src/hotspot/share/opto/c2_globals.hpp b/src/hotspot/share/opto/c2_globals.hpp
index 5055cd48a9634..3e466539c8771 100644
--- a/src/hotspot/share/opto/c2_globals.hpp
+++ b/src/hotspot/share/opto/c2_globals.hpp
@@ -53,6 +53,9 @@
product(bool, StressCCP, false, DIAGNOSTIC, \
"Randomize worklist traversal in CCP") \
\
+ product(bool, StressIncrementalInlining, false, DIAGNOSTIC, \
+ "Randomize the incremental inlining decision") \
+ \
product(uint, StressSeed, 0, DIAGNOSTIC, \
"Seed for randomized stress testing (if unset, a random one is " \
"generated). The seed is recorded in the compilation log, if " \
diff --git a/src/hotspot/share/opto/callGenerator.cpp b/src/hotspot/share/opto/callGenerator.cpp
index 971c37e6b4571..ef7c572f58231 100644
--- a/src/hotspot/share/opto/callGenerator.cpp
+++ b/src/hotspot/share/opto/callGenerator.cpp
@@ -432,7 +432,7 @@ bool LateInlineMHCallGenerator::do_late_inline_check(Compile* C, JVMState* jvms)
assert(!input_not_const, "sanity"); // shouldn't have been scheduled for inlining in the first place
if (cg != nullptr) {
- assert(!cg->is_late_inline() || cg->is_mh_late_inline() || AlwaysIncrementalInline, "we're doing late inlining");
+ assert(!cg->is_late_inline() || cg->is_mh_late_inline() || AlwaysIncrementalInline || StressIncrementalInlining, "we're doing late inlining");
_inline_cg = cg;
C->dec_number_of_mh_late_inlines();
return true;
@@ -554,7 +554,7 @@ bool LateInlineVirtualCallGenerator::do_late_inline_check(Compile* C, JVMState*
true /*allow_intrinsics*/);
if (cg != nullptr) {
- assert(!cg->is_late_inline() || cg->is_mh_late_inline() || AlwaysIncrementalInline, "we're doing late inlining");
+ assert(!cg->is_late_inline() || cg->is_mh_late_inline() || AlwaysIncrementalInline || StressIncrementalInlining, "we're doing late inlining");
_inline_cg = cg;
return true;
} else {
@@ -989,8 +989,9 @@ CallGenerator* CallGenerator::for_method_handle_call(JVMState* jvms, ciMethod* c
bool input_not_const;
CallGenerator* cg = CallGenerator::for_method_handle_inline(jvms, caller, callee, allow_inline, input_not_const);
Compile* C = Compile::current();
+ bool should_delay = C->should_delay_inlining();
if (cg != nullptr) {
- if (AlwaysIncrementalInline) {
+ if (should_delay) {
return CallGenerator::for_late_inline(callee, cg);
} else {
return cg;
@@ -1001,7 +1002,7 @@ CallGenerator* CallGenerator::for_method_handle_call(JVMState* jvms, ciMethod* c
int call_site_count = caller->scale_count(profile.count());
if (IncrementalInlineMH && call_site_count > 0 &&
- (input_not_const || !C->inlining_incrementally() || C->over_inlining_cutoff())) {
+ (should_delay || input_not_const || !C->inlining_incrementally() || C->over_inlining_cutoff())) {
return CallGenerator::for_mh_late_inline(caller, callee, input_not_const);
} else {
// Out-of-line call.
diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp
index bf0b809b0de79..9d899933c2e8f 100644
--- a/src/hotspot/share/opto/compile.cpp
+++ b/src/hotspot/share/opto/compile.cpp
@@ -839,7 +839,7 @@ Compile::Compile( ciEnv* ci_env, ciMethod* target, int osr_bci,
// If any phase is randomized for stress testing, seed random number
// generation and log the seed for repeatability.
- if (StressLCM || StressGCM || StressIGVN || StressCCP) {
+ if (StressLCM || StressGCM || StressIGVN || StressCCP || StressIncrementalInlining) {
if (FLAG_IS_DEFAULT(StressSeed) || (FLAG_IS_ERGO(StressSeed) && directive->RepeatCompilationOption)) {
_stress_seed = static_cast(Ticks::now().nanoseconds());
FLAG_SET_ERGO(StressSeed, _stress_seed);
@@ -2262,7 +2262,7 @@ void Compile::Optimize() {
if (failing()) return;
- if (AlwaysIncrementalInline) {
+ if (AlwaysIncrementalInline || StressIncrementalInlining) {
inline_incrementally(igvn);
}
diff --git a/src/hotspot/share/opto/compile.hpp b/src/hotspot/share/opto/compile.hpp
index 67e790ffa2314..af4eb6b1ee01a 100644
--- a/src/hotspot/share/opto/compile.hpp
+++ b/src/hotspot/share/opto/compile.hpp
@@ -1069,6 +1069,7 @@ class Compile : public Phase {
bool inline_incrementally_one();
void inline_incrementally_cleanup(PhaseIterGVN& igvn);
void inline_incrementally(PhaseIterGVN& igvn);
+ bool should_delay_inlining() { return AlwaysIncrementalInline || (StressIncrementalInlining && (random() % 2) == 0); }
void inline_string_calls(bool parse_time);
void inline_boxing_calls(PhaseIterGVN& igvn);
bool optimize_loops(PhaseIterGVN& igvn, LoopOptsMode mode);
diff --git a/src/hotspot/share/opto/doCall.cpp b/src/hotspot/share/opto/doCall.cpp
index ca86c806338b9..bad44ca46d473 100644
--- a/src/hotspot/share/opto/doCall.cpp
+++ b/src/hotspot/share/opto/doCall.cpp
@@ -185,7 +185,7 @@ CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool
// Try inlining a bytecoded method:
if (!call_does_dispatch) {
InlineTree* ilt = InlineTree::find_subtree_from_root(this->ilt(), jvms->caller(), jvms->method());
- bool should_delay = AlwaysIncrementalInline;
+ bool should_delay = C->should_delay_inlining();
if (ilt->ok_to_inline(callee, jvms, profile, should_delay)) {
CallGenerator* cg = CallGenerator::for_inline(callee, expected_uses);
// For optimized virtual calls assert at runtime that receiver object
@@ -204,14 +204,14 @@ CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool
// Delay the inlining of this method to give us the
// opportunity to perform some high level optimizations
// first.
- if (should_delay_string_inlining(callee, jvms)) {
+ if (should_delay) {
+ return CallGenerator::for_late_inline(callee, cg);
+ } else if (should_delay_string_inlining(callee, jvms)) {
return CallGenerator::for_string_late_inline(callee, cg);
} else if (should_delay_boxing_inlining(callee, jvms)) {
return CallGenerator::for_boxing_late_inline(callee, cg);
} else if (should_delay_vector_reboxing_inlining(callee, jvms)) {
return CallGenerator::for_vector_reboxing_late_inline(callee, cg);
- } else if (should_delay) {
- return CallGenerator::for_late_inline(callee, cg);
} else {
return cg;
}
diff --git a/src/hotspot/share/prims/jvm.cpp b/src/hotspot/share/prims/jvm.cpp
index 162811870b2ae..539122746b2f5 100644
--- a/src/hotspot/share/prims/jvm.cpp
+++ b/src/hotspot/share/prims/jvm.cpp
@@ -2945,7 +2945,7 @@ static void thread_entry(JavaThread* thread, TRAPS) {
JVM_ENTRY(void, JVM_StartThread(JNIEnv* env, jobject jthread))
#if INCLUDE_CDS
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
// During java -Xshare:dump, if we allow multiple Java threads to
// execute in parallel, symbols and classes may be loaded in
// random orders which will make the resulting CDS archive
@@ -3703,7 +3703,8 @@ JVM_LEAF(jboolean, JVM_IsSharingEnabled(JNIEnv* env))
JVM_END
JVM_ENTRY_NO_ENV(jlong, JVM_GetRandomSeedForDumping())
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
+ // We do this so that the default CDS archive can be deterministic.
const char* release = VM_Version::vm_release();
const char* dbg_level = VM_Version::jdk_debug_level();
const char* version = VM_Version::internal_vm_info_string();
diff --git a/src/hotspot/share/prims/jvmtiEnv.cpp b/src/hotspot/share/prims/jvmtiEnv.cpp
index 15472787f645d..e02820a2beb7d 100644
--- a/src/hotspot/share/prims/jvmtiEnv.cpp
+++ b/src/hotspot/share/prims/jvmtiEnv.cpp
@@ -1711,47 +1711,9 @@ JvmtiEnv::GetThreadGroupChildren(jthreadGroup group, jint* thread_count_ptr, jth
// count_ptr - pre-checked for null
jvmtiError
JvmtiEnv::GetStackTrace(jthread thread, jint start_depth, jint max_frame_count, jvmtiFrameInfo* frame_buffer, jint* count_ptr) {
- JavaThread* current_thread = JavaThread::current();
- HandleMark hm(current_thread);
-
- JvmtiVTMSTransitionDisabler disabler(thread);
- ThreadsListHandle tlh(current_thread);
-
- JavaThread* java_thread = nullptr;
- oop thread_obj = nullptr;
- jvmtiError err = get_threadOop_and_JavaThread(tlh.list(), thread, &java_thread, &thread_obj);
- if (err != JVMTI_ERROR_NONE) {
- return err;
- }
-
- if (java_lang_VirtualThread::is_instance(thread_obj)) {
- if (java_thread == nullptr) { // Target virtual thread is unmounted.
- ResourceMark rm(current_thread);
-
- VM_VirtualThreadGetStackTrace op(this, Handle(current_thread, thread_obj),
- start_depth, max_frame_count,
- frame_buffer, count_ptr);
- VMThread::execute(&op);
- return op.result();
- }
- VirtualThreadGetStackTraceClosure op(this, Handle(current_thread, thread_obj),
- start_depth, max_frame_count, frame_buffer, count_ptr);
- Handshake::execute(&op, java_thread);
- return op.result();
- }
-
- // It is only safe to perform the direct operation on the current
- // thread. All other usage needs to use a direct handshake for safety.
- if (java_thread == JavaThread::current()) {
- err = get_stack_trace(java_thread, start_depth, max_frame_count, frame_buffer, count_ptr);
- } else {
- // Get stack trace with handshake.
- GetStackTraceClosure op(this, start_depth, max_frame_count, frame_buffer, count_ptr);
- Handshake::execute(&op, java_thread);
- err = op.result();
- }
-
- return err;
+ GetStackTraceClosure op(this, start_depth, max_frame_count, frame_buffer, count_ptr);
+ JvmtiHandshake::execute(&op, thread);
+ return op.result();
} /* end GetStackTrace */
@@ -1829,41 +1791,9 @@ JvmtiEnv::GetThreadListStackTraces(jint thread_count, const jthread* thread_list
// count_ptr - pre-checked for null
jvmtiError
JvmtiEnv::GetFrameCount(jthread thread, jint* count_ptr) {
- JavaThread* current_thread = JavaThread::current();
- HandleMark hm(current_thread);
-
- JvmtiVTMSTransitionDisabler disabler(thread);
- ThreadsListHandle tlh(current_thread);
-
- JavaThread* java_thread = nullptr;
- oop thread_obj = nullptr;
- jvmtiError err = get_threadOop_and_JavaThread(tlh.list(), thread, &java_thread, &thread_obj);
- if (err != JVMTI_ERROR_NONE) {
- return err;
- }
-
- if (java_lang_VirtualThread::is_instance(thread_obj)) {
- if (java_thread == nullptr) { // Target virtual thread is unmounted.
- VM_VirtualThreadGetFrameCount op(this, Handle(current_thread, thread_obj), count_ptr);
- VMThread::execute(&op);
- return op.result();
- }
- VirtualThreadGetFrameCountClosure op(this, Handle(current_thread, thread_obj), count_ptr);
- Handshake::execute(&op, java_thread);
- return op.result();
- }
-
- // It is only safe to perform the direct operation on the current
- // thread. All other usage needs to use a direct handshake for safety.
- if (java_thread == JavaThread::current()) {
- err = get_frame_count(java_thread, count_ptr);
- } else {
- // get java stack frame count with handshake.
- GetFrameCountClosure op(this, count_ptr);
- Handshake::execute(&op, java_thread);
- err = op.result();
- }
- return err;
+ GetFrameCountClosure op(this, count_ptr);
+ JvmtiHandshake::execute(&op, thread);
+ return op.result();
} /* end GetFrameCount */
@@ -1923,41 +1853,9 @@ JvmtiEnv::PopFrame(jthread thread) {
// location_ptr - pre-checked for null
jvmtiError
JvmtiEnv::GetFrameLocation(jthread thread, jint depth, jmethodID* method_ptr, jlocation* location_ptr) {
- JavaThread* current_thread = JavaThread::current();
- HandleMark hm(current_thread);
-
- JvmtiVTMSTransitionDisabler disabler(thread);
- ThreadsListHandle tlh(current_thread);
-
- JavaThread* java_thread = nullptr;
- oop thread_obj = nullptr;
- jvmtiError err = get_threadOop_and_JavaThread(tlh.list(), thread, &java_thread, &thread_obj);
- if (err != JVMTI_ERROR_NONE) {
- return err;
- }
-
- if (java_lang_VirtualThread::is_instance(thread_obj)) {
- if (java_thread == nullptr) { // Target virtual thread is unmounted.
- err = get_frame_location(thread_obj, depth, method_ptr, location_ptr);
- return err;
- }
- VirtualThreadGetFrameLocationClosure op(this, Handle(current_thread, thread_obj),
- depth, method_ptr, location_ptr);
- Handshake::execute(&op, java_thread);
- return op.result();
- }
-
- // It is only safe to perform the direct operation on the current
- // thread. All other usage needs to use a direct handshake for safety.
- if (java_thread == JavaThread::current()) {
- err = get_frame_location(java_thread, depth, method_ptr, location_ptr);
- } else {
- // JVMTI get java stack frame location via direct handshake.
- GetFrameLocationClosure op(this, depth, method_ptr, location_ptr);
- Handshake::execute(&op, java_thread);
- err = op.result();
- }
- return err;
+ GetFrameLocationClosure op(this, depth, method_ptr, location_ptr);
+ JvmtiHandshake::execute(&op, thread);
+ return op.result();
} /* end GetFrameLocation */
@@ -1984,25 +1882,9 @@ JvmtiEnv::NotifyFramePop(jthread thread, jint depth) {
return JVMTI_ERROR_THREAD_NOT_ALIVE;
}
- if (java_lang_VirtualThread::is_instance(thread_handle())) {
- VirtualThreadSetFramePopClosure op(this, thread_handle, state, depth);
- MutexLocker mu(current, JvmtiThreadState_lock);
- if (java_thread == nullptr || java_thread == current) {
- // Target virtual thread is unmounted or current.
- op.doit(java_thread, true /* self */);
- } else {
- Handshake::execute(&op, java_thread);
- }
- return op.result();
- }
-
SetFramePopClosure op(this, state, depth);
MutexLocker mu(current, JvmtiThreadState_lock);
- if (java_thread == current) {
- op.doit(java_thread, true /* self */);
- } else {
- Handshake::execute(&op, java_thread);
- }
+ JvmtiHandshake::execute(&op, &tlh, java_thread, thread_handle);
return op.result();
} /* end NotifyFramePop */
diff --git a/src/hotspot/share/prims/jvmtiEnvBase.cpp b/src/hotspot/share/prims/jvmtiEnvBase.cpp
index c402db0cd7522..709cc90d5619a 100644
--- a/src/hotspot/share/prims/jvmtiEnvBase.cpp
+++ b/src/hotspot/share/prims/jvmtiEnvBase.cpp
@@ -625,8 +625,9 @@ JvmtiEnvBase::get_field_descriptor(Klass* k, jfieldID field, fieldDescriptor* fd
bool
JvmtiEnvBase::is_vthread_alive(oop vt) {
- return java_lang_VirtualThread::state(vt) != java_lang_VirtualThread::NEW &&
- java_lang_VirtualThread::state(vt) != java_lang_VirtualThread::TERMINATED;
+ oop cont = java_lang_VirtualThread::continuation(vt);
+ return !jdk_internal_vm_Continuation::done(cont) &&
+ java_lang_VirtualThread::state(vt) != java_lang_VirtualThread::NEW;
}
// Return JavaThread if virtual thread is mounted, null otherwise.
@@ -1243,9 +1244,6 @@ JvmtiEnvBase::get_frame_count(JavaThread* jt, jint *count_ptr) {
jvmtiError
JvmtiEnvBase::get_frame_count(oop vthread_oop, jint *count_ptr) {
- if (!JvmtiEnvBase::is_vthread_alive(vthread_oop)) {
- return JVMTI_ERROR_THREAD_NOT_ALIVE;
- }
Thread *current_thread = Thread::current();
ResourceMark rm(current_thread);
javaVFrame *jvf = JvmtiEnvBase::get_vthread_jvf(vthread_oop);
@@ -1300,9 +1298,6 @@ JvmtiEnvBase::get_frame_location(JavaThread *java_thread, jint depth,
jvmtiError
JvmtiEnvBase::get_frame_location(oop vthread_oop, jint depth,
jmethodID* method_ptr, jlocation* location_ptr) {
- if (!JvmtiEnvBase::is_vthread_alive(vthread_oop)) {
- return JVMTI_ERROR_THREAD_NOT_ALIVE;
- }
Thread* current = Thread::current();
ResourceMark rm(current);
HandleMark hm(current);
@@ -1944,6 +1939,74 @@ MultipleStackTracesCollector::allocate_and_fill_stacks(jint thread_count) {
"the last copied frame info must be the last record");
}
+// AdapterClosure is to make use of JvmtiUnitedHandshakeClosure objects from
+// Handshake::execute() which is unaware of the do_vthread() member functions.
+class AdapterClosure : public HandshakeClosure {
+ JvmtiUnitedHandshakeClosure* _hs_cl;
+ Handle _target_h;
+
+ public:
+ AdapterClosure(JvmtiUnitedHandshakeClosure* hs_cl, Handle target_h)
+ : HandshakeClosure(hs_cl->name()), _hs_cl(hs_cl), _target_h(target_h) {}
+
+ virtual void do_thread(Thread* target) {
+ if (java_lang_VirtualThread::is_instance(_target_h())) {
+ _hs_cl->do_vthread(_target_h); // virtual thread
+ } else {
+ _hs_cl->do_thread(target); // platform thread
+ }
+ }
+};
+
+// Supports platform and virtual threads.
+// JvmtiVTMSTransitionDisabler is always set by this function.
+void
+JvmtiHandshake::execute(JvmtiUnitedHandshakeClosure* hs_cl, jthread target) {
+ JavaThread* current = JavaThread::current();
+ HandleMark hm(current);
+
+ JvmtiVTMSTransitionDisabler disabler(target);
+ ThreadsListHandle tlh(current);
+ JavaThread* java_thread = nullptr;
+ oop thread_obj = nullptr;
+
+ jvmtiError err = JvmtiEnvBase::get_threadOop_and_JavaThread(tlh.list(), target, &java_thread, &thread_obj);
+ if (err != JVMTI_ERROR_NONE) {
+ hs_cl->set_result(err);
+ return;
+ }
+ Handle target_h(current, thread_obj);
+ execute(hs_cl, &tlh, java_thread, target_h);
+}
+
+// Supports platform and virtual threads.
+// A virtual thread is always identified by the target_h oop handle.
+// The target_jt is always nullptr for an unmounted virtual thread.
+// JvmtiVTMSTransitionDisabler has to be set before call to this function.
+void
+JvmtiHandshake::execute(JvmtiUnitedHandshakeClosure* hs_cl, ThreadsListHandle* tlh,
+ JavaThread* target_jt, Handle target_h) {
+ bool self = target_jt == JavaThread::current();
+
+ hs_cl->set_self(self); // needed when suspend is required for non-current target thread
+
+ if (java_lang_VirtualThread::is_instance(target_h())) { // virtual thread
+ if (!JvmtiEnvBase::is_vthread_alive(target_h())) {
+ return;
+ }
+ if (target_jt == nullptr) { // unmounted virtual thread
+ hs_cl->do_vthread(target_h); // execute handshake closure callback on current thread directly
+ }
+ }
+ if (target_jt != nullptr) { // mounted virtual or platform thread
+ AdapterClosure acl(hs_cl, target_h);
+ if (self) { // target platform thread is current
+ acl.do_thread(target_jt); // execute handshake closure callback on current thread directly
+ } else {
+ Handshake::execute(&acl, tlh, target_jt); // delegate to Handshake implementation
+ }
+ }
+}
void
VM_GetThreadListStackTraces::doit() {
@@ -2335,16 +2398,15 @@ UpdateForPopTopFrameClosure::doit(Thread *target, bool self) {
}
void
-SetFramePopClosure::doit(Thread *target, bool self) {
- ResourceMark rm;
+SetFramePopClosure::do_thread(Thread *target) {
+ Thread* current = Thread::current();
JavaThread* java_thread = JavaThread::cast(target);
if (java_thread->is_exiting()) {
- return; /* JVMTI_ERROR_THREAD_NOT_ALIVE (default) */
+ return; // JVMTI_ERROR_THREAD_NOT_ALIVE (default)
}
- assert(_state->get_thread_or_saved() == java_thread, "Must be");
- if (!self && !java_thread->is_suspended()) {
+ if (!_self && !java_thread->is_suspended()) {
_result = JVMTI_ERROR_THREAD_NOT_SUSPENDED;
return;
}
@@ -2352,6 +2414,8 @@ SetFramePopClosure::doit(Thread *target, bool self) {
_result = JVMTI_ERROR_NO_MORE_FRAMES;
return;
}
+ assert(_state->get_thread_or_saved() == java_thread, "Must be");
+
RegisterMap reg_map(java_thread,
RegisterMap::UpdateMap::include,
RegisterMap::ProcessFrames::skip,
@@ -2360,6 +2424,16 @@ SetFramePopClosure::doit(Thread *target, bool self) {
_result = ((JvmtiEnvBase*)_env)->set_frame_pop(_state, jvf, _depth);
}
+void
+SetFramePopClosure::do_vthread(Handle target_h) {
+ if (!_self && !JvmtiVTSuspender::is_vthread_suspended(target_h())) {
+ _result = JVMTI_ERROR_THREAD_NOT_SUSPENDED;
+ return;
+ }
+ javaVFrame *jvf = JvmtiEnvBase::get_vthread_jvf(target_h());
+ _result = ((JvmtiEnvBase*)_env)->set_frame_pop(_state, jvf, _depth);
+}
+
void
GetOwnedMonitorInfoClosure::do_thread(Thread *target) {
JavaThread *jt = JavaThread::cast(target);
@@ -2381,22 +2455,11 @@ GetCurrentContendedMonitorClosure::do_thread(Thread *target) {
}
}
-void
-VM_VirtualThreadGetStackTrace::doit() {
- if (!JvmtiEnvBase::is_vthread_alive(_vthread_h())) {
- _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
- return;
- }
- ResourceMark rm;
- javaVFrame* jvf = JvmtiEnvBase::get_vthread_jvf(_vthread_h());
-
- _result = ((JvmtiEnvBase *)_env)->get_stack_trace(jvf,
- _start_depth, _max_count,
- _frame_buffer, _count_ptr);
-}
-
void
GetStackTraceClosure::do_thread(Thread *target) {
+ Thread* current = Thread::current();
+ ResourceMark rm(current);
+
JavaThread *jt = JavaThread::cast(target);
if (!jt->is_exiting() && jt->threadObj() != nullptr) {
_result = ((JvmtiEnvBase *)_env)->get_stack_trace(jt,
@@ -2405,6 +2468,17 @@ GetStackTraceClosure::do_thread(Thread *target) {
}
}
+void
+GetStackTraceClosure::do_vthread(Handle target_h) {
+ Thread* current = Thread::current();
+ ResourceMark rm(current);
+
+ javaVFrame *jvf = JvmtiEnvBase::get_vthread_jvf(target_h());
+ _result = ((JvmtiEnvBase *)_env)->get_stack_trace(jvf,
+ _start_depth, _max_count,
+ _frame_buffer, _count_ptr);
+}
+
#ifdef ASSERT
void
PrintStackTraceClosure::do_thread_impl(Thread *target) {
@@ -2454,29 +2528,38 @@ PrintStackTraceClosure::do_thread(Thread *target) {
}
#endif
-void
-VM_VirtualThreadGetFrameCount::doit() {
- _result = ((JvmtiEnvBase*)_env)->get_frame_count(_vthread_h(), _count_ptr);
-}
-
void
GetFrameCountClosure::do_thread(Thread *target) {
JavaThread* jt = JavaThread::cast(target);
assert(target == jt, "just checking");
+
if (!jt->is_exiting() && jt->threadObj() != nullptr) {
_result = ((JvmtiEnvBase*)_env)->get_frame_count(jt, _count_ptr);
}
}
+void
+GetFrameCountClosure::do_vthread(Handle target_h) {
+ _result = ((JvmtiEnvBase*)_env)->get_frame_count(target_h(), _count_ptr);
+}
+
void
GetFrameLocationClosure::do_thread(Thread *target) {
JavaThread *jt = JavaThread::cast(target);
+ assert(target == jt, "just checking");
+
if (!jt->is_exiting() && jt->threadObj() != nullptr) {
_result = ((JvmtiEnvBase*)_env)->get_frame_location(jt, _depth,
_method_ptr, _location_ptr);
}
}
+void
+GetFrameLocationClosure::do_vthread(Handle target_h) {
+ _result = ((JvmtiEnvBase*)_env)->get_frame_location(target_h(), _depth,
+ _method_ptr, _location_ptr);
+}
+
void
VirtualThreadGetOwnedMonitorInfoClosure::do_thread(Thread *target) {
if (!JvmtiEnvBase::is_vthread_alive(_vthread_h())) {
@@ -2506,36 +2589,6 @@ VirtualThreadGetThreadClosure::do_thread(Thread *target) {
*_carrier_thread_ptr = (jthread)JNIHandles::make_local(jt, carrier_thread);
}
-void
-VirtualThreadGetStackTraceClosure::do_thread(Thread *target) {
- assert(target->is_Java_thread(), "just checking");
- if (!JvmtiEnvBase::is_vthread_alive(_vthread_h())) {
- _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
- return;
- }
- Thread* cur_thread = Thread::current();
- ResourceMark rm(cur_thread);
- HandleMark hm(cur_thread);
-
- javaVFrame *jvf = JvmtiEnvBase::get_vthread_jvf(_vthread_h());
- _result = ((JvmtiEnvBase *)_env)->get_stack_trace(jvf,
- _start_depth, _max_count,
- _frame_buffer, _count_ptr);
-}
-
-void
-VirtualThreadGetFrameCountClosure::do_thread(Thread *target) {
- assert(target->is_Java_thread(), "just checking");
- _result = ((JvmtiEnvBase*)_env)->get_frame_count(_vthread_h(), _count_ptr);
-}
-
-void
-VirtualThreadGetFrameLocationClosure::do_thread(Thread *target) {
- assert(target->is_Java_thread(), "just checking");
- _result = ((JvmtiEnvBase*)_env)->get_frame_location(_vthread_h(), _depth,
- _method_ptr, _location_ptr);
-}
-
void
VirtualThreadGetThreadStateClosure::do_thread(Thread *target) {
assert(target->is_Java_thread(), "just checking");
@@ -2558,18 +2611,3 @@ VirtualThreadGetThreadStateClosure::do_thread(Thread *target) {
*_state_ptr = state;
_result = JVMTI_ERROR_NONE;
}
-
-void
-VirtualThreadSetFramePopClosure::doit(Thread *target, bool self) {
- if (!JvmtiEnvBase::is_vthread_alive(_vthread_h())) {
- _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
- return;
- }
- if (!self && !JvmtiVTSuspender::is_vthread_suspended(_vthread_h())) {
- _result = JVMTI_ERROR_THREAD_NOT_SUSPENDED;
- return;
- }
- ResourceMark rm;
- javaVFrame *jvf = JvmtiEnvBase::get_vthread_jvf(_vthread_h());
- _result = ((JvmtiEnvBase*)_env)->set_frame_pop(_state, jvf, _depth);
-}
diff --git a/src/hotspot/share/prims/jvmtiEnvBase.hpp b/src/hotspot/share/prims/jvmtiEnvBase.hpp
index 6fdeb11f4060b..30f8183924fe6 100644
--- a/src/hotspot/share/prims/jvmtiEnvBase.hpp
+++ b/src/hotspot/share/prims/jvmtiEnvBase.hpp
@@ -463,6 +463,32 @@ class JvmtiHandshakeClosure : public HandshakeClosure {
jvmtiError result() { return _result; }
};
+// Used in combination with the JvmtiHandshake class.
+// It is intended to support both platform and virtual threads.
+class JvmtiUnitedHandshakeClosure : public HandshakeClosure {
+ protected:
+ jvmtiError _result;
+ bool _self;
+ public:
+ JvmtiUnitedHandshakeClosure(const char* name)
+ : HandshakeClosure(name),
+ _result(JVMTI_ERROR_THREAD_NOT_ALIVE),
+ _self(false) {}
+
+ void set_result(jvmtiError err) { _result = err; }
+ void set_self(bool val) { _self = val; }
+ jvmtiError result() { return _result; }
+ virtual void do_vthread(Handle target_h) = 0;
+};
+
+// The JvmtiHandshake supports virtual threads.
+class JvmtiHandshake : public Handshake {
+ public:
+ static void execute(JvmtiUnitedHandshakeClosure* hs_cl, ThreadsListHandle* tlh,
+ JavaThread* target_jt, Handle target_h);
+ static void execute(JvmtiUnitedHandshakeClosure* hs_cl, jthread target);
+};
+
class SetForceEarlyReturn : public JvmtiHandshakeClosure {
private:
JvmtiThreadState* _state;
@@ -496,7 +522,7 @@ class UpdateForPopTopFrameClosure : public JvmtiHandshakeClosure {
};
// HandshakeClosure to set frame pop.
-class SetFramePopClosure : public JvmtiHandshakeClosure {
+class SetFramePopClosure : public JvmtiUnitedHandshakeClosure {
private:
JvmtiEnv *_env;
JvmtiThreadState* _state;
@@ -504,14 +530,12 @@ class SetFramePopClosure : public JvmtiHandshakeClosure {
public:
SetFramePopClosure(JvmtiEnv *env, JvmtiThreadState* state, jint depth)
- : JvmtiHandshakeClosure("SetFramePopClosure"),
+ : JvmtiUnitedHandshakeClosure("SetFramePopClosure"),
_env(env),
_state(state),
_depth(depth) {}
- void do_thread(Thread *target) {
- doit(target, false /* self */);
- }
- void doit(Thread *target, bool self);
+ void do_thread(Thread *target);
+ void do_vthread(Handle target_h);
};
// HandshakeClosure to get monitor information with stack depth.
@@ -574,7 +598,7 @@ class GetCurrentContendedMonitorClosure : public JvmtiHandshakeClosure {
};
// HandshakeClosure to get stack trace.
-class GetStackTraceClosure : public JvmtiHandshakeClosure {
+class GetStackTraceClosure : public JvmtiUnitedHandshakeClosure {
private:
JvmtiEnv *_env;
jint _start_depth;
@@ -585,13 +609,14 @@ class GetStackTraceClosure : public JvmtiHandshakeClosure {
public:
GetStackTraceClosure(JvmtiEnv *env, jint start_depth, jint max_count,
jvmtiFrameInfo* frame_buffer, jint* count_ptr)
- : JvmtiHandshakeClosure("GetStackTrace"),
+ : JvmtiUnitedHandshakeClosure("GetStackTrace"),
_env(env),
_start_depth(start_depth),
_max_count(max_count),
_frame_buffer(frame_buffer),
_count_ptr(count_ptr) {}
void do_thread(Thread *target);
+ void do_vthread(Handle target_h);
};
#ifdef ASSERT
@@ -684,54 +709,6 @@ class VM_GetThreadListStackTraces : public VM_Operation {
jvmtiError result() { return _collector.result(); }
};
-class VM_VirtualThreadGetStackTrace : public VM_Operation {
-private:
- JvmtiEnv *_env;
- Handle _vthread_h;
- jint _start_depth;
- jint _max_count;
- jvmtiFrameInfo* _frame_buffer;
- jint* _count_ptr;
- jvmtiError _result;
-
-public:
- VM_VirtualThreadGetStackTrace(JvmtiEnv *env, Handle vthread_h,
- jint start_depth, jint max_count,
- jvmtiFrameInfo* frame_buffer, jint* count_ptr)
- : _env(env),
- _vthread_h(vthread_h),
- _start_depth(start_depth),
- _max_count(max_count),
- _frame_buffer(frame_buffer),
- _count_ptr(count_ptr),
- _result(JVMTI_ERROR_NONE)
- {}
-
- VMOp_Type type() const { return VMOp_VirtualThreadGetStackTrace; }
- void doit();
- jvmtiError result() { return _result; }
-};
-
-class VM_VirtualThreadGetFrameCount : public VM_Operation {
-private:
- JvmtiEnv *_env;
- Handle _vthread_h;
- jint* _count_ptr;
- jvmtiError _result;
-
-public:
- VM_VirtualThreadGetFrameCount(JvmtiEnv *env, Handle vthread_h, jint* count_ptr)
- : _env(env),
- _vthread_h(vthread_h),
- _count_ptr(count_ptr),
- _result(JVMTI_ERROR_NONE)
- {}
-
- VMOp_Type type() const { return VMOp_VirtualThreadGetFrameCount; }
- void doit();
- jvmtiError result() { return _result; }
-};
-
// HandshakeClosure to get single stack trace.
class GetSingleStackTraceClosure : public HandshakeClosure {
private:
@@ -753,21 +730,22 @@ class GetSingleStackTraceClosure : public HandshakeClosure {
};
// HandshakeClosure to count stack frames.
-class GetFrameCountClosure : public JvmtiHandshakeClosure {
+class GetFrameCountClosure : public JvmtiUnitedHandshakeClosure {
private:
JvmtiEnv *_env;
jint *_count_ptr;
public:
GetFrameCountClosure(JvmtiEnv *env, jint *count_ptr)
- : JvmtiHandshakeClosure("GetFrameCount"),
+ : JvmtiUnitedHandshakeClosure("GetFrameCount"),
_env(env),
_count_ptr(count_ptr) {}
void do_thread(Thread *target);
+ void do_vthread(Handle target_h);
};
// HandshakeClosure to get frame location.
-class GetFrameLocationClosure : public JvmtiHandshakeClosure {
+class GetFrameLocationClosure : public JvmtiUnitedHandshakeClosure {
private:
JvmtiEnv *_env;
jint _depth;
@@ -777,12 +755,13 @@ class GetFrameLocationClosure : public JvmtiHandshakeClosure {
public:
GetFrameLocationClosure(JvmtiEnv *env, jint depth,
jmethodID* method_ptr, jlocation* location_ptr)
- : JvmtiHandshakeClosure("GetFrameLocation"),
+ : JvmtiUnitedHandshakeClosure("GetFrameLocation"),
_env(env),
_depth(depth),
_method_ptr(method_ptr),
_location_ptr(location_ptr) {}
void do_thread(Thread *target);
+ void do_vthread(Handle target_h);
};
// HandshakeClosure to get virtual thread monitor information with stack depth.
@@ -825,77 +804,6 @@ class VirtualThreadGetThreadClosure : public HandshakeClosure {
jvmtiError result() { return _result; }
};
-// HandshakeClosure to get virtual thread stack trace at safepoint.
-class VirtualThreadGetStackTraceClosure : public HandshakeClosure {
-private:
- JvmtiEnv *_env;
- Handle _vthread_h;
- jint _start_depth;
- jint _max_count;
- jvmtiFrameInfo *_frame_buffer;
- jint *_count_ptr;
- jvmtiError _result;
-
-public:
- VirtualThreadGetStackTraceClosure(JvmtiEnv *env, Handle vthread_h,
- jint start_depth, jint max_count,
- jvmtiFrameInfo* frame_buffer, jint* count_ptr)
- : HandshakeClosure("VirtualThreadGetStackTrace"),
- _env(env),
- _vthread_h(vthread_h),
- _start_depth(start_depth),
- _max_count(max_count),
- _frame_buffer(frame_buffer),
- _count_ptr(count_ptr),
- _result(JVMTI_ERROR_NONE) {}
-
- void do_thread(Thread *target);
- jvmtiError result() { return _result; }
-};
-
-// HandshakeClosure to count virtual thread stack frames at safepoint.
-class VirtualThreadGetFrameCountClosure : public HandshakeClosure {
-private:
- JvmtiEnv *_env;
- Handle _vthread_h;
- jint *_count_ptr;
- jvmtiError _result;
-
-public:
- VirtualThreadGetFrameCountClosure(JvmtiEnv *env, Handle vthread_h, jint *count_ptr)
- : HandshakeClosure("VirtualThreadGetFrameCount"),
- _env(env), _vthread_h(vthread_h), _count_ptr(count_ptr),
- _result(JVMTI_ERROR_NONE) {}
-
- void do_thread(Thread *target);
- jvmtiError result() { return _result; }
-};
-
-// HandshakeClosure get to virtual thread frame location at safepoint.
-class VirtualThreadGetFrameLocationClosure : public HandshakeClosure {
-private:
- JvmtiEnv *_env;
- Handle _vthread_h;
- jint _depth;
- jmethodID* _method_ptr;
- jlocation* _location_ptr;
- jvmtiError _result;
-
-public:
- VirtualThreadGetFrameLocationClosure(JvmtiEnv *env, Handle vthread_h, jint depth,
- jmethodID* method_ptr, jlocation* location_ptr)
- : HandshakeClosure("VirtualThreadGetFrameLocation"),
- _env(env),
- _vthread_h(vthread_h),
- _depth(depth),
- _method_ptr(method_ptr),
- _location_ptr(location_ptr),
- _result(JVMTI_ERROR_NONE) {}
-
- void do_thread(Thread *target);
- jvmtiError result() { return _result; }
-};
-
// HandshakeClosure to get virtual thread state at safepoint.
class VirtualThreadGetThreadStateClosure : public HandshakeClosure {
private:
@@ -914,28 +822,6 @@ class VirtualThreadGetThreadStateClosure : public HandshakeClosure {
jvmtiError result() { return _result; }
};
-// HandshakeClosure to set frame pop for a virtual thread.
-class VirtualThreadSetFramePopClosure : public JvmtiHandshakeClosure {
-private:
- JvmtiEnv *_env;
- Handle _vthread_h;
- JvmtiThreadState* _state;
- jint _depth;
-
-public:
- VirtualThreadSetFramePopClosure(JvmtiEnv *env, Handle vthread_h, JvmtiThreadState* state, jint depth)
- : JvmtiHandshakeClosure("VirtualThreadSetFramePopClosure"),
- _env(env),
- _vthread_h(vthread_h),
- _state(state),
- _depth(depth) {}
-
- void do_thread(Thread *target) {
- doit(target, false /* self */);
- }
- void doit(Thread *target, bool self);
-};
-
// ResourceTracker
//
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
index d0fdb55d84b0d..ded0d655ff4e9 100644
--- a/src/hotspot/share/runtime/arguments.cpp
+++ b/src/hotspot/share/runtime/arguments.cpp
@@ -529,6 +529,7 @@ static SpecialFlag const special_jvm_flags[] = {
{ "RefDiscoveryPolicy", JDK_Version::undefined(), JDK_Version::jdk(21), JDK_Version::undefined() },
{ "MetaspaceReclaimPolicy", JDK_Version::undefined(), JDK_Version::jdk(21), JDK_Version::undefined() },
{ "DoReserveCopyInSuperWord", JDK_Version::undefined(), JDK_Version::jdk(22), JDK_Version::jdk(23) },
+ { "UseCounterDecay", JDK_Version::undefined(), JDK_Version::jdk(22), JDK_Version::jdk(23) },
#ifdef LINUX
{ "UseHugeTLBFS", JDK_Version::undefined(), JDK_Version::jdk(22), JDK_Version::jdk(23) },
@@ -2615,7 +2616,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
mode_flag_cmd_line = true;
// -Xshare:dump
} else if (match_option(option, "-Xshare:dump")) {
- DumpSharedSpaces = true;
+ CDSConfig::enable_dumping_static_archive();
// -Xshare:on
} else if (match_option(option, "-Xshare:on")) {
UseSharedSpaces = true;
@@ -3036,7 +3037,7 @@ jint Arguments::finalize_vm_init_args(bool patch_mod_javabase) {
}
#if INCLUDE_CDS
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
if (!mode_flag_cmd_line) {
// By default, -Xshare:dump runs in interpreter-only mode, which is required for deterministic archive.
//
@@ -3083,7 +3084,7 @@ jint Arguments::finalize_vm_init_args(bool patch_mod_javabase) {
if (UseSharedSpaces && patch_mod_javabase) {
no_shared_spaces("CDS is disabled when " JAVA_BASE_NAME " module is patched.");
}
- if (UseSharedSpaces && !DumpSharedSpaces && check_unsupported_cds_runtime_properties()) {
+ if (UseSharedSpaces && check_unsupported_cds_runtime_properties()) {
UseSharedSpaces = false;
}
@@ -3364,7 +3365,7 @@ jint Arguments::parse_options_buffer(const char* name, char* buffer, const size_
}
void Arguments::set_shared_spaces_flags_and_archive_paths() {
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
if (RequireSharedSpaces) {
warning("Cannot dump shared archive while using shared archive");
}
@@ -3375,7 +3376,7 @@ void Arguments::set_shared_spaces_flags_and_archive_paths() {
// This must be after set_ergonomics_flags() called so flag UseCompressedOops is set properly.
//
// UseSharedSpaces may be disabled if -XX:SharedArchiveFile is invalid.
- if (DumpSharedSpaces || UseSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive() || UseSharedSpaces) {
init_shared_archive_paths();
}
#endif // INCLUDE_CDS
@@ -3445,7 +3446,7 @@ void Arguments::extract_shared_archive_paths(const char* archive_path,
void Arguments::init_shared_archive_paths() {
if (ArchiveClassesAtExit != nullptr) {
assert(!RecordDynamicDumpInfo, "already checked");
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
vm_exit_during_initialization("-XX:ArchiveClassesAtExit cannot be used with -Xshare:dump");
}
check_unsupported_dumping_properties();
@@ -3467,7 +3468,7 @@ void Arguments::init_shared_archive_paths() {
"Cannot have more than 1 archive file specified in -XX:SharedArchiveFile during CDS dumping");
}
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
assert(archives == 1, "must be");
// Static dump is simple: only one archive is allowed in SharedArchiveFile. This file
// will be overwritten no matter regardless of its contents
@@ -3909,12 +3910,6 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
if (TraceBytecodesAt != 0) {
TraceBytecodes = true;
}
- if (CountCompiledCalls) {
- if (UseCounterDecay) {
- warning("UseCounterDecay disabled because CountCalls is set");
- UseCounterDecay = false;
- }
- }
#endif // PRODUCT
if (ScavengeRootsInCode == 0) {
@@ -3932,7 +3927,7 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
set_object_alignment();
#if !INCLUDE_CDS
- if (DumpSharedSpaces || RequireSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive() || RequireSharedSpaces) {
jio_fprintf(defaultStream::error_stream(),
"Shared spaces are not supported in this VM\n");
return JNI_ERR;
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
index 17dfaee8a7629..b780b040f9416 100644
--- a/src/hotspot/share/runtime/globals.hpp
+++ b/src/hotspot/share/runtime/globals.hpp
@@ -1220,16 +1220,9 @@ const int ObjectAlignmentInBytes = 8;
product(bool, UseCompiler, true, \
"Use Just-In-Time compilation") \
\
- product(bool, UseCounterDecay, true, \
- "Adjust recompilation counters") \
- \
develop(intx, CounterHalfLifeTime, 30, \
"Half-life time of invocation counters (in seconds)") \
\
- develop(intx, CounterDecayMinIntervalLength, 500, \
- "The minimum interval (in milliseconds) between invocation of " \
- "CounterDecay") \
- \
product(bool, AlwaysCompileLoopMethods, false, \
"When using recompilation, never interpret methods " \
"containing loops") \
diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp
index 0fea576269b32..cafc9b10cbb05 100644
--- a/src/hotspot/share/runtime/os.cpp
+++ b/src/hotspot/share/runtime/os.cpp
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/moduleEntry.hpp"
#include "classfile/systemDictionary.hpp"
@@ -630,7 +631,7 @@ void* os::malloc(size_t size, MEMFLAGS memflags, const NativeCallStack& stack) {
// Special handling for NMT preinit phase before arguments are parsed
void* rc = nullptr;
if (NMTPreInit::handle_malloc(&rc, size)) {
- // No need to fill with 0 because DumpSharedSpaces doesn't use these
+ // No need to fill with 0 because CDS static dumping doesn't use these
// early allocations.
return rc;
}
@@ -661,7 +662,7 @@ void* os::malloc(size_t size, MEMFLAGS memflags, const NativeCallStack& stack) {
void* const inner_ptr = MemTracker::record_malloc((address)outer_ptr, size, memflags, stack);
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
// Need to deterministically fill all the alignment gaps in C++ structures.
::memset(inner_ptr, 0, size);
} else {
diff --git a/src/hotspot/share/runtime/reflection.cpp b/src/hotspot/share/runtime/reflection.cpp
index 88f1694c113c0..f0597b00527dc 100644
--- a/src/hotspot/share/runtime/reflection.cpp
+++ b/src/hotspot/share/runtime/reflection.cpp
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "cds/cdsConfig.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "classfile/moduleEntry.hpp"
#include "classfile/packageEntry.hpp"
@@ -457,9 +458,9 @@ Reflection::VerifyClassAccessResults Reflection::verify_class_access(
// module boundaries
if (new_class->is_public()) {
- // Ignore modules for DumpSharedSpaces because we do not have any package
+ // Ignore modules for -Xshare:dump because we do not have any package
// or module information for modules other than java.base.
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
return ACCESS_OK;
}
diff --git a/src/hotspot/share/runtime/stubRoutines.cpp b/src/hotspot/share/runtime/stubRoutines.cpp
index faeaedac55e1e..ff32240905de8 100644
--- a/src/hotspot/share/runtime/stubRoutines.cpp
+++ b/src/hotspot/share/runtime/stubRoutines.cpp
@@ -176,6 +176,7 @@ address StubRoutines::_hf2f = nullptr;
address StubRoutines::_vector_f_math[VectorSupport::NUM_VEC_SIZES][VectorSupport::NUM_SVML_OP] = {{nullptr}, {nullptr}};
address StubRoutines::_vector_d_math[VectorSupport::NUM_VEC_SIZES][VectorSupport::NUM_SVML_OP] = {{nullptr}, {nullptr}};
+address StubRoutines::_method_entry_barrier = nullptr;
address StubRoutines::_array_sort = nullptr;
address StubRoutines::_array_partition = nullptr;
diff --git a/src/hotspot/share/runtime/stubRoutines.hpp b/src/hotspot/share/runtime/stubRoutines.hpp
index 77d968263f75b..3000ed454a1e3 100644
--- a/src/hotspot/share/runtime/stubRoutines.hpp
+++ b/src/hotspot/share/runtime/stubRoutines.hpp
@@ -256,6 +256,8 @@ class StubRoutines: AllStatic {
static address _f2hf;
static address _hf2f;
+ static address _method_entry_barrier;
+
static address _cont_thaw;
static address _cont_returnBarrier;
static address _cont_returnBarrierExc;
@@ -460,6 +462,8 @@ class StubRoutines: AllStatic {
return ((hf2f_stub_t)_hf2f)(x);
}
+ static address method_entry_barrier() { return _method_entry_barrier; }
+
static address cont_thaw() { return _cont_thaw; }
static address cont_returnBarrier() { return _cont_returnBarrier; }
static address cont_returnBarrierExc(){return _cont_returnBarrierExc; }
diff --git a/src/hotspot/share/runtime/threads.cpp b/src/hotspot/share/runtime/threads.cpp
index b6ef42cd1d275..237e3a22451d0 100644
--- a/src/hotspot/share/runtime/threads.cpp
+++ b/src/hotspot/share/runtime/threads.cpp
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "cds/cds_globals.hpp"
+#include "cds/cdsConfig.hpp"
#include "cds/metaspaceShared.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/javaClasses.hpp"
@@ -815,7 +816,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
_vm_complete = true;
#endif
- if (DumpSharedSpaces) {
+ if (CDSConfig::is_dumping_static_archive()) {
MetaspaceShared::preload_and_dump();
}
diff --git a/src/hotspot/share/runtime/vmOperation.hpp b/src/hotspot/share/runtime/vmOperation.hpp
index 147cf9dc9779a..d6fac3f14f1fc 100644
--- a/src/hotspot/share/runtime/vmOperation.hpp
+++ b/src/hotspot/share/runtime/vmOperation.hpp
@@ -81,8 +81,6 @@
template(GetObjectMonitorUsage) \
template(GetAllStackTraces) \
template(GetThreadListStackTraces) \
- template(VirtualThreadGetStackTrace) \
- template(VirtualThreadGetFrameCount) \
template(ChangeBreakpoints) \
template(GetOrSetLocal) \
template(VirtualThreadGetOrSetLocal) \
diff --git a/src/hotspot/share/utilities/globalDefinitions.cpp b/src/hotspot/share/utilities/globalDefinitions.cpp
index 621951fc7d518..27af0fd6e8342 100644
--- a/src/hotspot/share/utilities/globalDefinitions.cpp
+++ b/src/hotspot/share/utilities/globalDefinitions.cpp
@@ -40,7 +40,6 @@ int BytesPerHeapOop = 0;
int BitsPerHeapOop = 0;
// Old CDS options
-bool DumpSharedSpaces;
bool RequireSharedSpaces;
extern "C" {
JNIEXPORT jboolean UseSharedSpaces = true;
diff --git a/src/hotspot/share/utilities/globalDefinitions.hpp b/src/hotspot/share/utilities/globalDefinitions.hpp
index fc72ed7343858..60938408dba65 100644
--- a/src/hotspot/share/utilities/globalDefinitions.hpp
+++ b/src/hotspot/share/utilities/globalDefinitions.hpp
@@ -553,7 +553,6 @@ const int max_method_code_size = 64*K - 1; // JVM spec, 2nd ed. section 4.8.1 (
//----------------------------------------------------------------------------------------------------
// old CDS options
-extern bool DumpSharedSpaces;
extern bool RequireSharedSpaces;
extern "C" {
// Make sure UseSharedSpaces is accessible to the serviceability agent.
diff --git a/src/hotspot/share/utilities/vmError.cpp b/src/hotspot/share/utilities/vmError.cpp
index ee24160408603..34372701f6e6f 100644
--- a/src/hotspot/share/utilities/vmError.cpp
+++ b/src/hotspot/share/utilities/vmError.cpp
@@ -493,7 +493,7 @@ static void print_oom_reasons(outputStream* st) {
st->print_cr("# Possible reasons:");
st->print_cr("# The system is out of physical RAM or swap space");
if (UseCompressedOops) {
- st->print_cr("# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap");
+ st->print_cr("# This process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap");
}
if (LogBytesPerWord == 2) {
st->print_cr("# In 32 bit mode, the process size limit was hit");
@@ -831,9 +831,9 @@ void VMError::report(outputStream* st, bool _verbose) {
"(mprotect) failed to protect ");
jio_snprintf(buf, sizeof(buf), SIZE_FORMAT, _size);
st->print("%s", buf);
- st->print(" bytes");
+ st->print(" bytes.");
if (strlen(_detail_msg) > 0) {
- st->print(" for ");
+ st->print(" Error detail: ");
st->print("%s", _detail_msg);
}
st->cr();
diff --git a/src/java.base/aix/classes/sun/nio/ch/PollsetPoller.java b/src/java.base/aix/classes/sun/nio/ch/PollsetPoller.java
index 413568861e54e..724f14495a8c8 100644
--- a/src/java.base/aix/classes/sun/nio/ch/PollsetPoller.java
+++ b/src/java.base/aix/classes/sun/nio/ch/PollsetPoller.java
@@ -66,7 +66,7 @@ void implRegister(int fd) throws IOException {
}
@Override
- void implDeregister(int fd) {
+ void implDeregister(int fd, boolean polled) {
int ret = Pollset.pollsetCtl(setid, Pollset.PS_DELETE, fd, 0);
assert ret == 0;
}
diff --git a/src/java.base/linux/classes/sun/nio/ch/EPollPoller.java b/src/java.base/linux/classes/sun/nio/ch/EPollPoller.java
index 4a8b2cdda08cf..cdebff7c7662d 100644
--- a/src/java.base/linux/classes/sun/nio/ch/EPollPoller.java
+++ b/src/java.base/linux/classes/sun/nio/ch/EPollPoller.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,8 +62,11 @@ void implRegister(int fdVal) throws IOException {
}
@Override
- void implDeregister(int fdVal) {
- EPoll.ctl(epfd, EPOLL_CTL_DEL, fdVal, 0);
+ void implDeregister(int fdVal, boolean polled) {
+ // event is disabled if already polled
+ if (!polled) {
+ EPoll.ctl(epfd, EPOLL_CTL_DEL, fdVal, 0);
+ }
}
@Override
diff --git a/src/java.base/macosx/classes/sun/nio/ch/KQueuePoller.java b/src/java.base/macosx/classes/sun/nio/ch/KQueuePoller.java
index 645b17e458e5d..6a1c771820e1c 100644
--- a/src/java.base/macosx/classes/sun/nio/ch/KQueuePoller.java
+++ b/src/java.base/macosx/classes/sun/nio/ch/KQueuePoller.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -56,8 +56,11 @@ void implRegister(int fdVal) throws IOException {
}
@Override
- void implDeregister(int fdVal) {
- KQueue.register(kqfd, fdVal, filter, EV_DELETE);
+ void implDeregister(int fdVal, boolean polled) {
+ // event was deleted if already polled
+ if (!polled) {
+ KQueue.register(kqfd, fdVal, filter, EV_DELETE);
+ }
}
@Override
diff --git a/src/java.base/share/classes/java/lang/foreign/Arena.java b/src/java.base/share/classes/java/lang/foreign/Arena.java
index adfc3a1fe6b2a..195f8a44db6e3 100644
--- a/src/java.base/share/classes/java/lang/foreign/Arena.java
+++ b/src/java.base/share/classes/java/lang/foreign/Arena.java
@@ -29,6 +29,7 @@
import jdk.internal.ref.CleanerFactory;
import java.lang.foreign.MemorySegment.Scope;
+import java.util.function.Consumer;
/**
* An arena controls the lifecycle of native memory segments, providing both flexible
@@ -317,8 +318,11 @@ static Arena ofShared() {
* @throws WrongThreadException if this arena is confined, and this method is called
* from a thread other than the arena's owner thread
* @throws UnsupportedOperationException if this arena cannot be closed explicitly
+ * @throws RuntimeException if an exception is thrown while executing a custom cleanup action
+ * associated with this arena (e.g. as a result of calling
+ * {@link MemorySegment#reinterpret(long, Arena, Consumer)} or
+ * {@link MemorySegment#reinterpret(Arena, Consumer)}).
*/
@Override
void close();
-
}
diff --git a/src/java.base/share/classes/java/nio/charset/Charset.java b/src/java.base/share/classes/java/nio/charset/Charset.java
index 2958825e80cdf..35c7e5b1cd5bd 100644
--- a/src/java.base/share/classes/java/nio/charset/Charset.java
+++ b/src/java.base/share/classes/java/nio/charset/Charset.java
@@ -42,7 +42,6 @@
import java.util.Locale;
import java.util.Map;
import java.util.NoSuchElementException;
-import java.util.Objects;
import java.util.ServiceConfigurationError;
import java.util.ServiceLoader;
import java.util.Set;
@@ -706,7 +705,12 @@ public static Charset defaultCharset() {
* If the canonical name or any of the aliases are illegal
*/
protected Charset(String canonicalName, String[] aliases) {
- String[] as = Objects.requireNonNullElse(aliases, zeroAliases);
+ String[] as =
+ aliases == null ?
+ zeroAliases :
+ VM.isSystemDomainLoader(getClass().getClassLoader()) ?
+ aliases :
+ Arrays.copyOf(aliases, aliases.length);
// Skip checks for the standard, built-in Charsets we always load
// during initialization.
diff --git a/src/java.base/share/classes/java/util/Formatter.java b/src/java.base/share/classes/java/util/Formatter.java
index 5febf0d9153dc..9956ba18d693e 100644
--- a/src/java.base/share/classes/java/util/Formatter.java
+++ b/src/java.base/share/classes/java/util/Formatter.java
@@ -56,6 +56,7 @@
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZoneOffset;
+import java.time.chrono.IsoChronology;
import java.time.temporal.ChronoField;
import java.time.temporal.TemporalAccessor;
import java.time.temporal.TemporalQueries;
@@ -2050,6 +2051,11 @@ private static char getGroupingSeparator(Locale locale) {
return locale == null ? ',' : getDecimalFormatSymbols(locale).getGroupingSeparator();
}
+ // Use minus sign from cached DecimalFormatSymbols.
+ private static char getMinusSign(Locale locale) {
+ return locale == null ? '-' : getDecimalFormatSymbols(locale).getMinusSign();
+ }
+
private Appendable a;
private final Locale l;
private IOException lastException;
@@ -4490,7 +4496,20 @@ private Appendable print(Formatter fmt, StringBuilder sb, TemporalAccessor t, ch
}
case DateTime.ISO_STANDARD_DATE: { // 'F' (%Y-%m-%d)
char sep = '-';
- print(fmt, sb, t, DateTime.YEAR_4, l).append(sep);
+ ChronoField yearField;
+ if (t.query(TemporalQueries.chronology()) instanceof IsoChronology) {
+ yearField = ChronoField.YEAR;
+ } else {
+ yearField = ChronoField.YEAR_OF_ERA;
+ }
+ int year = t.get(yearField);
+ if (year < 0) {
+ sb.append(getMinusSign(l));
+ year = -year;
+ } else if (year > 9999) {
+ sb.append('+');
+ }
+ sb.append(localizedMagnitude(fmt, null, year, Flags.ZERO_PAD, 4, l)).append(sep);
print(fmt, sb, t, DateTime.MONTH, l).append(sep);
print(fmt, sb, t, DateTime.DAY_OF_MONTH_0, l);
break;
diff --git a/src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java b/src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java
index 13fb3d38ed3f8..27e68b9ecf9b4 100644
--- a/src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java
+++ b/src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java
@@ -323,7 +323,7 @@ private void generate() {
for (int i = 0; i < framesCount; i++) {
var frame = frames.get(i);
if (frame.flags == -1) {
- if (!patchDeadCode) generatorError("Unable to generate stack map frame for dead code", frame.offset);
+ if (!patchDeadCode) throw generatorError("Unable to generate stack map frame for dead code", frame.offset);
//patch frame
frame.pushStack(Type.THROWABLE_TYPE);
if (maxStack < 1) maxStack = 1;
@@ -416,7 +416,7 @@ private void processMethod() {
if (stackmapIndex < frames.size()) {
int thisOffset = frames.get(stackmapIndex).offset;
if (ncf && thisOffset > bcs.bci) {
- generatorError("Expecting a stack map frame");
+ throw generatorError("Expecting a stack map frame");
}
if (thisOffset == bcs.bci) {
if (!ncf) {
@@ -435,7 +435,7 @@ private void processMethod() {
throw new ClassFormatError(String.format("Bad stack map offset %d", thisOffset));
}
} else if (ncf) {
- generatorError("Expecting a stack map frame");
+ throw generatorError("Expecting a stack map frame");
}
ncf = processBlock(bcs);
}
@@ -659,9 +659,9 @@ private boolean processBlock(RawBytecodeHelper bcs) {
currentFrame.pushStack(type1);
}
case JSR, JSR_W, RET ->
- generatorError("Instructions jsr, jsr_w, or ret must not appear in the class file version >= 51.0");
+ throw generatorError("Instructions jsr, jsr_w, or ret must not appear in the class file version >= 51.0");
default ->
- generatorError(String.format("Bad instruction: %02x", opcode));
+ throw generatorError(String.format("Bad instruction: %02x", opcode));
}
if (!verified_exc_handlers && bci >= exMin && bci < exMax) {
processExceptionHandlerTargets(bci, this_uninit);
@@ -704,7 +704,7 @@ private void processLdc(int index) {
case TAG_CONSTANTDYNAMIC ->
currentFrame.pushStack(((ConstantDynamicEntry)cp.entryByIndex(index)).asSymbol().constantType());
default ->
- generatorError("CP entry #%d %s is not loadable constant".formatted(index, cp.entryByIndex(index).tag()));
+ throw generatorError("CP entry #%d %s is not loadable constant".formatted(index, cp.entryByIndex(index).tag()));
}
}
@@ -718,24 +718,24 @@ private void processSwitch(RawBytecodeHelper bcs) {
int low = bcs.getInt(alignedBci + 4);
int high = bcs.getInt(alignedBci + 2 * 4);
if (low > high) {
- generatorError("low must be less than or equal to high in tableswitch");
+ throw generatorError("low must be less than or equal to high in tableswitch");
}
keys = high - low + 1;
if (keys < 0) {
- generatorError("too many keys in tableswitch");
+ throw generatorError("too many keys in tableswitch");
}
delta = 1;
} else {
keys = bcs.getInt(alignedBci + 4);
if (keys < 0) {
- generatorError("number of keys in lookupswitch less than 0");
+ throw generatorError("number of keys in lookupswitch less than 0");
}
delta = 2;
for (int i = 0; i < (keys - 1); i++) {
int this_key = bcs.getInt(alignedBci + (2 + 2 * i) * 4);
int next_key = bcs.getInt(alignedBci + (2 + 2 * i + 2) * 4);
if (this_key >= next_key) {
- generatorError("Bad lookupswitch instruction");
+ throw generatorError("Bad lookupswitch instruction");
}
}
}
@@ -797,7 +797,7 @@ private boolean processInvokeInstructions(RawBytecodeHelper bcs, boolean inTryBl
}
currentFrame.initializeObject(type, new_class_type);
} else {
- generatorError("Bad operand type when invoking ");
+ throw generatorError("Bad operand type when invoking ");
}
} else {
currentFrame.popStack();
@@ -808,7 +808,7 @@ private boolean processInvokeInstructions(RawBytecodeHelper bcs, boolean inTryBl
}
private Type getNewarrayType(int index) {
- if (index < T_BOOLEAN || index > T_LONG) generatorError("Illegal newarray instruction type %d".formatted(index));
+ if (index < T_BOOLEAN || index > T_LONG) throw generatorError("Illegal newarray instruction type %d".formatted(index));
return ARRAY_FROM_BASIC_TYPE[index];
}
@@ -818,19 +818,19 @@ private void processAnewarray(int index) {
}
/**
- * Throws java.lang.VerifyError
with given error message
+ * {@return the generator error with attached details}
* @param msg error message
*/
- private void generatorError(String msg) {
- generatorError(msg, currentFrame.offset);
+ private IllegalArgumentException generatorError(String msg) {
+ return generatorError(msg, currentFrame.offset);
}
- /**
- * Throws java.lang.VerifyError
with given error message
+ /**
+ * {@return the generator error with attached details}
* @param msg error message
* @param offset bytecode offset where the error occurred
*/
- private void generatorError(String msg, int offset) {
+ private IllegalArgumentException generatorError(String msg, int offset) {
var sb = new StringBuilder("%s at bytecode offset %d of method %s(%s)".formatted(
msg,
offset,
@@ -862,11 +862,11 @@ public void writeBody(BufWriter b) {
sb.append(" %02x".formatted(bytecode.get()));
}
}
- var err = new VerifyError(sb.toString());
+ var err = new IllegalArgumentException(sb.toString());
err.addSuppressed(suppresed);
- throw err;
+ return err;
}
- throw new IllegalArgumentException(sb.toString());
+ return new IllegalArgumentException(sb.toString());
}
/**
@@ -931,13 +931,13 @@ public void set(int i) {
default -> false;
};
} catch (IllegalArgumentException iae) {
- generatorError("Detected branch target out of bytecode range", bci);
+ throw generatorError("Detected branch target out of bytecode range", bci);
}
for (var exhandler : rawHandlers) try {
offsets.set(exhandler.handler());
} catch (IllegalArgumentException iae) {
if (!filterDeadLabels)
- generatorError("Detected exception handler out of bytecode range");
+ throw generatorError("Detected exception handler out of bytecode range");
}
return offsets;
}
@@ -1009,13 +1009,13 @@ Frame pushStack(Type type1, Type type2) {
}
Type popStack() {
- if (stackSize < 1) generatorError("Operand stack underflow");
+ if (stackSize < 1) throw generatorError("Operand stack underflow");
return stack[--stackSize];
}
Frame decStack(int size) {
stackSize -= size;
- if (stackSize < 0) generatorError("Operand stack underflow");
+ if (stackSize < 0) throw generatorError("Operand stack underflow");
return this;
}
@@ -1134,8 +1134,13 @@ void checkAssignableTo(Frame target) {
for (int i = 0; i < target.localsSize; i++) {
merge(locals[i], target.locals, i, target);
}
+ if (stackSize != target.stackSize) {
+ throw generatorError("Stack size mismatch");
+ }
for (int i = 0; i < target.stackSize; i++) {
- merge(stack[i], target.stack, i, target);
+ if (merge(stack[i], target.stack, i, target) == Type.TOP_TYPE) {
+ throw generatorError("Stack content mismatch");
+ }
}
}
}
@@ -1183,13 +1188,14 @@ void setLocal2(int index, Type type1, Type type2) {
}
}
- private void merge(Type me, Type[] toTypes, int i, Frame target) {
+ private Type merge(Type me, Type[] toTypes, int i, Frame target) {
var to = toTypes[i];
var newTo = to.mergeFrom(me, classHierarchy);
if (to != newTo && !to.equals(newTo)) {
toTypes[i] = newTo;
target.dirty = true;
}
+ return newTo;
}
private static int trimAndCompress(Type[] types, int count) {
diff --git a/src/java.base/share/classes/jdk/internal/foreign/MemorySessionImpl.java b/src/java.base/share/classes/jdk/internal/foreign/MemorySessionImpl.java
index b74ccf33936e2..7ac94ef6b93e2 100644
--- a/src/java.base/share/classes/jdk/internal/foreign/MemorySessionImpl.java
+++ b/src/java.base/share/classes/jdk/internal/foreign/MemorySessionImpl.java
@@ -254,11 +254,24 @@ public final void run() {
}
static void cleanup(ResourceCleanup first) {
+ RuntimeException pendingException = null;
ResourceCleanup current = first;
while (current != null) {
- current.cleanup();
+ try {
+ current.cleanup();
+ } catch (RuntimeException ex) {
+ if (pendingException == null) {
+ pendingException = ex;
+ } else if (ex != pendingException) {
+ // note: self-suppression is not supported
+ pendingException.addSuppressed(ex);
+ }
+ }
current = current.next;
}
+ if (pendingException != null) {
+ throw pendingException;
+ }
}
public abstract static class ResourceCleanup {
diff --git a/src/java.base/share/classes/module-info.java b/src/java.base/share/classes/module-info.java
index 161cbe380cf8f..2a4c5aa81ed90 100644
--- a/src/java.base/share/classes/module-info.java
+++ b/src/java.base/share/classes/module-info.java
@@ -148,6 +148,7 @@
// module declaration be annotated with jdk.internal.javac.ParticipatesInPreview
exports jdk.internal.javac to
java.compiler,
+ java.desktop, // for ScopedValue
jdk.compiler,
jdk.incubator.vector,
jdk.jshell;
diff --git a/src/java.base/share/classes/sun/nio/ch/Poller.java b/src/java.base/share/classes/sun/nio/ch/Poller.java
index f62371d8344dc..3c1b3c2e193b6 100644
--- a/src/java.base/share/classes/sun/nio/ch/Poller.java
+++ b/src/java.base/share/classes/sun/nio/ch/Poller.java
@@ -94,14 +94,16 @@ int fdVal() {
}
/**
- * Register the file descriptor.
+ * Register the file descriptor. The registration is "one shot", meaning it should
+ * be polled at most once.
*/
abstract void implRegister(int fdVal) throws IOException;
/**
* Deregister the file descriptor.
+ * @param polled true if the file descriptor has already been polled
*/
- abstract void implDeregister(int fdVal);
+ abstract void implDeregister(int fdVal, boolean polled);
/**
* Poll for events. The {@link #polled(int)} method is invoked for each
@@ -182,23 +184,23 @@ private void poll(int fdVal, long nanos, BooleanSupplier supplier) throws IOExce
}
/**
- * Registers the file descriptor.
+ * Registers the file descriptor to be polled at most once when the file descriptor
+ * is ready for I/O.
*/
private void register(int fdVal) throws IOException {
- Thread previous = map.putIfAbsent(fdVal, Thread.currentThread());
+ Thread previous = map.put(fdVal, Thread.currentThread());
assert previous == null;
implRegister(fdVal);
}
/**
- * Deregister the file descriptor, a no-op if already polled.
+ * Deregister the file descriptor so that the file descriptor is not polled.
*/
private void deregister(int fdVal) {
Thread previous = map.remove(fdVal);
- assert previous == null || previous == Thread.currentThread();
- if (previous != null) {
- implDeregister(fdVal);
- }
+ boolean polled = (previous == null);
+ assert polled || previous == Thread.currentThread();
+ implDeregister(fdVal, polled);
}
/**
diff --git a/src/java.base/share/classes/sun/security/provider/SHA3.java b/src/java.base/share/classes/sun/security/provider/SHA3.java
index a4ff7feddbf69..2b8bf8afbedaf 100644
--- a/src/java.base/share/classes/sun/security/provider/SHA3.java
+++ b/src/java.base/share/classes/sun/security/provider/SHA3.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,15 @@ void implDigest(byte[] out, int ofs) {
throw new ProviderException("Incorrect pad size: " + numOfPadding);
}
implCompress(buffer, 0);
- System.arraycopy(state, 0, out, ofs, engineGetDigestLength());
+ int availableBytes = buffer.length;
+ int numBytes = engineGetDigestLength();
+ while (numBytes > availableBytes) {
+ System.arraycopy(state, 0, out, ofs, availableBytes);
+ numBytes -= availableBytes;
+ ofs += availableBytes;
+ keccak();
+ }
+ System.arraycopy(state, 0, out, ofs, numBytes);
}
/**
@@ -162,7 +170,7 @@ private static void lanes2Bytes(long[] m, byte[] s) {
/**
* The function Keccak as defined in section 5.2 with
- * rate r = 1600 and capacity c = (digest length x 2).
+ * rate r = 1600 and capacity c.
*/
private void keccak() {
// convert the 200-byte state into 25 lanes
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/AccessKind.java b/src/java.base/share/classes/sun/security/provider/SHAKE128.java
similarity index 66%
rename from src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/AccessKind.java
rename to src/java.base/share/classes/sun/security/provider/SHAKE128.java
index 2e07a421acbb6..0d62497b3b4c1 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/AccessKind.java
+++ b/src/java.base/share/classes/sun/security/provider/SHAKE128.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* 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,19 +22,28 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
+package sun.security.provider;
-package jdk.javadoc.internal.tool;
-
-/**
- * The access value kinds.
+/*
+ * The SHAKE128 extendable output function.
*/
-public enum AccessKind {
- /** Limits access to public entities */
- PUBLIC,
- /** Limits access to public and protected entities */
- PROTECTED,
- /** Limits access to public, protected and package private entities */
- PACKAGE,
- /** No limits */
- PRIVATE;
+public final class SHAKE128 extends SHA3 {
+ public SHAKE128(int d) {
+ super("SHAKE128", d, (byte) 0x1F, 32);
+ }
+
+ public void update(byte in) {
+ engineUpdate(in);
+ }
+ public void update(byte[] in, int off, int len) {
+ engineUpdate(in, off, len);
+ }
+
+ public byte[] digest() {
+ return engineDigest();
+ }
+
+ public void reset() {
+ engineReset();
+ }
}
diff --git a/src/java.base/share/classes/sun/util/PreHashedMap.java b/src/java.base/share/classes/sun/util/PreHashedMap.java
index 724af5412efb6..7aa37f769e2ac 100644
--- a/src/java.base/share/classes/sun/util/PreHashedMap.java
+++ b/src/java.base/share/classes/sun/util/PreHashedMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,7 +243,7 @@ public boolean hasNext() {
public Map.Entry next() {
return new Map.Entry() {
- String k = i.next();
+ final String k = i.next();
public String getKey() { return k; }
public V getValue() { return get(k); }
public int hashCode() {
diff --git a/src/java.base/share/classes/sun/util/PropertyResourceBundleCharset.java b/src/java.base/share/classes/sun/util/PropertyResourceBundleCharset.java
index 94084fcb37fd6..1beda8ee1b958 100644
--- a/src/java.base/share/classes/sun/util/PropertyResourceBundleCharset.java
+++ b/src/java.base/share/classes/sun/util/PropertyResourceBundleCharset.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,6 @@
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CoderResult;
import java.nio.charset.CodingErrorAction;
-import java.nio.charset.StandardCharsets;
import java.util.Objects;
/**
@@ -45,17 +44,13 @@
*/
public class PropertyResourceBundleCharset extends Charset {
- private boolean strictUTF8 = false;
+ private final boolean strictUTF8;
public PropertyResourceBundleCharset(boolean strictUTF8) {
- this(PropertyResourceBundleCharset.class.getCanonicalName(), null);
+ super(PropertyResourceBundleCharset.class.getCanonicalName(), null);
this.strictUTF8 = strictUTF8;
}
- public PropertyResourceBundleCharset(String canonicalName, String[] aliases) {
- super(canonicalName, aliases);
- }
-
@Override
public boolean contains(Charset cs) {
return false;
@@ -73,7 +68,7 @@ public CharsetEncoder newEncoder() {
private final class PropertiesFileDecoder extends CharsetDecoder {
- private CharsetDecoder cdUTF_8 = UTF_8.INSTANCE.newDecoder()
+ private final CharsetDecoder cdUTF_8 = UTF_8.INSTANCE.newDecoder()
.onMalformedInput(CodingErrorAction.REPORT)
.onUnmappableCharacter(CodingErrorAction.REPORT);
private CharsetDecoder cdISO_8859_1 = null;
diff --git a/src/java.base/share/classes/sun/util/ResourceBundleEnumeration.java b/src/java.base/share/classes/sun/util/ResourceBundleEnumeration.java
index ce574f3b3f782..c17c314d3a750 100644
--- a/src/java.base/share/classes/sun/util/ResourceBundleEnumeration.java
+++ b/src/java.base/share/classes/sun/util/ResourceBundleEnumeration.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@
*/
public class ResourceBundleEnumeration implements Enumeration {
- Set set;
- Iterator iterator;
- Enumeration enumeration; // may remain null
+ private final Set set;
+ private final Iterator iterator;
+ private final Enumeration enumeration; // may remain null
/**
* Constructs a resource bundle enumeration.
diff --git a/src/java.base/share/classes/sun/util/calendar/LocalGregorianCalendar.java b/src/java.base/share/classes/sun/util/calendar/LocalGregorianCalendar.java
index cb567e8c05262..b9d520d4083e1 100644
--- a/src/java.base/share/classes/sun/util/calendar/LocalGregorianCalendar.java
+++ b/src/java.base/share/classes/sun/util/calendar/LocalGregorianCalendar.java
@@ -60,8 +60,8 @@ private static boolean isValidEra(Era newEra, Era[] eras) {
return true;
}
- private String name;
- private Era[] eras;
+ private final String name;
+ private final Era[] eras;
// Used within java.time and java.util
public static final class Date extends BaseCalendar.Date {
diff --git a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
index 6abc5b6eec59c..ada1fddd3f317 100644
--- a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
+++ b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
@@ -210,7 +210,7 @@ private ZoneInfoFile() {
private static String versionId;
private static final Map zones = new ConcurrentHashMap<>();
- private static Map aliases = new HashMap<>();
+ private static final Map aliases = new HashMap<>();
private static byte[][] ruleArray;
private static String[] regions;
@@ -219,7 +219,7 @@ private ZoneInfoFile() {
// Flag for supporting JDK backward compatible IDs, such as "EST".
private static final boolean USE_OLDMAPPING;
- private static String[][] oldMappings = new String[][] {
+ private static final String[][] oldMappings = new String[][] {
{ "ACT", "Australia/Darwin" },
{ "AET", "Australia/Sydney" },
{ "AGT", "America/Argentina/Buenos_Aires" },
diff --git a/src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java b/src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java
index 388af637e54d0..56cbf42ba7870 100644
--- a/src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java
+++ b/src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,12 @@
import static sun.util.locale.provider.LocaleProviderAdapter.Type;
-import java.util.Arrays;
import java.util.Map;
import java.util.Locale;
import java.util.Set;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import sun.util.locale.provider.LocaleProviderAdapter;
-import sun.util.locale.provider.LocaleResources;
import sun.util.locale.provider.CalendarDataProviderImpl;
import sun.util.locale.provider.CalendarDataUtility;
@@ -47,8 +45,8 @@
*/
public class CLDRCalendarDataProviderImpl extends CalendarDataProviderImpl {
- private static Map firstDay = new ConcurrentHashMap<>();
- private static Map minDays = new ConcurrentHashMap<>();
+ private static final Map firstDay = new ConcurrentHashMap<>();
+ private static final Map minDays = new ConcurrentHashMap<>();
public CLDRCalendarDataProviderImpl(Type type, Set langtags) {
super(type, langtags);
diff --git a/src/java.base/share/classes/sun/util/cldr/CLDRLocaleProviderAdapter.java b/src/java.base/share/classes/sun/util/cldr/CLDRLocaleProviderAdapter.java
index 7ac8703a1062c..9f65e32fa27cd 100644
--- a/src/java.base/share/classes/sun/util/cldr/CLDRLocaleProviderAdapter.java
+++ b/src/java.base/share/classes/sun/util/cldr/CLDRLocaleProviderAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 CLDRLocaleProviderAdapter extends JRELocaleProviderAdapter {
private final LocaleDataMetaInfo nonBaseMetaInfo;
// parent locales map
- private static volatile Map parentLocalesMap;
+ private static final Map parentLocalesMap;
// cache to hold locale to locale mapping for language aliases.
private static final Map langAliasesCache;
// cache the available locales
diff --git a/src/java.base/share/classes/sun/util/locale/LocaleObjectCache.java b/src/java.base/share/classes/sun/util/locale/LocaleObjectCache.java
index 50a1c2406aecd..8712f8b8ad8aa 100644
--- a/src/java.base/share/classes/sun/util/locale/LocaleObjectCache.java
+++ b/src/java.base/share/classes/sun/util/locale/LocaleObjectCache.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,7 +100,7 @@ protected K normalizeKey(K key) {
}
private static class CacheEntry extends SoftReference {
- private K key;
+ private final K key;
CacheEntry(K key, V value, ReferenceQueue queue) {
super(value, queue);
diff --git a/src/java.base/share/classes/sun/util/locale/LocaleSyntaxException.java b/src/java.base/share/classes/sun/util/locale/LocaleSyntaxException.java
index 9cb7b52850a8b..8bc124f31cf8c 100644
--- a/src/java.base/share/classes/sun/util/locale/LocaleSyntaxException.java
+++ b/src/java.base/share/classes/sun/util/locale/LocaleSyntaxException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@ public class LocaleSyntaxException extends Exception {
@java.io.Serial
private static final long serialVersionUID = 1L;
- private int index = -1;
+ private final int index;
public LocaleSyntaxException(String msg) {
this(msg, 0);
diff --git a/src/java.base/share/classes/sun/util/locale/StringTokenIterator.java b/src/java.base/share/classes/sun/util/locale/StringTokenIterator.java
index f66bfd537528f..487a7824531ee 100644
--- a/src/java.base/share/classes/sun/util/locale/StringTokenIterator.java
+++ b/src/java.base/share/classes/sun/util/locale/StringTokenIterator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@
package sun.util.locale;
public class StringTokenIterator {
- private String text;
- private String dlms; // null if a single char delimiter
- private char delimiterChar; // delimiter if a single char delimiter
+ private final String text;
+ private final String dlms; // null if a single char delimiter
+ private final char delimiterChar; // delimiter if a single char delimiter
private String token;
private int start;
@@ -44,7 +44,9 @@ public StringTokenIterator(String text, String dlms) {
this.text = text;
if (dlms.length() == 1) {
delimiterChar = dlms.charAt(0);
+ this.dlms = null;
} else {
+ delimiterChar = 0;
this.dlms = dlms;
}
setStart(0);
@@ -99,12 +101,6 @@ public StringTokenIterator setStart(int offset) {
return this;
}
- public StringTokenIterator setText(String text) {
- this.text = text;
- setStart(0);
- return this;
- }
-
private int nextDelimiter(int start) {
int textlen = this.text.length();
if (dlms == null) {
diff --git a/src/java.base/share/data/publicsuffixlist/VERSION b/src/java.base/share/data/publicsuffixlist/VERSION
index 4ffc88dbd8332..f86d2df03ca38 100644
--- a/src/java.base/share/data/publicsuffixlist/VERSION
+++ b/src/java.base/share/data/publicsuffixlist/VERSION
@@ -1,2 +1,2 @@
-Github: https://raw.githubusercontent.com/publicsuffix/list/88467c960d6cdad2ca1623e892e5e17506bc269f/public_suffix_list.dat
-Date: 2023-04-14
+Github: https://raw.githubusercontent.com/publicsuffix/list/b5bf572c52988dbe9d865b8f090ea819024a9936/public_suffix_list.dat
+Date: 2023-11-09
diff --git a/src/java.base/share/data/publicsuffixlist/public_suffix_list.dat b/src/java.base/share/data/publicsuffixlist/public_suffix_list.dat
index d9f0c71dbb447..fff6e9a494d64 100644
--- a/src/java.base/share/data/publicsuffixlist/public_suffix_list.dat
+++ b/src/java.base/share/data/publicsuffixlist/public_suffix_list.dat
@@ -1059,22 +1059,11 @@ gouv.fr
nom.fr
prd.fr
tm.fr
-// Former "domaines sectoriels", still registration suffixes
-aeroport.fr
-avocat.fr
+// Other SLDs now selfmanaged out of AFNIC range. Former "domaines sectoriels", still registration suffixes
avoues.fr
cci.fr
-chambagri.fr
-chirurgiens-dentistes.fr
-experts-comptables.fr
-geometre-expert.fr
greta.fr
huissier-justice.fr
-medecin.fr
-notaires.fr
-pharmacien.fr
-port.fr
-veterinaire.fr
// ga : https://en.wikipedia.org/wiki/.ga
ga
@@ -5146,52 +5135,60 @@ turystyka.pl
// Government domains
gov.pl
ap.gov.pl
+griw.gov.pl
ic.gov.pl
is.gov.pl
-us.gov.pl
kmpsp.gov.pl
+konsulat.gov.pl
kppsp.gov.pl
-kwpsp.gov.pl
-psp.gov.pl
-wskr.gov.pl
kwp.gov.pl
+kwpsp.gov.pl
+mup.gov.pl
mw.gov.pl
-ug.gov.pl
-um.gov.pl
-umig.gov.pl
-ugim.gov.pl
-upow.gov.pl
-uw.gov.pl
-starostwo.gov.pl
+oia.gov.pl
+oirm.gov.pl
+oke.gov.pl
+oow.gov.pl
+oschr.gov.pl
+oum.gov.pl
pa.gov.pl
+pinb.gov.pl
+piw.gov.pl
po.gov.pl
+pr.gov.pl
+psp.gov.pl
psse.gov.pl
pup.gov.pl
rzgw.gov.pl
sa.gov.pl
+sdn.gov.pl
+sko.gov.pl
so.gov.pl
sr.gov.pl
-wsa.gov.pl
-sko.gov.pl
+starostwo.gov.pl
+ug.gov.pl
+ugim.gov.pl
+um.gov.pl
+umig.gov.pl
+upow.gov.pl
+uppo.gov.pl
+us.gov.pl
+uw.gov.pl
uzs.gov.pl
+wif.gov.pl
wiih.gov.pl
winb.gov.pl
-pinb.gov.pl
wios.gov.pl
witd.gov.pl
-wzmiuw.gov.pl
-piw.gov.pl
wiw.gov.pl
-griw.gov.pl
-wif.gov.pl
-oum.gov.pl
-sdn.gov.pl
-zp.gov.pl
-uppo.gov.pl
-mup.gov.pl
+wkz.gov.pl
+wsa.gov.pl
+wskr.gov.pl
+wsse.gov.pl
wuoz.gov.pl
-konsulat.gov.pl
-oirm.gov.pl
+wzmiuw.gov.pl
+zp.gov.pl
+zpisdn.gov.pl
// pl regional domains (http://www.dns.pl/english/index.html)
augustow.pl
babia-gora.pl
@@ -5876,6 +5873,7 @@ kiev.ua
kirovograd.ua
km.ua
kr.ua
+kropyvnytskyi.ua
krym.ua
ks.ua
kv.ua
@@ -5883,6 +5881,7 @@ kyiv.ua
lg.ua
lt.ua
lugansk.ua
+luhansk.ua
lutsk.ua
lv.ua
lviv.ua
@@ -5906,11 +5905,13 @@ te.ua
ternopil.ua
uz.ua
uzhgorod.ua
+uzhhorod.ua
vinnica.ua
vinnytsia.ua
vn.ua
volyn.ua
yalta.ua
+zakarpattia.ua
zaporizhzhe.ua
zaporizhzhia.ua
zhitomir.ua
@@ -6022,7 +6023,6 @@ k12.ca.us
k12.co.us
k12.ct.us
k12.dc.us
-k12.de.us
k12.fl.us
k12.ga.us
k12.gu.us
@@ -6264,20 +6264,89 @@ k12.vi
net.vi
org.vi
-// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp
+// vn : https://www.vnnic.vn/en/domain/cctld-vn
+// https://vnnic.vn/sites/default/files/tailieu/vn.cctld.domains.txt
vn
+ac.vn
+ai.vn
+biz.vn
com.vn
-net.vn
-org.vn
edu.vn
gov.vn
-int.vn
-ac.vn
-biz.vn
+health.vn
+id.vn
info.vn
+int.vn
+io.vn
name.vn
+net.vn
+org.vn
pro.vn
-health.vn
+
+// vn geographical names
+angiang.vn
+bacgiang.vn
+backan.vn
+baclieu.vn
+bacninh.vn
+baria-vungtau.vn
+bentre.vn
+binhdinh.vn
+binhduong.vn
+binhphuoc.vn
+binhthuan.vn
+camau.vn
+cantho.vn
+caobang.vn
+daklak.vn
+daknong.vn
+danang.vn
+dienbien.vn
+dongnai.vn
+dongthap.vn
+gialai.vn
+hagiang.vn
+haiduong.vn
+haiphong.vn
+hanam.vn
+hanoi.vn
+hatinh.vn
+haugiang.vn
+hoabinh.vn
+hungyen.vn
+khanhhoa.vn
+kiengiang.vn
+kontum.vn
+laichau.vn
+lamdong.vn
+langson.vn
+laocai.vn
+longan.vn
+namdinh.vn
+nghean.vn
+ninhbinh.vn
+ninhthuan.vn
+phutho.vn
+phuyen.vn
+quangbinh.vn
+quangnam.vn
+quangngai.vn
+quangninh.vn
+quangtri.vn
+soctrang.vn
+sonla.vn
+tayninh.vn
+thaibinh.vn
+thainguyen.vn
+thanhhoa.vn
+thanhphohochiminh.vn
+thuathienhue.vn
+tiengiang.vn
+travinh.vn
+tuyenquang.vn
+vinhlong.vn
+vinhphuc.vn
+yenbai.vn
// vu : https://en.wikipedia.org/wiki/.vu
// http://www.vunic.vu/
@@ -6641,3447 +6710,4506 @@ org.zw
// newGTLDs
-// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2023-04-14T15:13:16Z
+// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2023-11-03T15:13:18Z
// This list is auto-generated, don't edit it manually.
-// aaa : 2015-02-26 American Automobile Association, Inc.
+// aaa : American Automobile Association, Inc.
+// https://www.iana.org/domains/root/db/aaa.html
aaa
-// aarp : 2015-05-21 AARP
+// aarp : AARP
+// https://www.iana.org/domains/root/db/aarp.html
aarp
-// abarth : 2015-07-30 Fiat Chrysler Automobiles N.V.
-abarth
-
-// abb : 2014-10-24 ABB Ltd
+// abb : ABB Ltd
+// https://www.iana.org/domains/root/db/abb.html
abb
-// abbott : 2014-07-24 Abbott Laboratories, Inc.
+// abbott : Abbott Laboratories, Inc.
+// https://www.iana.org/domains/root/db/abbott.html
abbott
-// abbvie : 2015-07-30 AbbVie Inc.
+// abbvie : AbbVie Inc.
+// https://www.iana.org/domains/root/db/abbvie.html
abbvie
-// abc : 2015-07-30 Disney Enterprises, Inc.
+// abc : Disney Enterprises, Inc.
+// https://www.iana.org/domains/root/db/abc.html
abc
-// able : 2015-06-25 Able Inc.
+// able : Able Inc.
+// https://www.iana.org/domains/root/db/able.html
able
-// abogado : 2014-04-24 Registry Services, LLC
+// abogado : Registry Services, LLC
+// https://www.iana.org/domains/root/db/abogado.html
abogado
-// abudhabi : 2015-07-30 Abu Dhabi Systems and Information Centre
+// abudhabi : Abu Dhabi Systems and Information Centre
+// https://www.iana.org/domains/root/db/abudhabi.html
abudhabi
-// academy : 2013-11-07 Binky Moon, LLC
+// academy : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/academy.html
academy
-// accenture : 2014-08-15 Accenture plc
+// accenture : Accenture plc
+// https://www.iana.org/domains/root/db/accenture.html
accenture
-// accountant : 2014-11-20 dot Accountant Limited
+// accountant : dot Accountant Limited
+// https://www.iana.org/domains/root/db/accountant.html
accountant
-// accountants : 2014-03-20 Binky Moon, LLC
+// accountants : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/accountants.html
accountants
-// aco : 2015-01-08 ACO Severin Ahlmann GmbH & Co. KG
+// aco : ACO Severin Ahlmann GmbH & Co. KG
+// https://www.iana.org/domains/root/db/aco.html
aco
-// actor : 2013-12-12 Dog Beach, LLC
+// actor : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/actor.html
actor
-// ads : 2014-12-04 Charleston Road Registry Inc.
+// ads : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/ads.html
ads
-// adult : 2014-10-16 ICM Registry AD LLC
+// adult : ICM Registry AD LLC
+// https://www.iana.org/domains/root/db/adult.html
adult
-// aeg : 2015-03-19 Aktiebolaget Electrolux
+// aeg : Aktiebolaget Electrolux
+// https://www.iana.org/domains/root/db/aeg.html
aeg
-// aetna : 2015-05-21 Aetna Life Insurance Company
+// aetna : Aetna Life Insurance Company
+// https://www.iana.org/domains/root/db/aetna.html
aetna
-// afl : 2014-10-02 Australian Football League
+// afl : Australian Football League
+// https://www.iana.org/domains/root/db/afl.html
afl
-// africa : 2014-03-24 ZA Central Registry NPC trading as Registry.Africa
+// africa : ZA Central Registry NPC trading as Registry.Africa
+// https://www.iana.org/domains/root/db/africa.html
africa
-// agakhan : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation)
+// agakhan : Fondation Aga Khan (Aga Khan Foundation)
+// https://www.iana.org/domains/root/db/agakhan.html
agakhan
-// agency : 2013-11-14 Binky Moon, LLC
+// agency : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/agency.html
agency
-// aig : 2014-12-18 American International Group, Inc.
+// aig : American International Group, Inc.
+// https://www.iana.org/domains/root/db/aig.html
aig
-// airbus : 2015-07-30 Airbus S.A.S.
+// airbus : Airbus S.A.S.
+// https://www.iana.org/domains/root/db/airbus.html
airbus
-// airforce : 2014-03-06 Dog Beach, LLC
+// airforce : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/airforce.html
airforce
-// airtel : 2014-10-24 Bharti Airtel Limited
+// airtel : Bharti Airtel Limited
+// https://www.iana.org/domains/root/db/airtel.html
airtel
-// akdn : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation)
+// akdn : Fondation Aga Khan (Aga Khan Foundation)
+// https://www.iana.org/domains/root/db/akdn.html
akdn
-// alfaromeo : 2015-07-31 Fiat Chrysler Automobiles N.V.
-alfaromeo
-
-// alibaba : 2015-01-15 Alibaba Group Holding Limited
+// alibaba : Alibaba Group Holding Limited
+// https://www.iana.org/domains/root/db/alibaba.html
alibaba
-// alipay : 2015-01-15 Alibaba Group Holding Limited
+// alipay : Alibaba Group Holding Limited
+// https://www.iana.org/domains/root/db/alipay.html
alipay
-// allfinanz : 2014-07-03 Allfinanz Deutsche Vermögensberatung Aktiengesellschaft
+// allfinanz : Allfinanz Deutsche Vermögensberatung Aktiengesellschaft
+// https://www.iana.org/domains/root/db/allfinanz.html
allfinanz
-// allstate : 2015-07-31 Allstate Fire and Casualty Insurance Company
+// allstate : Allstate Fire and Casualty Insurance Company
+// https://www.iana.org/domains/root/db/allstate.html
allstate
-// ally : 2015-06-18 Ally Financial Inc.
+// ally : Ally Financial Inc.
+// https://www.iana.org/domains/root/db/ally.html
ally
-// alsace : 2014-07-02 Region Grand Est
+// alsace : Region Grand Est
+// https://www.iana.org/domains/root/db/alsace.html
alsace
-// alstom : 2015-07-30 ALSTOM
+// alstom : ALSTOM
+// https://www.iana.org/domains/root/db/alstom.html
alstom
-// amazon : 2019-12-19 Amazon Registry Services, Inc.
+// amazon : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/amazon.html
amazon
-// americanexpress : 2015-07-31 American Express Travel Related Services Company, Inc.
+// americanexpress : American Express Travel Related Services Company, Inc.
+// https://www.iana.org/domains/root/db/americanexpress.html
americanexpress
-// americanfamily : 2015-07-23 AmFam, Inc.
+// americanfamily : AmFam, Inc.
+// https://www.iana.org/domains/root/db/americanfamily.html
americanfamily
-// amex : 2015-07-31 American Express Travel Related Services Company, Inc.
+// amex : American Express Travel Related Services Company, Inc.
+// https://www.iana.org/domains/root/db/amex.html
amex
-// amfam : 2015-07-23 AmFam, Inc.
+// amfam : AmFam, Inc.
+// https://www.iana.org/domains/root/db/amfam.html
amfam
-// amica : 2015-05-28 Amica Mutual Insurance Company
+// amica : Amica Mutual Insurance Company
+// https://www.iana.org/domains/root/db/amica.html
amica
-// amsterdam : 2014-07-24 Gemeente Amsterdam
+// amsterdam : Gemeente Amsterdam
+// https://www.iana.org/domains/root/db/amsterdam.html
amsterdam
-// analytics : 2014-12-18 Campus IP LLC
+// analytics : Campus IP LLC
+// https://www.iana.org/domains/root/db/analytics.html
analytics
-// android : 2014-08-07 Charleston Road Registry Inc.
+// android : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/android.html
android
-// anquan : 2015-01-08 Beijing Qihu Keji Co., Ltd.
+// anquan : Beijing Qihu Keji Co., Ltd.
+// https://www.iana.org/domains/root/db/anquan.html
anquan
-// anz : 2015-07-31 Australia and New Zealand Banking Group Limited
+// anz : Australia and New Zealand Banking Group Limited
+// https://www.iana.org/domains/root/db/anz.html
anz
-// aol : 2015-09-17 Oath Inc.
+// aol : Oath Inc.
+// https://www.iana.org/domains/root/db/aol.html
aol
-// apartments : 2014-12-11 Binky Moon, LLC
+// apartments : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/apartments.html
apartments
-// app : 2015-05-14 Charleston Road Registry Inc.
+// app : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/app.html
app
-// apple : 2015-05-14 Apple Inc.
+// apple : Apple Inc.
+// https://www.iana.org/domains/root/db/apple.html
apple
-// aquarelle : 2014-07-24 Aquarelle.com
+// aquarelle : Aquarelle.com
+// https://www.iana.org/domains/root/db/aquarelle.html
aquarelle
-// arab : 2015-11-12 League of Arab States
+// arab : League of Arab States
+// https://www.iana.org/domains/root/db/arab.html
arab
-// aramco : 2014-11-20 Aramco Services Company
+// aramco : Aramco Services Company
+// https://www.iana.org/domains/root/db/aramco.html
aramco
-// archi : 2014-02-06 Identity Digital Limited
+// archi : Identity Digital Limited
+// https://www.iana.org/domains/root/db/archi.html
archi
-// army : 2014-03-06 Dog Beach, LLC
+// army : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/army.html
army
-// art : 2016-03-24 UK Creative Ideas Limited
+// art : UK Creative Ideas Limited
+// https://www.iana.org/domains/root/db/art.html
art
-// arte : 2014-12-11 Association Relative à la Télévision Européenne G.E.I.E.
+// arte : Association Relative à la Télévision Européenne G.E.I.E.
+// https://www.iana.org/domains/root/db/arte.html
arte
-// asda : 2015-07-31 Wal-Mart Stores, Inc.
+// asda : Wal-Mart Stores, Inc.
+// https://www.iana.org/domains/root/db/asda.html
asda
-// associates : 2014-03-06 Binky Moon, LLC
+// associates : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/associates.html
associates
-// athleta : 2015-07-30 The Gap, Inc.
+// athleta : The Gap, Inc.
+// https://www.iana.org/domains/root/db/athleta.html
athleta
-// attorney : 2014-03-20 Dog Beach, LLC
+// attorney : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/attorney.html
attorney
-// auction : 2014-03-20 Dog Beach, LLC
+// auction : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/auction.html
auction
-// audi : 2015-05-21 AUDI Aktiengesellschaft
+// audi : AUDI Aktiengesellschaft
+// https://www.iana.org/domains/root/db/audi.html
audi
-// audible : 2015-06-25 Amazon Registry Services, Inc.
+// audible : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/audible.html
audible
-// audio : 2014-03-20 XYZ.COM LLC
+// audio : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/audio.html
audio
-// auspost : 2015-08-13 Australian Postal Corporation
+// auspost : Australian Postal Corporation
+// https://www.iana.org/domains/root/db/auspost.html
auspost
-// author : 2014-12-18 Amazon Registry Services, Inc.
+// author : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/author.html
author
-// auto : 2014-11-13 XYZ.COM LLC
+// auto : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/auto.html
auto
-// autos : 2014-01-09 XYZ.COM LLC
+// autos : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/autos.html
autos
-// avianca : 2015-01-08 Avianca Inc.
+// avianca : Avianca Inc.
+// https://www.iana.org/domains/root/db/avianca.html
avianca
-// aws : 2015-06-25 AWS Registry LLC
+// aws : AWS Registry LLC
+// https://www.iana.org/domains/root/db/aws.html
aws
-// axa : 2013-12-19 AXA Group Operations SAS
+// axa : AXA Group Operations SAS
+// https://www.iana.org/domains/root/db/axa.html
axa
-// azure : 2014-12-18 Microsoft Corporation
+// azure : Microsoft Corporation
+// https://www.iana.org/domains/root/db/azure.html
azure
-// baby : 2015-04-09 XYZ.COM LLC
+// baby : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/baby.html
baby
-// baidu : 2015-01-08 Baidu, Inc.
+// baidu : Baidu, Inc.
+// https://www.iana.org/domains/root/db/baidu.html
baidu
-// banamex : 2015-07-30 Citigroup Inc.
+// banamex : Citigroup Inc.
+// https://www.iana.org/domains/root/db/banamex.html
banamex
-// bananarepublic : 2015-07-31 The Gap, Inc.
+// bananarepublic : The Gap, Inc.
+// https://www.iana.org/domains/root/db/bananarepublic.html
bananarepublic
-// band : 2014-06-12 Dog Beach, LLC
+// band : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/band.html
band
-// bank : 2014-09-25 fTLD Registry Services LLC
+// bank : fTLD Registry Services LLC
+// https://www.iana.org/domains/root/db/bank.html
bank
-// bar : 2013-12-12 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
+// bar : Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
+// https://www.iana.org/domains/root/db/bar.html
bar
-// barcelona : 2014-07-24 Municipi de Barcelona
+// barcelona : Municipi de Barcelona
+// https://www.iana.org/domains/root/db/barcelona.html
barcelona
-// barclaycard : 2014-11-20 Barclays Bank PLC
+// barclaycard : Barclays Bank PLC
+// https://www.iana.org/domains/root/db/barclaycard.html
barclaycard
-// barclays : 2014-11-20 Barclays Bank PLC
+// barclays : Barclays Bank PLC
+// https://www.iana.org/domains/root/db/barclays.html
barclays
-// barefoot : 2015-06-11 Gallo Vineyards, Inc.
+// barefoot : Gallo Vineyards, Inc.
+// https://www.iana.org/domains/root/db/barefoot.html
barefoot
-// bargains : 2013-11-14 Binky Moon, LLC
+// bargains : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/bargains.html
bargains
-// baseball : 2015-10-29 MLB Advanced Media DH, LLC
+// baseball : MLB Advanced Media DH, LLC
+// https://www.iana.org/domains/root/db/baseball.html
baseball
-// basketball : 2015-08-20 Fédération Internationale de Basketball (FIBA)
+// basketball : Fédération Internationale de Basketball (FIBA)
+// https://www.iana.org/domains/root/db/basketball.html
basketball
-// bauhaus : 2014-04-17 Werkhaus GmbH
+// bauhaus : Werkhaus GmbH
+// https://www.iana.org/domains/root/db/bauhaus.html
bauhaus
-// bayern : 2014-01-23 Bayern Connect GmbH
+// bayern : Bayern Connect GmbH
+// https://www.iana.org/domains/root/db/bayern.html
bayern
-// bbc : 2014-12-18 British Broadcasting Corporation
+// bbc : British Broadcasting Corporation
+// https://www.iana.org/domains/root/db/bbc.html
bbc
-// bbt : 2015-07-23 BB&T Corporation
+// bbt : BB&T Corporation
+// https://www.iana.org/domains/root/db/bbt.html
bbt
-// bbva : 2014-10-02 BANCO BILBAO VIZCAYA ARGENTARIA, S.A.
+// bbva : BANCO BILBAO VIZCAYA ARGENTARIA, S.A.
+// https://www.iana.org/domains/root/db/bbva.html
bbva
-// bcg : 2015-04-02 The Boston Consulting Group, Inc.
+// bcg : The Boston Consulting Group, Inc.
+// https://www.iana.org/domains/root/db/bcg.html
bcg
-// bcn : 2014-07-24 Municipi de Barcelona
+// bcn : Municipi de Barcelona
+// https://www.iana.org/domains/root/db/bcn.html
bcn
-// beats : 2015-05-14 Beats Electronics, LLC
+// beats : Beats Electronics, LLC
+// https://www.iana.org/domains/root/db/beats.html
beats
-// beauty : 2015-12-03 XYZ.COM LLC
+// beauty : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/beauty.html
beauty
-// beer : 2014-01-09 Registry Services, LLC
+// beer : Registry Services, LLC
+// https://www.iana.org/domains/root/db/beer.html
beer
-// bentley : 2014-12-18 Bentley Motors Limited
+// bentley : Bentley Motors Limited
+// https://www.iana.org/domains/root/db/bentley.html
bentley
-// berlin : 2013-10-31 dotBERLIN GmbH & Co. KG
+// berlin : dotBERLIN GmbH & Co. KG
+// https://www.iana.org/domains/root/db/berlin.html
berlin
-// best : 2013-12-19 BestTLD Pty Ltd
+// best : BestTLD Pty Ltd
+// https://www.iana.org/domains/root/db/best.html
best
-// bestbuy : 2015-07-31 BBY Solutions, Inc.
+// bestbuy : BBY Solutions, Inc.
+// https://www.iana.org/domains/root/db/bestbuy.html
bestbuy
-// bet : 2015-05-07 Identity Digital Limited
+// bet : Identity Digital Limited
+// https://www.iana.org/domains/root/db/bet.html
bet
-// bharti : 2014-01-09 Bharti Enterprises (Holding) Private Limited
+// bharti : Bharti Enterprises (Holding) Private Limited
+// https://www.iana.org/domains/root/db/bharti.html
bharti
-// bible : 2014-06-19 American Bible Society
+// bible : American Bible Society
+// https://www.iana.org/domains/root/db/bible.html
bible
-// bid : 2013-12-19 dot Bid Limited
+// bid : dot Bid Limited
+// https://www.iana.org/domains/root/db/bid.html
bid
-// bike : 2013-08-27 Binky Moon, LLC
+// bike : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/bike.html
bike
-// bing : 2014-12-18 Microsoft Corporation
+// bing : Microsoft Corporation
+// https://www.iana.org/domains/root/db/bing.html
bing
-// bingo : 2014-12-04 Binky Moon, LLC
+// bingo : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/bingo.html
bingo
-// bio : 2014-03-06 Identity Digital Limited
+// bio : Identity Digital Limited
+// https://www.iana.org/domains/root/db/bio.html
bio
-// black : 2014-01-16 Identity Digital Limited
+// black : Identity Digital Limited
+// https://www.iana.org/domains/root/db/black.html
black
-// blackfriday : 2014-01-16 Registry Services, LLC
+// blackfriday : Registry Services, LLC
+// https://www.iana.org/domains/root/db/blackfriday.html
blackfriday
-// blockbuster : 2015-07-30 Dish DBS Corporation
+// blockbuster : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/blockbuster.html
blockbuster
-// blog : 2015-05-14 Knock Knock WHOIS There, LLC
+// blog : Knock Knock WHOIS There, LLC
+// https://www.iana.org/domains/root/db/blog.html
blog
-// bloomberg : 2014-07-17 Bloomberg IP Holdings LLC
+// bloomberg : Bloomberg IP Holdings LLC
+// https://www.iana.org/domains/root/db/bloomberg.html
bloomberg
-// blue : 2013-11-07 Identity Digital Limited
+// blue : Identity Digital Limited
+// https://www.iana.org/domains/root/db/blue.html
blue
-// bms : 2014-10-30 Bristol-Myers Squibb Company
+// bms : Bristol-Myers Squibb Company
+// https://www.iana.org/domains/root/db/bms.html
bms
-// bmw : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft
+// bmw : Bayerische Motoren Werke Aktiengesellschaft
+// https://www.iana.org/domains/root/db/bmw.html
bmw
-// bnpparibas : 2014-05-29 BNP Paribas
+// bnpparibas : BNP Paribas
+// https://www.iana.org/domains/root/db/bnpparibas.html
bnpparibas
-// boats : 2014-12-04 XYZ.COM LLC
+// boats : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/boats.html
boats
-// boehringer : 2015-07-09 Boehringer Ingelheim International GmbH
+// boehringer : Boehringer Ingelheim International GmbH
+// https://www.iana.org/domains/root/db/boehringer.html
boehringer
-// bofa : 2015-07-31 Bank of America Corporation
+// bofa : Bank of America Corporation
+// https://www.iana.org/domains/root/db/bofa.html
bofa
-// bom : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br
+// bom : Núcleo de Informação e Coordenação do Ponto BR - NIC.br
+// https://www.iana.org/domains/root/db/bom.html
bom
-// bond : 2014-06-05 ShortDot SA
+// bond : ShortDot SA
+// https://www.iana.org/domains/root/db/bond.html
bond
-// boo : 2014-01-30 Charleston Road Registry Inc.
+// boo : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/boo.html
boo
-// book : 2015-08-27 Amazon Registry Services, Inc.
+// book : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/book.html
book
-// booking : 2015-07-16 Booking.com B.V.
+// booking : Booking.com B.V.
+// https://www.iana.org/domains/root/db/booking.html
booking
-// bosch : 2015-06-18 Robert Bosch GMBH
+// bosch : Robert Bosch GMBH
+// https://www.iana.org/domains/root/db/bosch.html
bosch
-// bostik : 2015-05-28 Bostik SA
+// bostik : Bostik SA
+// https://www.iana.org/domains/root/db/bostik.html
bostik
-// boston : 2015-12-10 Registry Services, LLC
+// boston : Registry Services, LLC
+// https://www.iana.org/domains/root/db/boston.html
boston
-// bot : 2014-12-18 Amazon Registry Services, Inc.
+// bot : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/bot.html
bot
-// boutique : 2013-11-14 Binky Moon, LLC
+// boutique : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/boutique.html
boutique
-// box : 2015-11-12 Intercap Registry Inc.
+// box : Intercap Registry Inc.
+// https://www.iana.org/domains/root/db/box.html
box
-// bradesco : 2014-12-18 Banco Bradesco S.A.
+// bradesco : Banco Bradesco S.A.
+// https://www.iana.org/domains/root/db/bradesco.html
bradesco
-// bridgestone : 2014-12-18 Bridgestone Corporation
+// bridgestone : Bridgestone Corporation
+// https://www.iana.org/domains/root/db/bridgestone.html
bridgestone
-// broadway : 2014-12-22 Celebrate Broadway, Inc.
+// broadway : Celebrate Broadway, Inc.
+// https://www.iana.org/domains/root/db/broadway.html
broadway
-// broker : 2014-12-11 Dog Beach, LLC
+// broker : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/broker.html
broker
-// brother : 2015-01-29 Brother Industries, Ltd.
+// brother : Brother Industries, Ltd.
+// https://www.iana.org/domains/root/db/brother.html
brother
-// brussels : 2014-02-06 DNS.be vzw
+// brussels : DNS.be vzw
+// https://www.iana.org/domains/root/db/brussels.html
brussels
-// build : 2013-11-07 Plan Bee LLC
+// build : Plan Bee LLC
+// https://www.iana.org/domains/root/db/build.html
build
-// builders : 2013-11-07 Binky Moon, LLC
+// builders : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/builders.html
builders
-// business : 2013-11-07 Binky Moon, LLC
+// business : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/business.html
business
-// buy : 2014-12-18 Amazon Registry Services, Inc.
+// buy : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/buy.html
buy
-// buzz : 2013-10-02 DOTSTRATEGY CO.
+// buzz : DOTSTRATEGY CO.
+// https://www.iana.org/domains/root/db/buzz.html
buzz
-// bzh : 2014-02-27 Association www.bzh
+// bzh : Association www.bzh
+// https://www.iana.org/domains/root/db/bzh.html
bzh
-// cab : 2013-10-24 Binky Moon, LLC
+// cab : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cab.html
cab
-// cafe : 2015-02-11 Binky Moon, LLC
+// cafe : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cafe.html
cafe
-// cal : 2014-07-24 Charleston Road Registry Inc.
+// cal : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/cal.html
cal
-// call : 2014-12-18 Amazon Registry Services, Inc.
+// call : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/call.html
call
-// calvinklein : 2015-07-30 PVH gTLD Holdings LLC
+// calvinklein : PVH gTLD Holdings LLC
+// https://www.iana.org/domains/root/db/calvinklein.html
calvinklein
-// cam : 2016-04-21 Cam Connecting SARL
+// cam : Cam Connecting SARL
+// https://www.iana.org/domains/root/db/cam.html
cam
-// camera : 2013-08-27 Binky Moon, LLC
+// camera : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/camera.html
camera
-// camp : 2013-11-07 Binky Moon, LLC
+// camp : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/camp.html
camp
-// canon : 2014-09-12 Canon Inc.
+// canon : Canon Inc.
+// https://www.iana.org/domains/root/db/canon.html
canon
-// capetown : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry
+// capetown : ZA Central Registry NPC trading as ZA Central Registry
+// https://www.iana.org/domains/root/db/capetown.html
capetown
-// capital : 2014-03-06 Binky Moon, LLC
+// capital : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/capital.html
capital
-// capitalone : 2015-08-06 Capital One Financial Corporation
+// capitalone : Capital One Financial Corporation
+// https://www.iana.org/domains/root/db/capitalone.html
capitalone
-// car : 2015-01-22 XYZ.COM LLC
+// car : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/car.html
car
-// caravan : 2013-12-12 Caravan International, Inc.
+// caravan : Caravan International, Inc.
+// https://www.iana.org/domains/root/db/caravan.html
caravan
-// cards : 2013-12-05 Binky Moon, LLC
+// cards : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cards.html
cards
-// care : 2014-03-06 Binky Moon, LLC
+// care : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/care.html
care
-// career : 2013-10-09 dotCareer LLC
+// career : dotCareer LLC
+// https://www.iana.org/domains/root/db/career.html
career
-// careers : 2013-10-02 Binky Moon, LLC
+// careers : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/careers.html
careers
-// cars : 2014-11-13 XYZ.COM LLC
+// cars : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/cars.html
cars
-// casa : 2013-11-21 Registry Services, LLC
+// casa : Registry Services, LLC
+// https://www.iana.org/domains/root/db/casa.html
casa
-// case : 2015-09-03 Digity, LLC
+// case : Digity, LLC
+// https://www.iana.org/domains/root/db/case.html
case
-// cash : 2014-03-06 Binky Moon, LLC
+// cash : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cash.html
cash
-// casino : 2014-12-18 Binky Moon, LLC
+// casino : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/casino.html
casino
-// catering : 2013-12-05 Binky Moon, LLC
+// catering : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/catering.html
catering
-// catholic : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+// catholic : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+// https://www.iana.org/domains/root/db/catholic.html
catholic
-// cba : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA
+// cba : COMMONWEALTH BANK OF AUSTRALIA
+// https://www.iana.org/domains/root/db/cba.html
cba
-// cbn : 2014-08-22 The Christian Broadcasting Network, Inc.
+// cbn : The Christian Broadcasting Network, Inc.
+// https://www.iana.org/domains/root/db/cbn.html
cbn
-// cbre : 2015-07-02 CBRE, Inc.
+// cbre : CBRE, Inc.
+// https://www.iana.org/domains/root/db/cbre.html
cbre
-// cbs : 2015-08-06 CBS Domains Inc.
-cbs
-
-// center : 2013-11-07 Binky Moon, LLC
+// center : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/center.html
center
-// ceo : 2013-11-07 CEOTLD Pty Ltd
+// ceo : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/ceo.html
ceo
-// cern : 2014-06-05 European Organization for Nuclear Research ("CERN")
+// cern : European Organization for Nuclear Research ("CERN")
+// https://www.iana.org/domains/root/db/cern.html
cern
-// cfa : 2014-08-28 CFA Institute
+// cfa : CFA Institute
+// https://www.iana.org/domains/root/db/cfa.html
cfa
-// cfd : 2014-12-11 ShortDot SA
+// cfd : ShortDot SA
+// https://www.iana.org/domains/root/db/cfd.html
cfd
-// chanel : 2015-04-09 Chanel International B.V.
+// chanel : Chanel International B.V.
+// https://www.iana.org/domains/root/db/chanel.html
chanel
-// channel : 2014-05-08 Charleston Road Registry Inc.
+// channel : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/channel.html
channel
-// charity : 2018-04-11 Public Interest Registry
+// charity : Public Interest Registry
+// https://www.iana.org/domains/root/db/charity.html
charity
-// chase : 2015-04-30 JPMorgan Chase Bank, National Association
+// chase : JPMorgan Chase Bank, National Association
+// https://www.iana.org/domains/root/db/chase.html
chase
-// chat : 2014-12-04 Binky Moon, LLC
+// chat : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/chat.html
chat
-// cheap : 2013-11-14 Binky Moon, LLC
+// cheap : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cheap.html
cheap
-// chintai : 2015-06-11 CHINTAI Corporation
+// chintai : CHINTAI Corporation
+// https://www.iana.org/domains/root/db/chintai.html
chintai
-// christmas : 2013-11-21 XYZ.COM LLC
+// christmas : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/christmas.html
christmas
-// chrome : 2014-07-24 Charleston Road Registry Inc.
+// chrome : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/chrome.html
chrome
-// church : 2014-02-06 Binky Moon, LLC
+// church : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/church.html
church
-// cipriani : 2015-02-19 Hotel Cipriani Srl
+// cipriani : Hotel Cipriani Srl
+// https://www.iana.org/domains/root/db/cipriani.html
cipriani
-// circle : 2014-12-18 Amazon Registry Services, Inc.
+// circle : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/circle.html
circle
-// cisco : 2014-12-22 Cisco Technology, Inc.
+// cisco : Cisco Technology, Inc.
+// https://www.iana.org/domains/root/db/cisco.html
cisco
-// citadel : 2015-07-23 Citadel Domain LLC
+// citadel : Citadel Domain LLC
+// https://www.iana.org/domains/root/db/citadel.html
citadel
-// citi : 2015-07-30 Citigroup Inc.
+// citi : Citigroup Inc.
+// https://www.iana.org/domains/root/db/citi.html
citi
-// citic : 2014-01-09 CITIC Group Corporation
+// citic : CITIC Group Corporation
+// https://www.iana.org/domains/root/db/citic.html
citic
-// city : 2014-05-29 Binky Moon, LLC
+// city : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/city.html
city
-// cityeats : 2014-12-11 Lifestyle Domain Holdings, Inc.
-cityeats
-
-// claims : 2014-03-20 Binky Moon, LLC
+// claims : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/claims.html
claims
-// cleaning : 2013-12-05 Binky Moon, LLC
+// cleaning : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cleaning.html
cleaning
-// click : 2014-06-05 Internet Naming Company LLC
+// click : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/click.html
click
-// clinic : 2014-03-20 Binky Moon, LLC
+// clinic : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/clinic.html
clinic
-// clinique : 2015-10-01 The Estée Lauder Companies Inc.
+// clinique : The Estée Lauder Companies Inc.
+// https://www.iana.org/domains/root/db/clinique.html
clinique
-// clothing : 2013-08-27 Binky Moon, LLC
+// clothing : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/clothing.html
clothing
-// cloud : 2015-04-16 Aruba PEC S.p.A.
+// cloud : Aruba PEC S.p.A.
+// https://www.iana.org/domains/root/db/cloud.html
cloud
-// club : 2013-11-08 Registry Services, LLC
+// club : Registry Services, LLC
+// https://www.iana.org/domains/root/db/club.html
club
-// clubmed : 2015-06-25 Club Méditerranée S.A.
+// clubmed : Club Méditerranée S.A.
+// https://www.iana.org/domains/root/db/clubmed.html
clubmed
-// coach : 2014-10-09 Binky Moon, LLC
+// coach : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/coach.html
coach
-// codes : 2013-10-31 Binky Moon, LLC
+// codes : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/codes.html
codes
-// coffee : 2013-10-17 Binky Moon, LLC
+// coffee : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/coffee.html
coffee
-// college : 2014-01-16 XYZ.COM LLC
+// college : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/college.html
college
-// cologne : 2014-02-05 dotKoeln GmbH
+// cologne : dotKoeln GmbH
+// https://www.iana.org/domains/root/db/cologne.html
cologne
-// comcast : 2015-07-23 Comcast IP Holdings I, LLC
+// comcast : Comcast IP Holdings I, LLC
+// https://www.iana.org/domains/root/db/comcast.html
comcast
-// commbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA
+// commbank : COMMONWEALTH BANK OF AUSTRALIA
+// https://www.iana.org/domains/root/db/commbank.html
commbank
-// community : 2013-12-05 Binky Moon, LLC
+// community : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/community.html
community
-// company : 2013-11-07 Binky Moon, LLC
+// company : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/company.html
company
-// compare : 2015-10-08 Registry Services, LLC
+// compare : Registry Services, LLC
+// https://www.iana.org/domains/root/db/compare.html
compare
-// computer : 2013-10-24 Binky Moon, LLC
+// computer : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/computer.html
computer
-// comsec : 2015-01-08 VeriSign, Inc.
+// comsec : VeriSign, Inc.
+// https://www.iana.org/domains/root/db/comsec.html
comsec
-// condos : 2013-12-05 Binky Moon, LLC
+// condos : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/condos.html
condos
-// construction : 2013-09-16 Binky Moon, LLC
+// construction : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/construction.html
construction
-// consulting : 2013-12-05 Dog Beach, LLC
+// consulting : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/consulting.html
consulting
-// contact : 2015-01-08 Dog Beach, LLC
+// contact : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/contact.html
contact
-// contractors : 2013-09-10 Binky Moon, LLC
+// contractors : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/contractors.html
contractors
-// cooking : 2013-11-21 Registry Services, LLC
+// cooking : Registry Services, LLC
+// https://www.iana.org/domains/root/db/cooking.html
cooking
-// cookingchannel : 2015-07-02 Lifestyle Domain Holdings, Inc.
-cookingchannel
-
-// cool : 2013-11-14 Binky Moon, LLC
+// cool : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cool.html
cool
-// corsica : 2014-09-25 Collectivité de Corse
+// corsica : Collectivité de Corse
+// https://www.iana.org/domains/root/db/corsica.html
corsica
-// country : 2013-12-19 Internet Naming Company LLC
+// country : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/country.html
country
-// coupon : 2015-02-26 Amazon Registry Services, Inc.
+// coupon : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/coupon.html
coupon
-// coupons : 2015-03-26 Binky Moon, LLC
+// coupons : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/coupons.html
coupons
-// courses : 2014-12-04 Registry Services, LLC
+// courses : Registry Services, LLC
+// https://www.iana.org/domains/root/db/courses.html
courses
-// cpa : 2019-06-10 American Institute of Certified Public Accountants
+// cpa : American Institute of Certified Public Accountants
+// https://www.iana.org/domains/root/db/cpa.html
cpa
-// credit : 2014-03-20 Binky Moon, LLC
+// credit : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/credit.html
credit
-// creditcard : 2014-03-20 Binky Moon, LLC
+// creditcard : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/creditcard.html
creditcard
-// creditunion : 2015-01-22 DotCooperation LLC
+// creditunion : DotCooperation LLC
+// https://www.iana.org/domains/root/db/creditunion.html
creditunion
-// cricket : 2014-10-09 dot Cricket Limited
+// cricket : dot Cricket Limited
+// https://www.iana.org/domains/root/db/cricket.html
cricket
-// crown : 2014-10-24 Crown Equipment Corporation
+// crown : Crown Equipment Corporation
+// https://www.iana.org/domains/root/db/crown.html
crown
-// crs : 2014-04-03 Federated Co-operatives Limited
+// crs : Federated Co-operatives Limited
+// https://www.iana.org/domains/root/db/crs.html
crs
-// cruise : 2015-12-10 Viking River Cruises (Bermuda) Ltd.
+// cruise : Viking River Cruises (Bermuda) Ltd.
+// https://www.iana.org/domains/root/db/cruise.html
cruise
-// cruises : 2013-12-05 Binky Moon, LLC
+// cruises : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cruises.html
cruises
-// cuisinella : 2014-04-03 SCHMIDT GROUPE S.A.S.
+// cuisinella : SCHMIDT GROUPE S.A.S.
+// https://www.iana.org/domains/root/db/cuisinella.html
cuisinella
-// cymru : 2014-05-08 Nominet UK
+// cymru : Nominet UK
+// https://www.iana.org/domains/root/db/cymru.html
cymru
-// cyou : 2015-01-22 ShortDot SA
+// cyou : ShortDot SA
+// https://www.iana.org/domains/root/db/cyou.html
cyou
-// dabur : 2014-02-06 Dabur India Limited
+// dabur : Dabur India Limited
+// https://www.iana.org/domains/root/db/dabur.html
dabur
-// dad : 2014-01-23 Charleston Road Registry Inc.
+// dad : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/dad.html
dad
-// dance : 2013-10-24 Dog Beach, LLC
+// dance : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/dance.html
dance
-// data : 2016-06-02 Dish DBS Corporation
+// data : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/data.html
data
-// date : 2014-11-20 dot Date Limited
+// date : dot Date Limited
+// https://www.iana.org/domains/root/db/date.html
date
-// dating : 2013-12-05 Binky Moon, LLC
+// dating : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/dating.html
dating
-// datsun : 2014-03-27 NISSAN MOTOR CO., LTD.
+// datsun : NISSAN MOTOR CO., LTD.
+// https://www.iana.org/domains/root/db/datsun.html
datsun
-// day : 2014-01-30 Charleston Road Registry Inc.
+// day : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/day.html
day
-// dclk : 2014-11-20 Charleston Road Registry Inc.
+// dclk : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/dclk.html
dclk
-// dds : 2015-05-07 Registry Services, LLC
+// dds : Registry Services, LLC
+// https://www.iana.org/domains/root/db/dds.html
dds
-// deal : 2015-06-25 Amazon Registry Services, Inc.
+// deal : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/deal.html
deal
-// dealer : 2014-12-22 Intercap Registry Inc.
+// dealer : Intercap Registry Inc.
+// https://www.iana.org/domains/root/db/dealer.html
dealer
-// deals : 2014-05-22 Binky Moon, LLC
+// deals : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/deals.html
deals
-// degree : 2014-03-06 Dog Beach, LLC
+// degree : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/degree.html
degree
-// delivery : 2014-09-11 Binky Moon, LLC
+// delivery : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/delivery.html
delivery
-// dell : 2014-10-24 Dell Inc.
+// dell : Dell Inc.
+// https://www.iana.org/domains/root/db/dell.html
dell
-// deloitte : 2015-07-31 Deloitte Touche Tohmatsu
+// deloitte : Deloitte Touche Tohmatsu
+// https://www.iana.org/domains/root/db/deloitte.html
deloitte
-// delta : 2015-02-19 Delta Air Lines, Inc.
+// delta : Delta Air Lines, Inc.
+// https://www.iana.org/domains/root/db/delta.html
delta
-// democrat : 2013-10-24 Dog Beach, LLC
+// democrat : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/democrat.html
democrat
-// dental : 2014-03-20 Binky Moon, LLC
+// dental : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/dental.html
dental
-// dentist : 2014-03-20 Dog Beach, LLC
+// dentist : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/dentist.html
dentist
-// desi : 2013-11-14 Desi Networks LLC
-desi
-
-// design : 2014-11-07 Registry Services, LLC
+// design : Registry Services, LLC
+// https://www.iana.org/domains/root/db/design.html
design
-// dev : 2014-10-16 Charleston Road Registry Inc.
+// dev : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/dev.html
dev
-// dhl : 2015-07-23 Deutsche Post AG
+// dhl : Deutsche Post AG
+// https://www.iana.org/domains/root/db/dhl.html
dhl
-// diamonds : 2013-09-22 Binky Moon, LLC
+// diamonds : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/diamonds.html
diamonds
-// diet : 2014-06-26 XYZ.COM LLC
+// diet : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/diet.html
diet
-// digital : 2014-03-06 Binky Moon, LLC
+// digital : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/digital.html
digital
-// direct : 2014-04-10 Binky Moon, LLC
+// direct : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/direct.html
direct
-// directory : 2013-09-20 Binky Moon, LLC
+// directory : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/directory.html
directory
-// discount : 2014-03-06 Binky Moon, LLC
+// discount : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/discount.html
discount
-// discover : 2015-07-23 Discover Financial Services
+// discover : Discover Financial Services
+// https://www.iana.org/domains/root/db/discover.html
discover
-// dish : 2015-07-30 Dish DBS Corporation
+// dish : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/dish.html
dish
-// diy : 2015-11-05 Lifestyle Domain Holdings, Inc.
+// diy : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/diy.html
diy
-// dnp : 2013-12-13 Dai Nippon Printing Co., Ltd.
+// dnp : Dai Nippon Printing Co., Ltd.
+// https://www.iana.org/domains/root/db/dnp.html
dnp
-// docs : 2014-10-16 Charleston Road Registry Inc.
+// docs : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/docs.html
docs
-// doctor : 2016-06-02 Binky Moon, LLC
+// doctor : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/doctor.html
doctor
-// dog : 2014-12-04 Binky Moon, LLC
+// dog : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/dog.html
dog
-// domains : 2013-10-17 Binky Moon, LLC
+// domains : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/domains.html
domains
-// dot : 2015-05-21 Dish DBS Corporation
+// dot : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/dot.html
dot
-// download : 2014-11-20 dot Support Limited
+// download : dot Support Limited
+// https://www.iana.org/domains/root/db/download.html
download
-// drive : 2015-03-05 Charleston Road Registry Inc.
+// drive : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/drive.html
drive
-// dtv : 2015-06-04 Dish DBS Corporation
+// dtv : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/dtv.html
dtv
-// dubai : 2015-01-01 Dubai Smart Government Department
+// dubai : Dubai Smart Government Department
+// https://www.iana.org/domains/root/db/dubai.html
dubai
-// dunlop : 2015-07-02 The Goodyear Tire & Rubber Company
+// dunlop : The Goodyear Tire & Rubber Company
+// https://www.iana.org/domains/root/db/dunlop.html
dunlop
-// dupont : 2015-06-25 DuPont Specialty Products USA, LLC
+// dupont : DuPont Specialty Products USA, LLC
+// https://www.iana.org/domains/root/db/dupont.html
dupont
-// durban : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry
+// durban : ZA Central Registry NPC trading as ZA Central Registry
+// https://www.iana.org/domains/root/db/durban.html
durban
-// dvag : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// dvag : Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// https://www.iana.org/domains/root/db/dvag.html
dvag
-// dvr : 2016-05-26 DISH Technologies L.L.C.
+// dvr : DISH Technologies L.L.C.
+// https://www.iana.org/domains/root/db/dvr.html
dvr
-// earth : 2014-12-04 Interlink Systems Innovation Institute K.K.
+// earth : Interlink Systems Innovation Institute K.K.
+// https://www.iana.org/domains/root/db/earth.html
earth
-// eat : 2014-01-23 Charleston Road Registry Inc.
+// eat : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/eat.html
eat
-// eco : 2016-07-08 Big Room Inc.
+// eco : Big Room Inc.
+// https://www.iana.org/domains/root/db/eco.html
eco
-// edeka : 2014-12-18 EDEKA Verband kaufmännischer Genossenschaften e.V.
+// edeka : EDEKA Verband kaufmännischer Genossenschaften e.V.
+// https://www.iana.org/domains/root/db/edeka.html
edeka
-// education : 2013-11-07 Binky Moon, LLC
+// education : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/education.html
education
-// email : 2013-10-31 Binky Moon, LLC
+// email : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/email.html
email
-// emerck : 2014-04-03 Merck KGaA
+// emerck : Merck KGaA
+// https://www.iana.org/domains/root/db/emerck.html
emerck
-// energy : 2014-09-11 Binky Moon, LLC
+// energy : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/energy.html
energy
-// engineer : 2014-03-06 Dog Beach, LLC
+// engineer : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/engineer.html
engineer
-// engineering : 2014-03-06 Binky Moon, LLC
+// engineering : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/engineering.html
engineering
-// enterprises : 2013-09-20 Binky Moon, LLC
+// enterprises : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/enterprises.html
enterprises
-// epson : 2014-12-04 Seiko Epson Corporation
+// epson : Seiko Epson Corporation
+// https://www.iana.org/domains/root/db/epson.html
epson
-// equipment : 2013-08-27 Binky Moon, LLC
+// equipment : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/equipment.html
equipment
-// ericsson : 2015-07-09 Telefonaktiebolaget L M Ericsson
+// ericsson : Telefonaktiebolaget L M Ericsson
+// https://www.iana.org/domains/root/db/ericsson.html
ericsson
-// erni : 2014-04-03 ERNI Group Holding AG
+// erni : ERNI Group Holding AG
+// https://www.iana.org/domains/root/db/erni.html
erni
-// esq : 2014-05-08 Charleston Road Registry Inc.
+// esq : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/esq.html
esq
-// estate : 2013-08-27 Binky Moon, LLC
+// estate : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/estate.html
estate
-// etisalat : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat)
+// etisalat : Emirates Telecommunications Corporation (trading as Etisalat)
+// https://www.iana.org/domains/root/db/etisalat.html
etisalat
-// eurovision : 2014-04-24 European Broadcasting Union (EBU)
+// eurovision : European Broadcasting Union (EBU)
+// https://www.iana.org/domains/root/db/eurovision.html
eurovision
-// eus : 2013-12-12 Puntueus Fundazioa
+// eus : Puntueus Fundazioa
+// https://www.iana.org/domains/root/db/eus.html
eus
-// events : 2013-12-05 Binky Moon, LLC
+// events : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/events.html
events
-// exchange : 2014-03-06 Binky Moon, LLC
+// exchange : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/exchange.html
exchange
-// expert : 2013-11-21 Binky Moon, LLC
+// expert : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/expert.html
expert
-// exposed : 2013-12-05 Binky Moon, LLC
+// exposed : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/exposed.html
exposed
-// express : 2015-02-11 Binky Moon, LLC
+// express : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/express.html
express
-// extraspace : 2015-05-14 Extra Space Storage LLC
+// extraspace : Extra Space Storage LLC
+// https://www.iana.org/domains/root/db/extraspace.html
extraspace
-// fage : 2014-12-18 Fage International S.A.
+// fage : Fage International S.A.
+// https://www.iana.org/domains/root/db/fage.html
fage
-// fail : 2014-03-06 Binky Moon, LLC
+// fail : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/fail.html
fail
-// fairwinds : 2014-11-13 FairWinds Partners, LLC
+// fairwinds : FairWinds Partners, LLC
+// https://www.iana.org/domains/root/db/fairwinds.html
fairwinds
-// faith : 2014-11-20 dot Faith Limited
+// faith : dot Faith Limited
+// https://www.iana.org/domains/root/db/faith.html
faith
-// family : 2015-04-02 Dog Beach, LLC
+// family : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/family.html
family
-// fan : 2014-03-06 Dog Beach, LLC
+// fan : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/fan.html
fan
-// fans : 2014-11-07 ZDNS International Limited
+// fans : ZDNS International Limited
+// https://www.iana.org/domains/root/db/fans.html
fans
-// farm : 2013-11-07 Binky Moon, LLC
+// farm : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/farm.html
farm
-// farmers : 2015-07-09 Farmers Insurance Exchange
+// farmers : Farmers Insurance Exchange
+// https://www.iana.org/domains/root/db/farmers.html
farmers
-// fashion : 2014-07-03 Registry Services, LLC
+// fashion : Registry Services, LLC
+// https://www.iana.org/domains/root/db/fashion.html
fashion
-// fast : 2014-12-18 Amazon Registry Services, Inc.
+// fast : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/fast.html
fast
-// fedex : 2015-08-06 Federal Express Corporation
+// fedex : Federal Express Corporation
+// https://www.iana.org/domains/root/db/fedex.html
fedex
-// feedback : 2013-12-19 Top Level Spectrum, Inc.
+// feedback : Top Level Spectrum, Inc.
+// https://www.iana.org/domains/root/db/feedback.html
feedback
-// ferrari : 2015-07-31 Fiat Chrysler Automobiles N.V.
+// ferrari : Fiat Chrysler Automobiles N.V.
+// https://www.iana.org/domains/root/db/ferrari.html
ferrari
-// ferrero : 2014-12-18 Ferrero Trading Lux S.A.
+// ferrero : Ferrero Trading Lux S.A.
+// https://www.iana.org/domains/root/db/ferrero.html
ferrero
-// fiat : 2015-07-31 Fiat Chrysler Automobiles N.V.
-fiat
-
-// fidelity : 2015-07-30 Fidelity Brokerage Services LLC
+// fidelity : Fidelity Brokerage Services LLC
+// https://www.iana.org/domains/root/db/fidelity.html
fidelity
-// fido : 2015-08-06 Rogers Communications Canada Inc.
+// fido : Rogers Communications Canada Inc.
+// https://www.iana.org/domains/root/db/fido.html
fido
-// film : 2015-01-08 Motion Picture Domain Registry Pty Ltd
+// film : Motion Picture Domain Registry Pty Ltd
+// https://www.iana.org/domains/root/db/film.html
film
-// final : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br
+// final : Núcleo de Informação e Coordenação do Ponto BR - NIC.br
+// https://www.iana.org/domains/root/db/final.html
final
-// finance : 2014-03-20 Binky Moon, LLC
+// finance : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/finance.html
finance
-// financial : 2014-03-06 Binky Moon, LLC
+// financial : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/financial.html
financial
-// fire : 2015-06-25 Amazon Registry Services, Inc.
+// fire : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/fire.html
fire
-// firestone : 2014-12-18 Bridgestone Licensing Services, Inc
+// firestone : Bridgestone Licensing Services, Inc
+// https://www.iana.org/domains/root/db/firestone.html
firestone
-// firmdale : 2014-03-27 Firmdale Holdings Limited
+// firmdale : Firmdale Holdings Limited
+// https://www.iana.org/domains/root/db/firmdale.html
firmdale
-// fish : 2013-12-12 Binky Moon, LLC
+// fish : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/fish.html
fish
-// fishing : 2013-11-21 Registry Services, LLC
+// fishing : Registry Services, LLC
+// https://www.iana.org/domains/root/db/fishing.html
fishing
-// fit : 2014-11-07 Registry Services, LLC
+// fit : Registry Services, LLC
+// https://www.iana.org/domains/root/db/fit.html
fit
-// fitness : 2014-03-06 Binky Moon, LLC
+// fitness : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/fitness.html
fitness
-// flickr : 2015-04-02 Flickr, Inc.
+// flickr : Flickr, Inc.
+// https://www.iana.org/domains/root/db/flickr.html
flickr
-// flights : 2013-12-05 Binky Moon, LLC
+// flights : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/flights.html
flights
-// flir : 2015-07-23 FLIR Systems, Inc.
+// flir : FLIR Systems, Inc.
+// https://www.iana.org/domains/root/db/flir.html
flir
-// florist : 2013-11-07 Binky Moon, LLC
+// florist : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/florist.html
florist
-// flowers : 2014-10-09 XYZ.COM LLC
+// flowers : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/flowers.html
flowers
-// fly : 2014-05-08 Charleston Road Registry Inc.
+// fly : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/fly.html
fly
-// foo : 2014-01-23 Charleston Road Registry Inc.
+// foo : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/foo.html
foo
-// food : 2016-04-21 Lifestyle Domain Holdings, Inc.
+// food : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/food.html
food
-// foodnetwork : 2015-07-02 Lifestyle Domain Holdings, Inc.
-foodnetwork
-
-// football : 2014-12-18 Binky Moon, LLC
+// football : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/football.html
football
-// ford : 2014-11-13 Ford Motor Company
+// ford : Ford Motor Company
+// https://www.iana.org/domains/root/db/ford.html
ford
-// forex : 2014-12-11 Dog Beach, LLC
+// forex : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/forex.html
forex
-// forsale : 2014-05-22 Dog Beach, LLC
+// forsale : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/forsale.html
forsale
-// forum : 2015-04-02 Fegistry, LLC
+// forum : Fegistry, LLC
+// https://www.iana.org/domains/root/db/forum.html
forum
-// foundation : 2013-12-05 Public Interest Registry
+// foundation : Public Interest Registry
+// https://www.iana.org/domains/root/db/foundation.html
foundation
-// fox : 2015-09-11 FOX Registry, LLC
+// fox : FOX Registry, LLC
+// https://www.iana.org/domains/root/db/fox.html
fox
-// free : 2015-12-10 Amazon Registry Services, Inc.
+// free : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/free.html
free
-// fresenius : 2015-07-30 Fresenius Immobilien-Verwaltungs-GmbH
+// fresenius : Fresenius Immobilien-Verwaltungs-GmbH
+// https://www.iana.org/domains/root/db/fresenius.html
fresenius
-// frl : 2014-05-15 FRLregistry B.V.
+// frl : FRLregistry B.V.
+// https://www.iana.org/domains/root/db/frl.html
frl
-// frogans : 2013-12-19 OP3FT
+// frogans : OP3FT
+// https://www.iana.org/domains/root/db/frogans.html
frogans
-// frontdoor : 2015-07-02 Lifestyle Domain Holdings, Inc.
-frontdoor
-
-// frontier : 2015-02-05 Frontier Communications Corporation
+// frontier : Frontier Communications Corporation
+// https://www.iana.org/domains/root/db/frontier.html
frontier
-// ftr : 2015-07-16 Frontier Communications Corporation
+// ftr : Frontier Communications Corporation
+// https://www.iana.org/domains/root/db/ftr.html
ftr
-// fujitsu : 2015-07-30 Fujitsu Limited
+// fujitsu : Fujitsu Limited
+// https://www.iana.org/domains/root/db/fujitsu.html
fujitsu
-// fun : 2016-01-14 Radix FZC
+// fun : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/fun.html
fun
-// fund : 2014-03-20 Binky Moon, LLC
+// fund : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/fund.html
fund
-// furniture : 2014-03-20 Binky Moon, LLC
+// furniture : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/furniture.html
furniture
-// futbol : 2013-09-20 Dog Beach, LLC
+// futbol : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/futbol.html
futbol
-// fyi : 2015-04-02 Binky Moon, LLC
+// fyi : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/fyi.html
fyi
-// gal : 2013-11-07 Asociación puntoGAL
+// gal : Asociación puntoGAL
+// https://www.iana.org/domains/root/db/gal.html
gal
-// gallery : 2013-09-13 Binky Moon, LLC
+// gallery : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gallery.html
gallery
-// gallo : 2015-06-11 Gallo Vineyards, Inc.
+// gallo : Gallo Vineyards, Inc.
+// https://www.iana.org/domains/root/db/gallo.html
gallo
-// gallup : 2015-02-19 Gallup, Inc.
+// gallup : Gallup, Inc.
+// https://www.iana.org/domains/root/db/gallup.html
gallup
-// game : 2015-05-28 XYZ.COM LLC
+// game : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/game.html
game
-// games : 2015-05-28 Dog Beach, LLC
+// games : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/games.html
games
-// gap : 2015-07-31 The Gap, Inc.
+// gap : The Gap, Inc.
+// https://www.iana.org/domains/root/db/gap.html
gap
-// garden : 2014-06-26 Registry Services, LLC
+// garden : Registry Services, LLC
+// https://www.iana.org/domains/root/db/garden.html
garden
-// gay : 2019-05-23 Top Level Design, LLC
+// gay : Registry Services, LLC
+// https://www.iana.org/domains/root/db/gay.html
gay
-// gbiz : 2014-07-17 Charleston Road Registry Inc.
+// gbiz : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/gbiz.html
gbiz
-// gdn : 2014-07-31 Joint Stock Company "Navigation-information systems"
+// gdn : Joint Stock Company "Navigation-information systems"
+// https://www.iana.org/domains/root/db/gdn.html
gdn
-// gea : 2014-12-04 GEA Group Aktiengesellschaft
+// gea : GEA Group Aktiengesellschaft
+// https://www.iana.org/domains/root/db/gea.html
gea
-// gent : 2014-01-23 Easyhost BV
+// gent : Easyhost BV
+// https://www.iana.org/domains/root/db/gent.html
gent
-// genting : 2015-03-12 Resorts World Inc Pte. Ltd.
+// genting : Resorts World Inc Pte. Ltd.
+// https://www.iana.org/domains/root/db/genting.html
genting
-// george : 2015-07-31 Wal-Mart Stores, Inc.
+// george : Wal-Mart Stores, Inc.
+// https://www.iana.org/domains/root/db/george.html
george
-// ggee : 2014-01-09 GMO Internet, Inc.
+// ggee : GMO Internet, Inc.
+// https://www.iana.org/domains/root/db/ggee.html
ggee
-// gift : 2013-10-17 DotGift, LLC
+// gift : DotGift, LLC
+// https://www.iana.org/domains/root/db/gift.html
gift
-// gifts : 2014-07-03 Binky Moon, LLC
+// gifts : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gifts.html
gifts
-// gives : 2014-03-06 Public Interest Registry
+// gives : Public Interest Registry
+// https://www.iana.org/domains/root/db/gives.html
gives
-// giving : 2014-11-13 Public Interest Registry
+// giving : Public Interest Registry
+// https://www.iana.org/domains/root/db/giving.html
giving
-// glass : 2013-11-07 Binky Moon, LLC
+// glass : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/glass.html
glass
-// gle : 2014-07-24 Charleston Road Registry Inc.
+// gle : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/gle.html
gle
-// global : 2014-04-17 Identity Digital Limited
+// global : Identity Digital Limited
+// https://www.iana.org/domains/root/db/global.html
global
-// globo : 2013-12-19 Globo Comunicação e Participações S.A
+// globo : Globo Comunicação e Participações S.A
+// https://www.iana.org/domains/root/db/globo.html
globo
-// gmail : 2014-05-01 Charleston Road Registry Inc.
+// gmail : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/gmail.html
gmail
-// gmbh : 2016-01-29 Binky Moon, LLC
+// gmbh : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gmbh.html
gmbh
-// gmo : 2014-01-09 GMO Internet, Inc.
+// gmo : GMO Internet, Inc.
+// https://www.iana.org/domains/root/db/gmo.html
gmo
-// gmx : 2014-04-24 1&1 Mail & Media GmbH
+// gmx : 1&1 Mail & Media GmbH
+// https://www.iana.org/domains/root/db/gmx.html
gmx
-// godaddy : 2015-07-23 Go Daddy East, LLC
+// godaddy : Go Daddy East, LLC
+// https://www.iana.org/domains/root/db/godaddy.html
godaddy
-// gold : 2015-01-22 Binky Moon, LLC
+// gold : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gold.html
gold
-// goldpoint : 2014-11-20 YODOBASHI CAMERA CO.,LTD.
+// goldpoint : YODOBASHI CAMERA CO.,LTD.
+// https://www.iana.org/domains/root/db/goldpoint.html
goldpoint
-// golf : 2014-12-18 Binky Moon, LLC
+// golf : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/golf.html
golf
-// goo : 2014-12-18 NTT Resonant Inc.
+// goo : NTT Resonant Inc.
+// https://www.iana.org/domains/root/db/goo.html
goo
-// goodyear : 2015-07-02 The Goodyear Tire & Rubber Company
+// goodyear : The Goodyear Tire & Rubber Company
+// https://www.iana.org/domains/root/db/goodyear.html
goodyear
-// goog : 2014-11-20 Charleston Road Registry Inc.
+// goog : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/goog.html
goog
-// google : 2014-07-24 Charleston Road Registry Inc.
+// google : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/google.html
google
-// gop : 2014-01-16 Republican State Leadership Committee, Inc.
+// gop : Republican State Leadership Committee, Inc.
+// https://www.iana.org/domains/root/db/gop.html
gop
-// got : 2014-12-18 Amazon Registry Services, Inc.
+// got : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/got.html
got
-// grainger : 2015-05-07 Grainger Registry Services, LLC
+// grainger : Grainger Registry Services, LLC
+// https://www.iana.org/domains/root/db/grainger.html
grainger
-// graphics : 2013-09-13 Binky Moon, LLC
+// graphics : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/graphics.html
graphics
-// gratis : 2014-03-20 Binky Moon, LLC
+// gratis : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gratis.html
gratis
-// green : 2014-05-08 Identity Digital Limited
+// green : Identity Digital Limited
+// https://www.iana.org/domains/root/db/green.html
green
-// gripe : 2014-03-06 Binky Moon, LLC
+// gripe : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gripe.html
gripe
-// grocery : 2016-06-16 Wal-Mart Stores, Inc.
+// grocery : Wal-Mart Stores, Inc.
+// https://www.iana.org/domains/root/db/grocery.html
grocery
-// group : 2014-08-15 Binky Moon, LLC
+// group : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/group.html
group
-// guardian : 2015-07-30 The Guardian Life Insurance Company of America
+// guardian : The Guardian Life Insurance Company of America
+// https://www.iana.org/domains/root/db/guardian.html
guardian
-// gucci : 2014-11-13 Guccio Gucci S.p.a.
+// gucci : Guccio Gucci S.p.a.
+// https://www.iana.org/domains/root/db/gucci.html
gucci
-// guge : 2014-08-28 Charleston Road Registry Inc.
+// guge : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/guge.html
guge
-// guide : 2013-09-13 Binky Moon, LLC
+// guide : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/guide.html
guide
-// guitars : 2013-11-14 XYZ.COM LLC
+// guitars : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/guitars.html
guitars
-// guru : 2013-08-27 Binky Moon, LLC
+// guru : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/guru.html
guru
-// hair : 2015-12-03 XYZ.COM LLC
+// hair : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/hair.html
hair
-// hamburg : 2014-02-20 Hamburg Top-Level-Domain GmbH
+// hamburg : Hamburg Top-Level-Domain GmbH
+// https://www.iana.org/domains/root/db/hamburg.html
hamburg
-// hangout : 2014-11-13 Charleston Road Registry Inc.
+// hangout : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/hangout.html
hangout
-// haus : 2013-12-05 Dog Beach, LLC
+// haus : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/haus.html
haus
-// hbo : 2015-07-30 HBO Registry Services, Inc.
+// hbo : HBO Registry Services, Inc.
+// https://www.iana.org/domains/root/db/hbo.html
hbo
-// hdfc : 2015-07-30 HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED
+// hdfc : HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED
+// https://www.iana.org/domains/root/db/hdfc.html
hdfc
-// hdfcbank : 2015-02-12 HDFC Bank Limited
+// hdfcbank : HDFC Bank Limited
+// https://www.iana.org/domains/root/db/hdfcbank.html
hdfcbank
-// health : 2015-02-11 DotHealth, LLC
+// health : Registry Services, LLC
+// https://www.iana.org/domains/root/db/health.html
health
-// healthcare : 2014-06-12 Binky Moon, LLC
+// healthcare : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/healthcare.html
healthcare
-// help : 2014-06-26 Innovation service Limited
+// help : Innovation service Limited
+// https://www.iana.org/domains/root/db/help.html
help
-// helsinki : 2015-02-05 City of Helsinki
+// helsinki : City of Helsinki
+// https://www.iana.org/domains/root/db/helsinki.html
helsinki
-// here : 2014-02-06 Charleston Road Registry Inc.
+// here : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/here.html
here
-// hermes : 2014-07-10 HERMES INTERNATIONAL
+// hermes : HERMES INTERNATIONAL
+// https://www.iana.org/domains/root/db/hermes.html
hermes
-// hgtv : 2015-07-02 Lifestyle Domain Holdings, Inc.
-hgtv
-
-// hiphop : 2014-03-06 Dot Hip Hop, LLC
+// hiphop : Dot Hip Hop, LLC
+// https://www.iana.org/domains/root/db/hiphop.html
hiphop
-// hisamitsu : 2015-07-16 Hisamitsu Pharmaceutical Co.,Inc.
+// hisamitsu : Hisamitsu Pharmaceutical Co.,Inc.
+// https://www.iana.org/domains/root/db/hisamitsu.html
hisamitsu
-// hitachi : 2014-10-31 Hitachi, Ltd.
+// hitachi : Hitachi, Ltd.
+// https://www.iana.org/domains/root/db/hitachi.html
hitachi
-// hiv : 2014-03-13 Internet Naming Company LLC
+// hiv : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/hiv.html
hiv
-// hkt : 2015-05-14 PCCW-HKT DataCom Services Limited
+// hkt : PCCW-HKT DataCom Services Limited
+// https://www.iana.org/domains/root/db/hkt.html
hkt
-// hockey : 2015-03-19 Binky Moon, LLC
+// hockey : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/hockey.html
hockey
-// holdings : 2013-08-27 Binky Moon, LLC
+// holdings : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/holdings.html
holdings
-// holiday : 2013-11-07 Binky Moon, LLC
+// holiday : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/holiday.html
holiday
-// homedepot : 2015-04-02 Home Depot Product Authority, LLC
+// homedepot : Home Depot Product Authority, LLC
+// https://www.iana.org/domains/root/db/homedepot.html
homedepot
-// homegoods : 2015-07-16 The TJX Companies, Inc.
+// homegoods : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/homegoods.html
homegoods
-// homes : 2014-01-09 XYZ.COM LLC
+// homes : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/homes.html
homes
-// homesense : 2015-07-16 The TJX Companies, Inc.
+// homesense : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/homesense.html
homesense
-// honda : 2014-12-18 Honda Motor Co., Ltd.
+// honda : Honda Motor Co., Ltd.
+// https://www.iana.org/domains/root/db/honda.html
honda
-// horse : 2013-11-21 Registry Services, LLC
+// horse : Registry Services, LLC
+// https://www.iana.org/domains/root/db/horse.html
horse
-// hospital : 2016-10-20 Binky Moon, LLC
+// hospital : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/hospital.html
hospital
-// host : 2014-04-17 Radix FZC
+// host : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/host.html
host
-// hosting : 2014-05-29 XYZ.COM LLC
+// hosting : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/hosting.html
hosting
-// hot : 2015-08-27 Amazon Registry Services, Inc.
+// hot : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/hot.html
hot
-// hoteles : 2015-03-05 Travel Reservations SRL
-hoteles
-
-// hotels : 2016-04-07 Booking.com B.V.
+// hotels : Booking.com B.V.
+// https://www.iana.org/domains/root/db/hotels.html
hotels
-// hotmail : 2014-12-18 Microsoft Corporation
+// hotmail : Microsoft Corporation
+// https://www.iana.org/domains/root/db/hotmail.html
hotmail
-// house : 2013-11-07 Binky Moon, LLC
+// house : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/house.html
house
-// how : 2014-01-23 Charleston Road Registry Inc.
+// how : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/how.html
how
-// hsbc : 2014-10-24 HSBC Global Services (UK) Limited
+// hsbc : HSBC Global Services (UK) Limited
+// https://www.iana.org/domains/root/db/hsbc.html
hsbc
-// hughes : 2015-07-30 Hughes Satellite Systems Corporation
+// hughes : Hughes Satellite Systems Corporation
+// https://www.iana.org/domains/root/db/hughes.html
hughes
-// hyatt : 2015-07-30 Hyatt GTLD, L.L.C.
+// hyatt : Hyatt GTLD, L.L.C.
+// https://www.iana.org/domains/root/db/hyatt.html
hyatt
-// hyundai : 2015-07-09 Hyundai Motor Company
+// hyundai : Hyundai Motor Company
+// https://www.iana.org/domains/root/db/hyundai.html
hyundai
-// ibm : 2014-07-31 International Business Machines Corporation
+// ibm : International Business Machines Corporation
+// https://www.iana.org/domains/root/db/ibm.html
ibm
-// icbc : 2015-02-19 Industrial and Commercial Bank of China Limited
+// icbc : Industrial and Commercial Bank of China Limited
+// https://www.iana.org/domains/root/db/icbc.html
icbc
-// ice : 2014-10-30 IntercontinentalExchange, Inc.
+// ice : IntercontinentalExchange, Inc.
+// https://www.iana.org/domains/root/db/ice.html
ice
-// icu : 2015-01-08 ShortDot SA
+// icu : ShortDot SA
+// https://www.iana.org/domains/root/db/icu.html
icu
-// ieee : 2015-07-23 IEEE Global LLC
+// ieee : IEEE Global LLC
+// https://www.iana.org/domains/root/db/ieee.html
ieee
-// ifm : 2014-01-30 ifm electronic gmbh
+// ifm : ifm electronic gmbh
+// https://www.iana.org/domains/root/db/ifm.html
ifm
-// ikano : 2015-07-09 Ikano S.A.
+// ikano : Ikano S.A.
+// https://www.iana.org/domains/root/db/ikano.html
ikano
-// imamat : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation)
+// imamat : Fondation Aga Khan (Aga Khan Foundation)
+// https://www.iana.org/domains/root/db/imamat.html
imamat
-// imdb : 2015-06-25 Amazon Registry Services, Inc.
+// imdb : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/imdb.html
imdb
-// immo : 2014-07-10 Binky Moon, LLC
+// immo : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/immo.html
immo
-// immobilien : 2013-11-07 Dog Beach, LLC
+// immobilien : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/immobilien.html
immobilien
-// inc : 2018-03-10 Intercap Registry Inc.
+// inc : Intercap Registry Inc.
+// https://www.iana.org/domains/root/db/inc.html
inc
-// industries : 2013-12-05 Binky Moon, LLC
+// industries : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/industries.html
industries
-// infiniti : 2014-03-27 NISSAN MOTOR CO., LTD.
+// infiniti : NISSAN MOTOR CO., LTD.
+// https://www.iana.org/domains/root/db/infiniti.html
infiniti
-// ing : 2014-01-23 Charleston Road Registry Inc.
+// ing : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/ing.html
ing
-// ink : 2013-12-05 Top Level Design, LLC
+// ink : Registry Services, LLC
+// https://www.iana.org/domains/root/db/ink.html
ink
-// institute : 2013-11-07 Binky Moon, LLC
+// institute : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/institute.html
institute
-// insurance : 2015-02-19 fTLD Registry Services LLC
+// insurance : fTLD Registry Services LLC
+// https://www.iana.org/domains/root/db/insurance.html
insurance
-// insure : 2014-03-20 Binky Moon, LLC
+// insure : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/insure.html
insure
-// international : 2013-11-07 Binky Moon, LLC
+// international : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/international.html
international
-// intuit : 2015-07-30 Intuit Administrative Services, Inc.
+// intuit : Intuit Administrative Services, Inc.
+// https://www.iana.org/domains/root/db/intuit.html
intuit
-// investments : 2014-03-20 Binky Moon, LLC
+// investments : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/investments.html
investments
-// ipiranga : 2014-08-28 Ipiranga Produtos de Petroleo S.A.
+// ipiranga : Ipiranga Produtos de Petroleo S.A.
+// https://www.iana.org/domains/root/db/ipiranga.html
ipiranga
-// irish : 2014-08-07 Binky Moon, LLC
+// irish : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/irish.html
irish
-// ismaili : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation)
+// ismaili : Fondation Aga Khan (Aga Khan Foundation)
+// https://www.iana.org/domains/root/db/ismaili.html
ismaili
-// ist : 2014-08-28 Istanbul Metropolitan Municipality
+// ist : Istanbul Metropolitan Municipality
+// https://www.iana.org/domains/root/db/ist.html
ist
-// istanbul : 2014-08-28 Istanbul Metropolitan Municipality
+// istanbul : Istanbul Metropolitan Municipality
+// https://www.iana.org/domains/root/db/istanbul.html
istanbul
-// itau : 2014-10-02 Itau Unibanco Holding S.A.
+// itau : Itau Unibanco Holding S.A.
+// https://www.iana.org/domains/root/db/itau.html
itau
-// itv : 2015-07-09 ITV Services Limited
+// itv : ITV Services Limited
+// https://www.iana.org/domains/root/db/itv.html
itv
-// jaguar : 2014-11-13 Jaguar Land Rover Ltd
+// jaguar : Jaguar Land Rover Ltd
+// https://www.iana.org/domains/root/db/jaguar.html
jaguar
-// java : 2014-06-19 Oracle Corporation
+// java : Oracle Corporation
+// https://www.iana.org/domains/root/db/java.html
java
-// jcb : 2014-11-20 JCB Co., Ltd.
+// jcb : JCB Co., Ltd.
+// https://www.iana.org/domains/root/db/jcb.html
jcb
-// jeep : 2015-07-30 FCA US LLC.
+// jeep : FCA US LLC.
+// https://www.iana.org/domains/root/db/jeep.html
jeep
-// jetzt : 2014-01-09 Binky Moon, LLC
+// jetzt : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/jetzt.html
jetzt
-// jewelry : 2015-03-05 Binky Moon, LLC
+// jewelry : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/jewelry.html
jewelry
-// jio : 2015-04-02 Reliance Industries Limited
+// jio : Reliance Industries Limited
+// https://www.iana.org/domains/root/db/jio.html
jio
-// jll : 2015-04-02 Jones Lang LaSalle Incorporated
+// jll : Jones Lang LaSalle Incorporated
+// https://www.iana.org/domains/root/db/jll.html
jll
-// jmp : 2015-03-26 Matrix IP LLC
+// jmp : Matrix IP LLC
+// https://www.iana.org/domains/root/db/jmp.html
jmp
-// jnj : 2015-06-18 Johnson & Johnson Services, Inc.
+// jnj : Johnson & Johnson Services, Inc.
+// https://www.iana.org/domains/root/db/jnj.html
jnj
-// joburg : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry
+// joburg : ZA Central Registry NPC trading as ZA Central Registry
+// https://www.iana.org/domains/root/db/joburg.html
joburg
-// jot : 2014-12-18 Amazon Registry Services, Inc.
+// jot : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/jot.html
jot
-// joy : 2014-12-18 Amazon Registry Services, Inc.
+// joy : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/joy.html
joy
-// jpmorgan : 2015-04-30 JPMorgan Chase Bank, National Association
+// jpmorgan : JPMorgan Chase Bank, National Association
+// https://www.iana.org/domains/root/db/jpmorgan.html
jpmorgan
-// jprs : 2014-09-18 Japan Registry Services Co., Ltd.
+// jprs : Japan Registry Services Co., Ltd.
+// https://www.iana.org/domains/root/db/jprs.html
jprs
-// juegos : 2014-03-20 Internet Naming Company LLC
+// juegos : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/juegos.html
juegos
-// juniper : 2015-07-30 JUNIPER NETWORKS, INC.
+// juniper : JUNIPER NETWORKS, INC.
+// https://www.iana.org/domains/root/db/juniper.html
juniper
-// kaufen : 2013-11-07 Dog Beach, LLC
+// kaufen : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/kaufen.html
kaufen
-// kddi : 2014-09-12 KDDI CORPORATION
+// kddi : KDDI CORPORATION
+// https://www.iana.org/domains/root/db/kddi.html
kddi
-// kerryhotels : 2015-04-30 Kerry Trading Co. Limited
+// kerryhotels : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/kerryhotels.html
kerryhotels
-// kerrylogistics : 2015-04-09 Kerry Trading Co. Limited
+// kerrylogistics : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/kerrylogistics.html
kerrylogistics
-// kerryproperties : 2015-04-09 Kerry Trading Co. Limited
+// kerryproperties : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/kerryproperties.html
kerryproperties
-// kfh : 2014-12-04 Kuwait Finance House
+// kfh : Kuwait Finance House
+// https://www.iana.org/domains/root/db/kfh.html
kfh
-// kia : 2015-07-09 KIA MOTORS CORPORATION
+// kia : KIA MOTORS CORPORATION
+// https://www.iana.org/domains/root/db/kia.html
kia
-// kids : 2021-08-13 DotKids Foundation Limited
+// kids : DotKids Foundation Limited
+// https://www.iana.org/domains/root/db/kids.html
kids
-// kim : 2013-09-23 Identity Digital Limited
+// kim : Identity Digital Limited
+// https://www.iana.org/domains/root/db/kim.html
kim
-// kinder : 2014-11-07 Ferrero Trading Lux S.A.
-kinder
-
-// kindle : 2015-06-25 Amazon Registry Services, Inc.
+// kindle : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/kindle.html
kindle
-// kitchen : 2013-09-20 Binky Moon, LLC
+// kitchen : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/kitchen.html
kitchen
-// kiwi : 2013-09-20 DOT KIWI LIMITED
+// kiwi : DOT KIWI LIMITED
+// https://www.iana.org/domains/root/db/kiwi.html
kiwi
-// koeln : 2014-01-09 dotKoeln GmbH
+// koeln : dotKoeln GmbH
+// https://www.iana.org/domains/root/db/koeln.html
koeln
-// komatsu : 2015-01-08 Komatsu Ltd.
+// komatsu : Komatsu Ltd.
+// https://www.iana.org/domains/root/db/komatsu.html
komatsu
-// kosher : 2015-08-20 Kosher Marketing Assets LLC
+// kosher : Kosher Marketing Assets LLC
+// https://www.iana.org/domains/root/db/kosher.html
kosher
-// kpmg : 2015-04-23 KPMG International Cooperative (KPMG International Genossenschaft)
+// kpmg : KPMG International Cooperative (KPMG International Genossenschaft)
+// https://www.iana.org/domains/root/db/kpmg.html
kpmg
-// kpn : 2015-01-08 Koninklijke KPN N.V.
+// kpn : Koninklijke KPN N.V.
+// https://www.iana.org/domains/root/db/kpn.html
kpn
-// krd : 2013-12-05 KRG Department of Information Technology
+// krd : KRG Department of Information Technology
+// https://www.iana.org/domains/root/db/krd.html
krd
-// kred : 2013-12-19 KredTLD Pty Ltd
+// kred : KredTLD Pty Ltd
+// https://www.iana.org/domains/root/db/kred.html
kred
-// kuokgroup : 2015-04-09 Kerry Trading Co. Limited
+// kuokgroup : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/kuokgroup.html
kuokgroup
-// kyoto : 2014-11-07 Academic Institution: Kyoto Jyoho Gakuen
+// kyoto : Academic Institution: Kyoto Jyoho Gakuen
+// https://www.iana.org/domains/root/db/kyoto.html
kyoto
-// lacaixa : 2014-01-09 Fundación Bancaria Caixa d’Estalvis i Pensions de Barcelona, “la Caixa”
+// lacaixa : Fundación Bancaria Caixa d’Estalvis i Pensions de Barcelona, “la Caixa”
+// https://www.iana.org/domains/root/db/lacaixa.html
lacaixa
-// lamborghini : 2015-06-04 Automobili Lamborghini S.p.A.
+// lamborghini : Automobili Lamborghini S.p.A.
+// https://www.iana.org/domains/root/db/lamborghini.html
lamborghini
-// lamer : 2015-10-01 The Estée Lauder Companies Inc.
+// lamer : The Estée Lauder Companies Inc.
+// https://www.iana.org/domains/root/db/lamer.html
lamer
-// lancaster : 2015-02-12 LANCASTER
+// lancaster : LANCASTER
+// https://www.iana.org/domains/root/db/lancaster.html
lancaster
-// lancia : 2015-07-31 Fiat Chrysler Automobiles N.V.
-lancia
-
-// land : 2013-09-10 Binky Moon, LLC
+// land : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/land.html
land
-// landrover : 2014-11-13 Jaguar Land Rover Ltd
+// landrover : Jaguar Land Rover Ltd
+// https://www.iana.org/domains/root/db/landrover.html
landrover
-// lanxess : 2015-07-30 LANXESS Corporation
+// lanxess : LANXESS Corporation
+// https://www.iana.org/domains/root/db/lanxess.html
lanxess
-// lasalle : 2015-04-02 Jones Lang LaSalle Incorporated
+// lasalle : Jones Lang LaSalle Incorporated
+// https://www.iana.org/domains/root/db/lasalle.html
lasalle
-// lat : 2014-10-16 XYZ.COM LLC
+// lat : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/lat.html
lat
-// latino : 2015-07-30 Dish DBS Corporation
+// latino : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/latino.html
latino
-// latrobe : 2014-06-16 La Trobe University
+// latrobe : La Trobe University
+// https://www.iana.org/domains/root/db/latrobe.html
latrobe
-// law : 2015-01-22 Registry Services, LLC
+// law : Registry Services, LLC
+// https://www.iana.org/domains/root/db/law.html
law
-// lawyer : 2014-03-20 Dog Beach, LLC
+// lawyer : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/lawyer.html
lawyer
-// lds : 2014-03-20 IRI Domain Management, LLC
+// lds : IRI Domain Management, LLC
+// https://www.iana.org/domains/root/db/lds.html
lds
-// lease : 2014-03-06 Binky Moon, LLC
+// lease : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/lease.html
lease
-// leclerc : 2014-08-07 A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc
+// leclerc : A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc
+// https://www.iana.org/domains/root/db/leclerc.html
leclerc
-// lefrak : 2015-07-16 LeFrak Organization, Inc.
+// lefrak : LeFrak Organization, Inc.
+// https://www.iana.org/domains/root/db/lefrak.html
lefrak
-// legal : 2014-10-16 Binky Moon, LLC
+// legal : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/legal.html
legal
-// lego : 2015-07-16 LEGO Juris A/S
+// lego : LEGO Juris A/S
+// https://www.iana.org/domains/root/db/lego.html
lego
-// lexus : 2015-04-23 TOYOTA MOTOR CORPORATION
+// lexus : TOYOTA MOTOR CORPORATION
+// https://www.iana.org/domains/root/db/lexus.html
lexus
-// lgbt : 2014-05-08 Identity Digital Limited
+// lgbt : Identity Digital Limited
+// https://www.iana.org/domains/root/db/lgbt.html
lgbt
-// lidl : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG
+// lidl : Schwarz Domains und Services GmbH & Co. KG
+// https://www.iana.org/domains/root/db/lidl.html
lidl
-// life : 2014-02-06 Binky Moon, LLC
+// life : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/life.html
life
-// lifeinsurance : 2015-01-15 American Council of Life Insurers
+// lifeinsurance : American Council of Life Insurers
+// https://www.iana.org/domains/root/db/lifeinsurance.html
lifeinsurance
-// lifestyle : 2014-12-11 Lifestyle Domain Holdings, Inc.
+// lifestyle : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/lifestyle.html
lifestyle
-// lighting : 2013-08-27 Binky Moon, LLC
+// lighting : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/lighting.html
lighting
-// like : 2014-12-18 Amazon Registry Services, Inc.
+// like : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/like.html
like
-// lilly : 2015-07-31 Eli Lilly and Company
+// lilly : Eli Lilly and Company
+// https://www.iana.org/domains/root/db/lilly.html
lilly
-// limited : 2014-03-06 Binky Moon, LLC
+// limited : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/limited.html
limited
-// limo : 2013-10-17 Binky Moon, LLC
+// limo : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/limo.html
limo
-// lincoln : 2014-11-13 Ford Motor Company
+// lincoln : Ford Motor Company
+// https://www.iana.org/domains/root/db/lincoln.html
lincoln
-// link : 2013-11-14 Nova Registry Ltd
+// link : Nova Registry Ltd
+// https://www.iana.org/domains/root/db/link.html
link
-// lipsy : 2015-06-25 Lipsy Ltd
+// lipsy : Lipsy Ltd
+// https://www.iana.org/domains/root/db/lipsy.html
lipsy
-// live : 2014-12-04 Dog Beach, LLC
+// live : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/live.html
live
-// living : 2015-07-30 Lifestyle Domain Holdings, Inc.
+// living : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/living.html
living
-// llc : 2017-12-14 Identity Digital Limited
+// llc : Identity Digital Limited
+// https://www.iana.org/domains/root/db/llc.html
llc
-// llp : 2019-08-26 Intercap Registry Inc.
+// llp : Intercap Registry Inc.
+// https://www.iana.org/domains/root/db/llp.html
llp
-// loan : 2014-11-20 dot Loan Limited
+// loan : dot Loan Limited
+// https://www.iana.org/domains/root/db/loan.html
loan
-// loans : 2014-03-20 Binky Moon, LLC
+// loans : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/loans.html
loans
-// locker : 2015-06-04 Dish DBS Corporation
+// locker : Orange Domains LLC
+// https://www.iana.org/domains/root/db/locker.html
locker
-// locus : 2015-06-25 Locus Analytics LLC
+// locus : Locus Analytics LLC
+// https://www.iana.org/domains/root/db/locus.html
locus
-// lol : 2015-01-30 XYZ.COM LLC
+// lol : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/lol.html
lol
-// london : 2013-11-14 Dot London Domains Limited
+// london : Dot London Domains Limited
+// https://www.iana.org/domains/root/db/london.html
london
-// lotte : 2014-11-07 Lotte Holdings Co., Ltd.
+// lotte : Lotte Holdings Co., Ltd.
+// https://www.iana.org/domains/root/db/lotte.html
lotte
-// lotto : 2014-04-10 Identity Digital Limited
+// lotto : Identity Digital Limited
+// https://www.iana.org/domains/root/db/lotto.html
lotto
-// love : 2014-12-22 Merchant Law Group LLP
+// love : Merchant Law Group LLP
+// https://www.iana.org/domains/root/db/love.html
love
-// lpl : 2015-07-30 LPL Holdings, Inc.
+// lpl : LPL Holdings, Inc.
+// https://www.iana.org/domains/root/db/lpl.html
lpl
-// lplfinancial : 2015-07-30 LPL Holdings, Inc.
+// lplfinancial : LPL Holdings, Inc.
+// https://www.iana.org/domains/root/db/lplfinancial.html
lplfinancial
-// ltd : 2014-09-25 Binky Moon, LLC
+// ltd : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/ltd.html
ltd
-// ltda : 2014-04-17 InterNetX, Corp
+// ltda : InterNetX, Corp
+// https://www.iana.org/domains/root/db/ltda.html
ltda
-// lundbeck : 2015-08-06 H. Lundbeck A/S
+// lundbeck : H. Lundbeck A/S
+// https://www.iana.org/domains/root/db/lundbeck.html
lundbeck
-// luxe : 2014-01-09 Registry Services, LLC
+// luxe : Registry Services, LLC
+// https://www.iana.org/domains/root/db/luxe.html
luxe
-// luxury : 2013-10-17 Luxury Partners, LLC
+// luxury : Luxury Partners, LLC
+// https://www.iana.org/domains/root/db/luxury.html
luxury
-// madrid : 2014-05-01 Comunidad de Madrid
+// madrid : Comunidad de Madrid
+// https://www.iana.org/domains/root/db/madrid.html
madrid
-// maif : 2014-10-02 Mutuelle Assurance Instituteur France (MAIF)
+// maif : Mutuelle Assurance Instituteur France (MAIF)
+// https://www.iana.org/domains/root/db/maif.html
maif
-// maison : 2013-12-05 Binky Moon, LLC
+// maison : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/maison.html
maison
-// makeup : 2015-01-15 XYZ.COM LLC
+// makeup : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/makeup.html
makeup
-// man : 2014-12-04 MAN SE
+// man : MAN SE
+// https://www.iana.org/domains/root/db/man.html
man
-// management : 2013-11-07 Binky Moon, LLC
+// management : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/management.html
management
-// mango : 2013-10-24 PUNTO FA S.L.
+// mango : PUNTO FA S.L.
+// https://www.iana.org/domains/root/db/mango.html
mango
-// map : 2016-06-09 Charleston Road Registry Inc.
+// map : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/map.html
map
-// market : 2014-03-06 Dog Beach, LLC
+// market : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/market.html
market
-// marketing : 2013-11-07 Binky Moon, LLC
+// marketing : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/marketing.html
marketing
-// markets : 2014-12-11 Dog Beach, LLC
+// markets : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/markets.html
markets
-// marriott : 2014-10-09 Marriott Worldwide Corporation
+// marriott : Marriott Worldwide Corporation
+// https://www.iana.org/domains/root/db/marriott.html
marriott
-// marshalls : 2015-07-16 The TJX Companies, Inc.
+// marshalls : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/marshalls.html
marshalls
-// maserati : 2015-07-31 Fiat Chrysler Automobiles N.V.
-maserati
-
-// mattel : 2015-08-06 Mattel Sites, Inc.
+// mattel : Mattel Sites, Inc.
+// https://www.iana.org/domains/root/db/mattel.html
mattel
-// mba : 2015-04-02 Binky Moon, LLC
+// mba : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/mba.html
mba
-// mckinsey : 2015-07-31 McKinsey Holdings, Inc.
+// mckinsey : McKinsey Holdings, Inc.
+// https://www.iana.org/domains/root/db/mckinsey.html
mckinsey
-// med : 2015-08-06 Medistry LLC
+// med : Medistry LLC
+// https://www.iana.org/domains/root/db/med.html
med
-// media : 2014-03-06 Binky Moon, LLC
+// media : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/media.html
media
-// meet : 2014-01-16 Charleston Road Registry Inc.
+// meet : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/meet.html
meet
-// melbourne : 2014-05-29 The Crown in right of the State of Victoria, represented by its Department of State Development, Business and Innovation
+// melbourne : The Crown in right of the State of Victoria, represented by its Department of State Development, Business and Innovation
+// https://www.iana.org/domains/root/db/melbourne.html
melbourne
-// meme : 2014-01-30 Charleston Road Registry Inc.
+// meme : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/meme.html
meme
-// memorial : 2014-10-16 Dog Beach, LLC
+// memorial : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/memorial.html
memorial
-// men : 2015-02-26 Exclusive Registry Limited
+// men : Exclusive Registry Limited
+// https://www.iana.org/domains/root/db/men.html
men
-// menu : 2013-09-11 Dot Menu Registry, LLC
+// menu : Dot Menu Registry, LLC
+// https://www.iana.org/domains/root/db/menu.html
menu
-// merckmsd : 2016-07-14 MSD Registry Holdings, Inc.
+// merckmsd : MSD Registry Holdings, Inc.
+// https://www.iana.org/domains/root/db/merckmsd.html
merckmsd
-// miami : 2013-12-19 Registry Services, LLC
+// miami : Registry Services, LLC
+// https://www.iana.org/domains/root/db/miami.html
miami
-// microsoft : 2014-12-18 Microsoft Corporation
+// microsoft : Microsoft Corporation
+// https://www.iana.org/domains/root/db/microsoft.html
microsoft
-// mini : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft
+// mini : Bayerische Motoren Werke Aktiengesellschaft
+// https://www.iana.org/domains/root/db/mini.html
mini
-// mint : 2015-07-30 Intuit Administrative Services, Inc.
+// mint : Intuit Administrative Services, Inc.
+// https://www.iana.org/domains/root/db/mint.html
mint
-// mit : 2015-07-02 Massachusetts Institute of Technology
+// mit : Massachusetts Institute of Technology
+// https://www.iana.org/domains/root/db/mit.html
mit
-// mitsubishi : 2015-07-23 Mitsubishi Corporation
+// mitsubishi : Mitsubishi Corporation
+// https://www.iana.org/domains/root/db/mitsubishi.html
mitsubishi
-// mlb : 2015-05-21 MLB Advanced Media DH, LLC
+// mlb : MLB Advanced Media DH, LLC
+// https://www.iana.org/domains/root/db/mlb.html
mlb
-// mls : 2015-04-23 The Canadian Real Estate Association
+// mls : The Canadian Real Estate Association
+// https://www.iana.org/domains/root/db/mls.html
mls
-// mma : 2014-11-07 MMA IARD
+// mma : MMA IARD
+// https://www.iana.org/domains/root/db/mma.html
mma
-// mobile : 2016-06-02 Dish DBS Corporation
+// mobile : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/mobile.html
mobile
-// moda : 2013-11-07 Dog Beach, LLC
+// moda : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/moda.html
moda
-// moe : 2013-11-13 Interlink Systems Innovation Institute K.K.
+// moe : Interlink Systems Innovation Institute K.K.
+// https://www.iana.org/domains/root/db/moe.html
moe
-// moi : 2014-12-18 Amazon Registry Services, Inc.
+// moi : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/moi.html
moi
-// mom : 2015-04-16 XYZ.COM LLC
+// mom : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/mom.html
mom
-// monash : 2013-09-30 Monash University
+// monash : Monash University
+// https://www.iana.org/domains/root/db/monash.html
monash
-// money : 2014-10-16 Binky Moon, LLC
+// money : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/money.html
money
-// monster : 2015-09-11 XYZ.COM LLC
+// monster : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/monster.html
monster
-// mormon : 2013-12-05 IRI Domain Management, LLC
+// mormon : IRI Domain Management, LLC
+// https://www.iana.org/domains/root/db/mormon.html
mormon
-// mortgage : 2014-03-20 Dog Beach, LLC
+// mortgage : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/mortgage.html
mortgage
-// moscow : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
+// moscow : Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
+// https://www.iana.org/domains/root/db/moscow.html
moscow
-// moto : 2015-06-04 Motorola Trademark Holdings, LLC
+// moto : Motorola Trademark Holdings, LLC
+// https://www.iana.org/domains/root/db/moto.html
moto
-// motorcycles : 2014-01-09 XYZ.COM LLC
+// motorcycles : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/motorcycles.html
motorcycles
-// mov : 2014-01-30 Charleston Road Registry Inc.
+// mov : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/mov.html
mov
-// movie : 2015-02-05 Binky Moon, LLC
+// movie : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/movie.html
movie
-// msd : 2015-07-23 MSD Registry Holdings, Inc.
+// msd : MSD Registry Holdings, Inc.
+// https://www.iana.org/domains/root/db/msd.html
msd
-// mtn : 2014-12-04 MTN Dubai Limited
+// mtn : MTN Dubai Limited
+// https://www.iana.org/domains/root/db/mtn.html
mtn
-// mtr : 2015-03-12 MTR Corporation Limited
+// mtr : MTR Corporation Limited
+// https://www.iana.org/domains/root/db/mtr.html
mtr
-// music : 2021-05-04 DotMusic Limited
+// music : DotMusic Limited
+// https://www.iana.org/domains/root/db/music.html
music
-// mutual : 2015-04-02 Northwestern Mutual MU TLD Registry, LLC
-mutual
-
-// nab : 2015-08-20 National Australia Bank Limited
+// nab : National Australia Bank Limited
+// https://www.iana.org/domains/root/db/nab.html
nab
-// nagoya : 2013-10-24 GMO Registry, Inc.
+// nagoya : GMO Registry, Inc.
+// https://www.iana.org/domains/root/db/nagoya.html
nagoya
-// natura : 2015-03-12 NATURA COSMÉTICOS S.A.
+// natura : NATURA COSMÉTICOS S.A.
+// https://www.iana.org/domains/root/db/natura.html
natura
-// navy : 2014-03-06 Dog Beach, LLC
+// navy : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/navy.html
navy
-// nba : 2015-07-31 NBA REGISTRY, LLC
+// nba : NBA REGISTRY, LLC
+// https://www.iana.org/domains/root/db/nba.html
nba
-// nec : 2015-01-08 NEC Corporation
+// nec : NEC Corporation
+// https://www.iana.org/domains/root/db/nec.html
nec
-// netbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA
+// netbank : COMMONWEALTH BANK OF AUSTRALIA
+// https://www.iana.org/domains/root/db/netbank.html
netbank
-// netflix : 2015-06-18 Netflix, Inc.
+// netflix : Netflix, Inc.
+// https://www.iana.org/domains/root/db/netflix.html
netflix
-// network : 2013-11-14 Binky Moon, LLC
+// network : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/network.html
network
-// neustar : 2013-12-05 NeuStar, Inc.
+// neustar : NeuStar, Inc.
+// https://www.iana.org/domains/root/db/neustar.html
neustar
-// new : 2014-01-30 Charleston Road Registry Inc.
+// new : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/new.html
new
-// news : 2014-12-18 Dog Beach, LLC
+// news : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/news.html
news
-// next : 2015-06-18 Next plc
+// next : Next plc
+// https://www.iana.org/domains/root/db/next.html
next
-// nextdirect : 2015-06-18 Next plc
+// nextdirect : Next plc
+// https://www.iana.org/domains/root/db/nextdirect.html
nextdirect
-// nexus : 2014-07-24 Charleston Road Registry Inc.
+// nexus : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/nexus.html
nexus
-// nfl : 2015-07-23 NFL Reg Ops LLC
+// nfl : NFL Reg Ops LLC
+// https://www.iana.org/domains/root/db/nfl.html
nfl
-// ngo : 2014-03-06 Public Interest Registry
+// ngo : Public Interest Registry
+// https://www.iana.org/domains/root/db/ngo.html
ngo
-// nhk : 2014-02-13 Japan Broadcasting Corporation (NHK)
+// nhk : Japan Broadcasting Corporation (NHK)
+// https://www.iana.org/domains/root/db/nhk.html
nhk
-// nico : 2014-12-04 DWANGO Co., Ltd.
+// nico : DWANGO Co., Ltd.
+// https://www.iana.org/domains/root/db/nico.html
nico
-// nike : 2015-07-23 NIKE, Inc.
+// nike : NIKE, Inc.
+// https://www.iana.org/domains/root/db/nike.html
nike
-// nikon : 2015-05-21 NIKON CORPORATION
+// nikon : NIKON CORPORATION
+// https://www.iana.org/domains/root/db/nikon.html
nikon
-// ninja : 2013-11-07 Dog Beach, LLC
+// ninja : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/ninja.html
ninja
-// nissan : 2014-03-27 NISSAN MOTOR CO., LTD.
+// nissan : NISSAN MOTOR CO., LTD.
+// https://www.iana.org/domains/root/db/nissan.html
nissan
-// nissay : 2015-10-29 Nippon Life Insurance Company
+// nissay : Nippon Life Insurance Company
+// https://www.iana.org/domains/root/db/nissay.html
nissay
-// nokia : 2015-01-08 Nokia Corporation
+// nokia : Nokia Corporation
+// https://www.iana.org/domains/root/db/nokia.html
nokia
-// northwesternmutual : 2015-06-18 Northwestern Mutual Registry, LLC
-northwesternmutual
-
-// norton : 2014-12-04 NortonLifeLock Inc.
+// norton : NortonLifeLock Inc.
+// https://www.iana.org/domains/root/db/norton.html
norton
-// now : 2015-06-25 Amazon Registry Services, Inc.
+// now : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/now.html
now
-// nowruz : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// nowruz : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// https://www.iana.org/domains/root/db/nowruz.html
nowruz
-// nowtv : 2015-05-14 Starbucks (HK) Limited
+// nowtv : Starbucks (HK) Limited
+// https://www.iana.org/domains/root/db/nowtv.html
nowtv
-// nra : 2014-05-22 NRA Holdings Company, INC.
+// nra : NRA Holdings Company, INC.
+// https://www.iana.org/domains/root/db/nra.html
nra
-// nrw : 2013-11-21 Minds + Machines GmbH
+// nrw : Minds + Machines GmbH
+// https://www.iana.org/domains/root/db/nrw.html
nrw
-// ntt : 2014-10-31 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
+// ntt : NIPPON TELEGRAPH AND TELEPHONE CORPORATION
+// https://www.iana.org/domains/root/db/ntt.html
ntt
-// nyc : 2014-01-23 The City of New York by and through the New York City Department of Information Technology & Telecommunications
+// nyc : The City of New York by and through the New York City Department of Information Technology & Telecommunications
+// https://www.iana.org/domains/root/db/nyc.html
nyc
-// obi : 2014-09-25 OBI Group Holding SE & Co. KGaA
+// obi : OBI Group Holding SE & Co. KGaA
+// https://www.iana.org/domains/root/db/obi.html
obi
-// observer : 2015-04-30 Dog Beach, LLC
+// observer : Fegistry, LLC
+// https://www.iana.org/domains/root/db/observer.html
observer
-// office : 2015-03-12 Microsoft Corporation
+// office : Microsoft Corporation
+// https://www.iana.org/domains/root/db/office.html
office
-// okinawa : 2013-12-05 BRregistry, Inc.
+// okinawa : BRregistry, Inc.
+// https://www.iana.org/domains/root/db/okinawa.html
okinawa
-// olayan : 2015-05-14 Crescent Holding GmbH
+// olayan : Competrol (Luxembourg) Sarl
+// https://www.iana.org/domains/root/db/olayan.html
olayan
-// olayangroup : 2015-05-14 Crescent Holding GmbH
+// olayangroup : Competrol (Luxembourg) Sarl
+// https://www.iana.org/domains/root/db/olayangroup.html
olayangroup
-// oldnavy : 2015-07-31 The Gap, Inc.
+// oldnavy : The Gap, Inc.
+// https://www.iana.org/domains/root/db/oldnavy.html
oldnavy
-// ollo : 2015-06-04 Dish DBS Corporation
+// ollo : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/ollo.html
ollo
-// omega : 2015-01-08 The Swatch Group Ltd
+// omega : The Swatch Group Ltd
+// https://www.iana.org/domains/root/db/omega.html
omega
-// one : 2014-11-07 One.com A/S
+// one : One.com A/S
+// https://www.iana.org/domains/root/db/one.html
one
-// ong : 2014-03-06 Public Interest Registry
+// ong : Public Interest Registry
+// https://www.iana.org/domains/root/db/ong.html
ong
-// onl : 2013-09-16 iRegistry GmbH
+// onl : iRegistry GmbH
+// https://www.iana.org/domains/root/db/onl.html
onl
-// online : 2015-01-15 Radix FZC
+// online : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/online.html
online
-// ooo : 2014-01-09 INFIBEAM AVENUES LIMITED
+// ooo : INFIBEAM AVENUES LIMITED
+// https://www.iana.org/domains/root/db/ooo.html
ooo
-// open : 2015-07-31 American Express Travel Related Services Company, Inc.
+// open : American Express Travel Related Services Company, Inc.
+// https://www.iana.org/domains/root/db/open.html
open
-// oracle : 2014-06-19 Oracle Corporation
+// oracle : Oracle Corporation
+// https://www.iana.org/domains/root/db/oracle.html
oracle
-// orange : 2015-03-12 Orange Brand Services Limited
+// orange : Orange Brand Services Limited
+// https://www.iana.org/domains/root/db/orange.html
orange
-// organic : 2014-03-27 Identity Digital Limited
+// organic : Identity Digital Limited
+// https://www.iana.org/domains/root/db/organic.html
organic
-// origins : 2015-10-01 The Estée Lauder Companies Inc.
+// origins : The Estée Lauder Companies Inc.
+// https://www.iana.org/domains/root/db/origins.html
origins
-// osaka : 2014-09-04 Osaka Registry Co., Ltd.
+// osaka : Osaka Registry Co., Ltd.
+// https://www.iana.org/domains/root/db/osaka.html
osaka
-// otsuka : 2013-10-11 Otsuka Holdings Co., Ltd.
+// otsuka : Otsuka Holdings Co., Ltd.
+// https://www.iana.org/domains/root/db/otsuka.html
otsuka
-// ott : 2015-06-04 Dish DBS Corporation
+// ott : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/ott.html
ott
-// ovh : 2014-01-16 MédiaBC
+// ovh : MédiaBC
+// https://www.iana.org/domains/root/db/ovh.html
ovh
-// page : 2014-12-04 Charleston Road Registry Inc.
+// page : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/page.html
page
-// panasonic : 2015-07-30 Panasonic Holdings Corporation
+// panasonic : Panasonic Holdings Corporation
+// https://www.iana.org/domains/root/db/panasonic.html
panasonic
-// paris : 2014-01-30 City of Paris
+// paris : City of Paris
+// https://www.iana.org/domains/root/db/paris.html
paris
-// pars : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// pars : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// https://www.iana.org/domains/root/db/pars.html
pars
-// partners : 2013-12-05 Binky Moon, LLC
+// partners : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/partners.html
partners
-// parts : 2013-12-05 Binky Moon, LLC
+// parts : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/parts.html
parts
-// party : 2014-09-11 Blue Sky Registry Limited
+// party : Blue Sky Registry Limited
+// https://www.iana.org/domains/root/db/party.html
party
-// passagens : 2015-03-05 Travel Reservations SRL
-passagens
-
-// pay : 2015-08-27 Amazon Registry Services, Inc.
+// pay : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/pay.html
pay
-// pccw : 2015-05-14 PCCW Enterprises Limited
+// pccw : PCCW Enterprises Limited
+// https://www.iana.org/domains/root/db/pccw.html
pccw
-// pet : 2015-05-07 Identity Digital Limited
+// pet : Identity Digital Limited
+// https://www.iana.org/domains/root/db/pet.html
pet
-// pfizer : 2015-09-11 Pfizer Inc.
+// pfizer : Pfizer Inc.
+// https://www.iana.org/domains/root/db/pfizer.html
pfizer
-// pharmacy : 2014-06-19 National Association of Boards of Pharmacy
+// pharmacy : National Association of Boards of Pharmacy
+// https://www.iana.org/domains/root/db/pharmacy.html
pharmacy
-// phd : 2016-07-28 Charleston Road Registry Inc.
+// phd : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/phd.html
phd
-// philips : 2014-11-07 Koninklijke Philips N.V.
+// philips : Koninklijke Philips N.V.
+// https://www.iana.org/domains/root/db/philips.html
philips
-// phone : 2016-06-02 Dish DBS Corporation
+// phone : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/phone.html
phone
-// photo : 2013-11-14 Registry Services, LLC
+// photo : Registry Services, LLC
+// https://www.iana.org/domains/root/db/photo.html
photo
-// photography : 2013-09-20 Binky Moon, LLC
+// photography : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/photography.html
photography
-// photos : 2013-10-17 Binky Moon, LLC
+// photos : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/photos.html
photos
-// physio : 2014-05-01 PhysBiz Pty Ltd
+// physio : PhysBiz Pty Ltd
+// https://www.iana.org/domains/root/db/physio.html
physio
-// pics : 2013-11-14 XYZ.COM LLC
+// pics : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/pics.html
pics
-// pictet : 2014-06-26 Pictet Europe S.A.
+// pictet : Pictet Europe S.A.
+// https://www.iana.org/domains/root/db/pictet.html
pictet
-// pictures : 2014-03-06 Binky Moon, LLC
+// pictures : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/pictures.html
pictures
-// pid : 2015-01-08 Top Level Spectrum, Inc.
+// pid : Top Level Spectrum, Inc.
+// https://www.iana.org/domains/root/db/pid.html
pid
-// pin : 2014-12-18 Amazon Registry Services, Inc.
+// pin : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/pin.html
pin
-// ping : 2015-06-11 Ping Registry Provider, Inc.
+// ping : Ping Registry Provider, Inc.
+// https://www.iana.org/domains/root/db/ping.html
ping
-// pink : 2013-10-01 Identity Digital Limited
+// pink : Identity Digital Limited
+// https://www.iana.org/domains/root/db/pink.html
pink
-// pioneer : 2015-07-16 Pioneer Corporation
+// pioneer : Pioneer Corporation
+// https://www.iana.org/domains/root/db/pioneer.html
pioneer
-// pizza : 2014-06-26 Binky Moon, LLC
+// pizza : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/pizza.html
pizza
-// place : 2014-04-24 Binky Moon, LLC
+// place : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/place.html
place
-// play : 2015-03-05 Charleston Road Registry Inc.
+// play : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/play.html
play
-// playstation : 2015-07-02 Sony Interactive Entertainment Inc.
+// playstation : Sony Interactive Entertainment Inc.
+// https://www.iana.org/domains/root/db/playstation.html
playstation
-// plumbing : 2013-09-10 Binky Moon, LLC
+// plumbing : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/plumbing.html
plumbing
-// plus : 2015-02-05 Binky Moon, LLC
+// plus : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/plus.html
plus
-// pnc : 2015-07-02 PNC Domain Co., LLC
+// pnc : PNC Domain Co., LLC
+// https://www.iana.org/domains/root/db/pnc.html
pnc
-// pohl : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// pohl : Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// https://www.iana.org/domains/root/db/pohl.html
pohl
-// poker : 2014-07-03 Identity Digital Limited
+// poker : Identity Digital Limited
+// https://www.iana.org/domains/root/db/poker.html
poker
-// politie : 2015-08-20 Politie Nederland
+// politie : Politie Nederland
+// https://www.iana.org/domains/root/db/politie.html
politie
-// porn : 2014-10-16 ICM Registry PN LLC
+// porn : ICM Registry PN LLC
+// https://www.iana.org/domains/root/db/porn.html
porn
-// pramerica : 2015-07-30 Prudential Financial, Inc.
+// pramerica : Prudential Financial, Inc.
+// https://www.iana.org/domains/root/db/pramerica.html
pramerica
-// praxi : 2013-12-05 Praxi S.p.A.
+// praxi : Praxi S.p.A.
+// https://www.iana.org/domains/root/db/praxi.html
praxi
-// press : 2014-04-03 Radix FZC
+// press : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/press.html
press
-// prime : 2015-06-25 Amazon Registry Services, Inc.
+// prime : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/prime.html
prime
-// prod : 2014-01-23 Charleston Road Registry Inc.
+// prod : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/prod.html
prod
-// productions : 2013-12-05 Binky Moon, LLC
+// productions : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/productions.html
productions
-// prof : 2014-07-24 Charleston Road Registry Inc.
+// prof : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/prof.html
prof
-// progressive : 2015-07-23 Progressive Casualty Insurance Company
+// progressive : Progressive Casualty Insurance Company
+// https://www.iana.org/domains/root/db/progressive.html
progressive
-// promo : 2014-12-18 Identity Digital Limited
+// promo : Identity Digital Limited
+// https://www.iana.org/domains/root/db/promo.html
promo
-// properties : 2013-12-05 Binky Moon, LLC
+// properties : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/properties.html
properties
-// property : 2014-05-22 Internet Naming Company LLC
+// property : Digital Property Infrastructure Limited
+// https://www.iana.org/domains/root/db/property.html
property
-// protection : 2015-04-23 XYZ.COM LLC
+// protection : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/protection.html
protection
-// pru : 2015-07-30 Prudential Financial, Inc.
+// pru : Prudential Financial, Inc.
+// https://www.iana.org/domains/root/db/pru.html
pru
-// prudential : 2015-07-30 Prudential Financial, Inc.
+// prudential : Prudential Financial, Inc.
+// https://www.iana.org/domains/root/db/prudential.html
prudential
-// pub : 2013-12-12 Dog Beach, LLC
+// pub : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/pub.html
pub
-// pwc : 2015-10-29 PricewaterhouseCoopers LLP
+// pwc : PricewaterhouseCoopers LLP
+// https://www.iana.org/domains/root/db/pwc.html
pwc
-// qpon : 2013-11-14 dotQPON LLC
+// qpon : dotQPON LLC
+// https://www.iana.org/domains/root/db/qpon.html
qpon
-// quebec : 2013-12-19 PointQuébec Inc
+// quebec : PointQuébec Inc
+// https://www.iana.org/domains/root/db/quebec.html
quebec
-// quest : 2015-03-26 XYZ.COM LLC
+// quest : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/quest.html
quest
-// racing : 2014-12-04 Premier Registry Limited
+// racing : Premier Registry Limited
+// https://www.iana.org/domains/root/db/racing.html
racing
-// radio : 2016-07-21 European Broadcasting Union (EBU)
+// radio : European Broadcasting Union (EBU)
+// https://www.iana.org/domains/root/db/radio.html
radio
-// read : 2014-12-18 Amazon Registry Services, Inc.
+// read : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/read.html
read
-// realestate : 2015-09-11 dotRealEstate LLC
+// realestate : dotRealEstate LLC
+// https://www.iana.org/domains/root/db/realestate.html
realestate
-// realtor : 2014-05-29 Real Estate Domains LLC
+// realtor : Real Estate Domains LLC
+// https://www.iana.org/domains/root/db/realtor.html
realtor
-// realty : 2015-03-19 Dog Beach, LLC
+// realty : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/realty.html
realty
-// recipes : 2013-10-17 Binky Moon, LLC
+// recipes : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/recipes.html
recipes
-// red : 2013-11-07 Identity Digital Limited
+// red : Identity Digital Limited
+// https://www.iana.org/domains/root/db/red.html
red
-// redstone : 2014-10-31 Redstone Haute Couture Co., Ltd.
+// redstone : Redstone Haute Couture Co., Ltd.
+// https://www.iana.org/domains/root/db/redstone.html
redstone
-// redumbrella : 2015-03-26 Travelers TLD, LLC
+// redumbrella : Travelers TLD, LLC
+// https://www.iana.org/domains/root/db/redumbrella.html
redumbrella
-// rehab : 2014-03-06 Dog Beach, LLC
+// rehab : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/rehab.html
rehab
-// reise : 2014-03-13 Binky Moon, LLC
+// reise : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/reise.html
reise
-// reisen : 2014-03-06 Binky Moon, LLC
+// reisen : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/reisen.html
reisen
-// reit : 2014-09-04 National Association of Real Estate Investment Trusts, Inc.
+// reit : National Association of Real Estate Investment Trusts, Inc.
+// https://www.iana.org/domains/root/db/reit.html
reit
-// reliance : 2015-04-02 Reliance Industries Limited
+// reliance : Reliance Industries Limited
+// https://www.iana.org/domains/root/db/reliance.html
reliance
-// ren : 2013-12-12 ZDNS International Limited
+// ren : ZDNS International Limited
+// https://www.iana.org/domains/root/db/ren.html
ren
-// rent : 2014-12-04 XYZ.COM LLC
+// rent : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/rent.html
rent
-// rentals : 2013-12-05 Binky Moon, LLC
+// rentals : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/rentals.html
rentals
-// repair : 2013-11-07 Binky Moon, LLC
+// repair : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/repair.html
repair
-// report : 2013-12-05 Binky Moon, LLC
+// report : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/report.html
report
-// republican : 2014-03-20 Dog Beach, LLC
+// republican : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/republican.html
republican
-// rest : 2013-12-19 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
+// rest : Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
+// https://www.iana.org/domains/root/db/rest.html
rest
-// restaurant : 2014-07-03 Binky Moon, LLC
+// restaurant : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/restaurant.html
restaurant
-// review : 2014-11-20 dot Review Limited
+// review : dot Review Limited
+// https://www.iana.org/domains/root/db/review.html
review
-// reviews : 2013-09-13 Dog Beach, LLC
+// reviews : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/reviews.html
reviews
-// rexroth : 2015-06-18 Robert Bosch GMBH
+// rexroth : Robert Bosch GMBH
+// https://www.iana.org/domains/root/db/rexroth.html
rexroth
-// rich : 2013-11-21 iRegistry GmbH
+// rich : iRegistry GmbH
+// https://www.iana.org/domains/root/db/rich.html
rich
-// richardli : 2015-05-14 Pacific Century Asset Management (HK) Limited
+// richardli : Pacific Century Asset Management (HK) Limited
+// https://www.iana.org/domains/root/db/richardli.html
richardli
-// ricoh : 2014-11-20 Ricoh Company, Ltd.
+// ricoh : Ricoh Company, Ltd.
+// https://www.iana.org/domains/root/db/ricoh.html
ricoh
-// ril : 2015-04-02 Reliance Industries Limited
+// ril : Reliance Industries Limited
+// https://www.iana.org/domains/root/db/ril.html
ril
-// rio : 2014-02-27 Empresa Municipal de Informática SA - IPLANRIO
+// rio : Empresa Municipal de Informática SA - IPLANRIO
+// https://www.iana.org/domains/root/db/rio.html
rio
-// rip : 2014-07-10 Dog Beach, LLC
+// rip : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/rip.html
rip
-// rocher : 2014-12-18 Ferrero Trading Lux S.A.
-rocher
-
-// rocks : 2013-11-14 Dog Beach, LLC
+// rocks : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/rocks.html
rocks
-// rodeo : 2013-12-19 Registry Services, LLC
+// rodeo : Registry Services, LLC
+// https://www.iana.org/domains/root/db/rodeo.html
rodeo
-// rogers : 2015-08-06 Rogers Communications Canada Inc.
+// rogers : Rogers Communications Canada Inc.
+// https://www.iana.org/domains/root/db/rogers.html
rogers
-// room : 2014-12-18 Amazon Registry Services, Inc.
+// room : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/room.html
room
-// rsvp : 2014-05-08 Charleston Road Registry Inc.
+// rsvp : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/rsvp.html
rsvp
-// rugby : 2016-12-15 World Rugby Strategic Developments Limited
+// rugby : World Rugby Strategic Developments Limited
+// https://www.iana.org/domains/root/db/rugby.html
rugby
-// ruhr : 2013-10-02 dotSaarland GmbH
+// ruhr : dotSaarland GmbH
+// https://www.iana.org/domains/root/db/ruhr.html
ruhr
-// run : 2015-03-19 Binky Moon, LLC
+// run : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/run.html
run
-// rwe : 2015-04-02 RWE AG
+// rwe : RWE AG
+// https://www.iana.org/domains/root/db/rwe.html
rwe
-// ryukyu : 2014-01-09 BRregistry, Inc.
+// ryukyu : BRregistry, Inc.
+// https://www.iana.org/domains/root/db/ryukyu.html
ryukyu
-// saarland : 2013-12-12 dotSaarland GmbH
+// saarland : dotSaarland GmbH
+// https://www.iana.org/domains/root/db/saarland.html
saarland
-// safe : 2014-12-18 Amazon Registry Services, Inc.
+// safe : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/safe.html
safe
-// safety : 2015-01-08 Safety Registry Services, LLC.
+// safety : Safety Registry Services, LLC.
+// https://www.iana.org/domains/root/db/safety.html
safety
-// sakura : 2014-12-18 SAKURA Internet Inc.
+// sakura : SAKURA Internet Inc.
+// https://www.iana.org/domains/root/db/sakura.html
sakura
-// sale : 2014-10-16 Dog Beach, LLC
+// sale : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/sale.html
sale
-// salon : 2014-12-11 Binky Moon, LLC
+// salon : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/salon.html
salon
-// samsclub : 2015-07-31 Wal-Mart Stores, Inc.
+// samsclub : Wal-Mart Stores, Inc.
+// https://www.iana.org/domains/root/db/samsclub.html
samsclub
-// samsung : 2014-04-03 SAMSUNG SDS CO., LTD
+// samsung : SAMSUNG SDS CO., LTD
+// https://www.iana.org/domains/root/db/samsung.html
samsung
-// sandvik : 2014-11-13 Sandvik AB
+// sandvik : Sandvik AB
+// https://www.iana.org/domains/root/db/sandvik.html
sandvik
-// sandvikcoromant : 2014-11-07 Sandvik AB
+// sandvikcoromant : Sandvik AB
+// https://www.iana.org/domains/root/db/sandvikcoromant.html
sandvikcoromant
-// sanofi : 2014-10-09 Sanofi
+// sanofi : Sanofi
+// https://www.iana.org/domains/root/db/sanofi.html
sanofi
-// sap : 2014-03-27 SAP AG
+// sap : SAP AG
+// https://www.iana.org/domains/root/db/sap.html
sap
-// sarl : 2014-07-03 Binky Moon, LLC
+// sarl : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/sarl.html
sarl
-// sas : 2015-04-02 Research IP LLC
+// sas : Research IP LLC
+// https://www.iana.org/domains/root/db/sas.html
sas
-// save : 2015-06-25 Amazon Registry Services, Inc.
+// save : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/save.html
save
-// saxo : 2014-10-31 Saxo Bank A/S
+// saxo : Saxo Bank A/S
+// https://www.iana.org/domains/root/db/saxo.html
saxo
-// sbi : 2015-03-12 STATE BANK OF INDIA
+// sbi : STATE BANK OF INDIA
+// https://www.iana.org/domains/root/db/sbi.html
sbi
-// sbs : 2014-11-07 ShortDot SA
+// sbs : ShortDot SA
+// https://www.iana.org/domains/root/db/sbs.html
sbs
-// sca : 2014-03-13 SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ)
+// sca : SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ)
+// https://www.iana.org/domains/root/db/sca.html
sca
-// scb : 2014-02-20 The Siam Commercial Bank Public Company Limited ("SCB")
+// scb : The Siam Commercial Bank Public Company Limited ("SCB")
+// https://www.iana.org/domains/root/db/scb.html
scb
-// schaeffler : 2015-08-06 Schaeffler Technologies AG & Co. KG
+// schaeffler : Schaeffler Technologies AG & Co. KG
+// https://www.iana.org/domains/root/db/schaeffler.html
schaeffler
-// schmidt : 2014-04-03 SCHMIDT GROUPE S.A.S.
+// schmidt : SCHMIDT GROUPE S.A.S.
+// https://www.iana.org/domains/root/db/schmidt.html
schmidt
-// scholarships : 2014-04-24 Scholarships.com, LLC
+// scholarships : Scholarships.com, LLC
+// https://www.iana.org/domains/root/db/scholarships.html
scholarships
-// school : 2014-12-18 Binky Moon, LLC
+// school : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/school.html
school
-// schule : 2014-03-06 Binky Moon, LLC
+// schule : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/schule.html
schule
-// schwarz : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG
+// schwarz : Schwarz Domains und Services GmbH & Co. KG
+// https://www.iana.org/domains/root/db/schwarz.html
schwarz
-// science : 2014-09-11 dot Science Limited
+// science : dot Science Limited
+// https://www.iana.org/domains/root/db/science.html
science
-// scot : 2014-01-23 Dot Scot Registry Limited
+// scot : Dot Scot Registry Limited
+// https://www.iana.org/domains/root/db/scot.html
scot
-// search : 2016-06-09 Charleston Road Registry Inc.
+// search : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/search.html
search
-// seat : 2014-05-22 SEAT, S.A. (Sociedad Unipersonal)
+// seat : SEAT, S.A. (Sociedad Unipersonal)
+// https://www.iana.org/domains/root/db/seat.html
seat
-// secure : 2015-08-27 Amazon Registry Services, Inc.
+// secure : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/secure.html
secure
-// security : 2015-05-14 XYZ.COM LLC
+// security : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/security.html
security
-// seek : 2014-12-04 Seek Limited
+// seek : Seek Limited
+// https://www.iana.org/domains/root/db/seek.html
seek
-// select : 2015-10-08 Registry Services, LLC
+// select : Registry Services, LLC
+// https://www.iana.org/domains/root/db/select.html
select
-// sener : 2014-10-24 Sener Ingeniería y Sistemas, S.A.
+// sener : Sener Ingeniería y Sistemas, S.A.
+// https://www.iana.org/domains/root/db/sener.html
sener
-// services : 2014-02-27 Binky Moon, LLC
+// services : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/services.html
services
-// seven : 2015-08-06 Seven West Media Ltd
+// seven : Seven West Media Ltd
+// https://www.iana.org/domains/root/db/seven.html
seven
-// sew : 2014-07-17 SEW-EURODRIVE GmbH & Co KG
+// sew : SEW-EURODRIVE GmbH & Co KG
+// https://www.iana.org/domains/root/db/sew.html
sew
-// sex : 2014-11-13 ICM Registry SX LLC
+// sex : ICM Registry SX LLC
+// https://www.iana.org/domains/root/db/sex.html
sex
-// sexy : 2013-09-11 Internet Naming Company LLC
+// sexy : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/sexy.html
sexy
-// sfr : 2015-08-13 Societe Francaise du Radiotelephone - SFR
+// sfr : Societe Francaise du Radiotelephone - SFR
+// https://www.iana.org/domains/root/db/sfr.html
sfr
-// shangrila : 2015-09-03 Shangri‐La International Hotel Management Limited
+// shangrila : Shangri‐La International Hotel Management Limited
+// https://www.iana.org/domains/root/db/shangrila.html
shangrila
-// sharp : 2014-05-01 Sharp Corporation
+// sharp : Sharp Corporation
+// https://www.iana.org/domains/root/db/sharp.html
sharp
-// shaw : 2015-04-23 Shaw Cablesystems G.P.
+// shaw : Shaw Cablesystems G.P.
+// https://www.iana.org/domains/root/db/shaw.html
shaw
-// shell : 2015-07-30 Shell Information Technology International Inc
+// shell : Shell Information Technology International Inc
+// https://www.iana.org/domains/root/db/shell.html
shell
-// shia : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// shia : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// https://www.iana.org/domains/root/db/shia.html
shia
-// shiksha : 2013-11-14 Identity Digital Limited
+// shiksha : Identity Digital Limited
+// https://www.iana.org/domains/root/db/shiksha.html
shiksha
-// shoes : 2013-10-02 Binky Moon, LLC
+// shoes : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/shoes.html
shoes
-// shop : 2016-04-08 GMO Registry, Inc.
+// shop : GMO Registry, Inc.
+// https://www.iana.org/domains/root/db/shop.html
shop
-// shopping : 2016-03-31 Binky Moon, LLC
+// shopping : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/shopping.html
shopping
-// shouji : 2015-01-08 Beijing Qihu Keji Co., Ltd.
+// shouji : Beijing Qihu Keji Co., Ltd.
+// https://www.iana.org/domains/root/db/shouji.html
shouji
-// show : 2015-03-05 Binky Moon, LLC
+// show : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/show.html
show
-// showtime : 2015-08-06 CBS Domains Inc.
-showtime
-
-// silk : 2015-06-25 Amazon Registry Services, Inc.
+// silk : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/silk.html
silk
-// sina : 2015-03-12 Sina Corporation
+// sina : Sina Corporation
+// https://www.iana.org/domains/root/db/sina.html
sina
-// singles : 2013-08-27 Binky Moon, LLC
+// singles : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/singles.html
singles
-// site : 2015-01-15 Radix FZC
+// site : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/site.html
site
-// ski : 2015-04-09 Identity Digital Limited
+// ski : Identity Digital Limited
+// https://www.iana.org/domains/root/db/ski.html
ski
-// skin : 2015-01-15 XYZ.COM LLC
+// skin : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/skin.html
skin
-// sky : 2014-06-19 Sky International AG
+// sky : Sky International AG
+// https://www.iana.org/domains/root/db/sky.html
sky
-// skype : 2014-12-18 Microsoft Corporation
+// skype : Microsoft Corporation
+// https://www.iana.org/domains/root/db/skype.html
skype
-// sling : 2015-07-30 DISH Technologies L.L.C.
+// sling : DISH Technologies L.L.C.
+// https://www.iana.org/domains/root/db/sling.html
sling
-// smart : 2015-07-09 Smart Communications, Inc. (SMART)
+// smart : Smart Communications, Inc. (SMART)
+// https://www.iana.org/domains/root/db/smart.html
smart
-// smile : 2014-12-18 Amazon Registry Services, Inc.
+// smile : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/smile.html
smile
-// sncf : 2015-02-19 Société Nationale SNCF
+// sncf : Société Nationale SNCF
+// https://www.iana.org/domains/root/db/sncf.html
sncf
-// soccer : 2015-03-26 Binky Moon, LLC
+// soccer : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/soccer.html
soccer
-// social : 2013-11-07 Dog Beach, LLC
+// social : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/social.html
social
-// softbank : 2015-07-02 SoftBank Group Corp.
+// softbank : SoftBank Group Corp.
+// https://www.iana.org/domains/root/db/softbank.html
softbank
-// software : 2014-03-20 Dog Beach, LLC
+// software : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/software.html
software
-// sohu : 2013-12-19 Sohu.com Limited
+// sohu : Sohu.com Limited
+// https://www.iana.org/domains/root/db/sohu.html
sohu
-// solar : 2013-11-07 Binky Moon, LLC
+// solar : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/solar.html
solar
-// solutions : 2013-11-07 Binky Moon, LLC
+// solutions : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/solutions.html
solutions
-// song : 2015-02-26 Amazon Registry Services, Inc.
+// song : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/song.html
song
-// sony : 2015-01-08 Sony Corporation
+// sony : Sony Corporation
+// https://www.iana.org/domains/root/db/sony.html
sony
-// soy : 2014-01-23 Charleston Road Registry Inc.
+// soy : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/soy.html
soy
-// spa : 2019-09-19 Asia Spa and Wellness Promotion Council Limited
+// spa : Asia Spa and Wellness Promotion Council Limited
+// https://www.iana.org/domains/root/db/spa.html
spa
-// space : 2014-04-03 Radix FZC
+// space : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/space.html
space
-// sport : 2017-11-16 Global Association of International Sports Federations (GAISF)
+// sport : SportAccord
+// https://www.iana.org/domains/root/db/sport.html
sport
-// spot : 2015-02-26 Amazon Registry Services, Inc.
+// spot : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/spot.html
spot
-// srl : 2015-05-07 InterNetX, Corp
+// srl : InterNetX, Corp
+// https://www.iana.org/domains/root/db/srl.html
srl
-// stada : 2014-11-13 STADA Arzneimittel AG
+// stada : STADA Arzneimittel AG
+// https://www.iana.org/domains/root/db/stada.html
stada
-// staples : 2015-07-30 Staples, Inc.
+// staples : Staples, Inc.
+// https://www.iana.org/domains/root/db/staples.html
staples
-// star : 2015-01-08 Star India Private Limited
+// star : Star India Private Limited
+// https://www.iana.org/domains/root/db/star.html
star
-// statebank : 2015-03-12 STATE BANK OF INDIA
+// statebank : STATE BANK OF INDIA
+// https://www.iana.org/domains/root/db/statebank.html
statebank
-// statefarm : 2015-07-30 State Farm Mutual Automobile Insurance Company
+// statefarm : State Farm Mutual Automobile Insurance Company
+// https://www.iana.org/domains/root/db/statefarm.html
statefarm
-// stc : 2014-10-09 Saudi Telecom Company
+// stc : Saudi Telecom Company
+// https://www.iana.org/domains/root/db/stc.html
stc
-// stcgroup : 2014-10-09 Saudi Telecom Company
+// stcgroup : Saudi Telecom Company
+// https://www.iana.org/domains/root/db/stcgroup.html
stcgroup
-// stockholm : 2014-12-18 Stockholms kommun
+// stockholm : Stockholms kommun
+// https://www.iana.org/domains/root/db/stockholm.html
stockholm
-// storage : 2014-12-22 XYZ.COM LLC
+// storage : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/storage.html
storage
-// store : 2015-04-09 Radix FZC
+// store : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/store.html
store
-// stream : 2016-01-08 dot Stream Limited
+// stream : dot Stream Limited
+// https://www.iana.org/domains/root/db/stream.html
stream
-// studio : 2015-02-11 Dog Beach, LLC
+// studio : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/studio.html
studio
-// study : 2014-12-11 Registry Services, LLC
+// study : Registry Services, LLC
+// https://www.iana.org/domains/root/db/study.html
study
-// style : 2014-12-04 Binky Moon, LLC
+// style : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/style.html
style
-// sucks : 2014-12-22 Vox Populi Registry Ltd.
+// sucks : Vox Populi Registry Ltd.
+// https://www.iana.org/domains/root/db/sucks.html
sucks
-// supplies : 2013-12-19 Binky Moon, LLC
+// supplies : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/supplies.html
supplies
-// supply : 2013-12-19 Binky Moon, LLC
+// supply : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/supply.html
supply
-// support : 2013-10-24 Binky Moon, LLC
+// support : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/support.html
support
-// surf : 2014-01-09 Registry Services, LLC
+// surf : Registry Services, LLC
+// https://www.iana.org/domains/root/db/surf.html
surf
-// surgery : 2014-03-20 Binky Moon, LLC
+// surgery : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/surgery.html
surgery
-// suzuki : 2014-02-20 SUZUKI MOTOR CORPORATION
+// suzuki : SUZUKI MOTOR CORPORATION
+// https://www.iana.org/domains/root/db/suzuki.html
suzuki
-// swatch : 2015-01-08 The Swatch Group Ltd
+// swatch : The Swatch Group Ltd
+// https://www.iana.org/domains/root/db/swatch.html
swatch
-// swiss : 2014-10-16 Swiss Confederation
+// swiss : Swiss Confederation
+// https://www.iana.org/domains/root/db/swiss.html
swiss
-// sydney : 2014-09-18 State of New South Wales, Department of Premier and Cabinet
+// sydney : State of New South Wales, Department of Premier and Cabinet
+// https://www.iana.org/domains/root/db/sydney.html
sydney
-// systems : 2013-11-07 Binky Moon, LLC
+// systems : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/systems.html
systems
-// tab : 2014-12-04 Tabcorp Holdings Limited
+// tab : Tabcorp Holdings Limited
+// https://www.iana.org/domains/root/db/tab.html
tab
-// taipei : 2014-07-10 Taipei City Government
+// taipei : Taipei City Government
+// https://www.iana.org/domains/root/db/taipei.html
taipei
-// talk : 2015-04-09 Amazon Registry Services, Inc.
+// talk : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/talk.html
talk
-// taobao : 2015-01-15 Alibaba Group Holding Limited
+// taobao : Alibaba Group Holding Limited
+// https://www.iana.org/domains/root/db/taobao.html
taobao
-// target : 2015-07-31 Target Domain Holdings, LLC
+// target : Target Domain Holdings, LLC
+// https://www.iana.org/domains/root/db/target.html
target
-// tatamotors : 2015-03-12 Tata Motors Ltd
+// tatamotors : Tata Motors Ltd
+// https://www.iana.org/domains/root/db/tatamotors.html
tatamotors
-// tatar : 2014-04-24 Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic"
+// tatar : Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic"
+// https://www.iana.org/domains/root/db/tatar.html
tatar
-// tattoo : 2013-08-30 Top Level Design, LLC
+// tattoo : Registry Services, LLC
+// https://www.iana.org/domains/root/db/tattoo.html
tattoo
-// tax : 2014-03-20 Binky Moon, LLC
+// tax : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tax.html
tax
-// taxi : 2015-03-19 Binky Moon, LLC
+// taxi : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/taxi.html
taxi
-// tci : 2014-09-12 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// tci : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// https://www.iana.org/domains/root/db/tci.html
tci
-// tdk : 2015-06-11 TDK Corporation
+// tdk : TDK Corporation
+// https://www.iana.org/domains/root/db/tdk.html
tdk
-// team : 2015-03-05 Binky Moon, LLC
+// team : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/team.html
team
-// tech : 2015-01-30 Radix FZC
+// tech : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/tech.html
tech
-// technology : 2013-09-13 Binky Moon, LLC
+// technology : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/technology.html
technology
-// temasek : 2014-08-07 Temasek Holdings (Private) Limited
+// temasek : Temasek Holdings (Private) Limited
+// https://www.iana.org/domains/root/db/temasek.html
temasek
-// tennis : 2014-12-04 Binky Moon, LLC
+// tennis : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tennis.html
tennis
-// teva : 2015-07-02 Teva Pharmaceutical Industries Limited
+// teva : Teva Pharmaceutical Industries Limited
+// https://www.iana.org/domains/root/db/teva.html
teva
-// thd : 2015-04-02 Home Depot Product Authority, LLC
+// thd : Home Depot Product Authority, LLC
+// https://www.iana.org/domains/root/db/thd.html
thd
-// theater : 2015-03-19 Binky Moon, LLC
+// theater : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/theater.html
theater
-// theatre : 2015-05-07 XYZ.COM LLC
+// theatre : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/theatre.html
theatre
-// tiaa : 2015-07-23 Teachers Insurance and Annuity Association of America
+// tiaa : Teachers Insurance and Annuity Association of America
+// https://www.iana.org/domains/root/db/tiaa.html
tiaa
-// tickets : 2015-02-05 XYZ.COM LLC
+// tickets : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/tickets.html
tickets
-// tienda : 2013-11-14 Binky Moon, LLC
+// tienda : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tienda.html
tienda
-// tiffany : 2015-01-30 Tiffany and Company
-tiffany
-
-// tips : 2013-09-20 Binky Moon, LLC
+// tips : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tips.html
tips
-// tires : 2014-11-07 Binky Moon, LLC
+// tires : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tires.html
tires
-// tirol : 2014-04-24 punkt Tirol GmbH
+// tirol : punkt Tirol GmbH
+// https://www.iana.org/domains/root/db/tirol.html
tirol
-// tjmaxx : 2015-07-16 The TJX Companies, Inc.
+// tjmaxx : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/tjmaxx.html
tjmaxx
-// tjx : 2015-07-16 The TJX Companies, Inc.
+// tjx : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/tjx.html
tjx
-// tkmaxx : 2015-07-16 The TJX Companies, Inc.
+// tkmaxx : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/tkmaxx.html
tkmaxx
-// tmall : 2015-01-15 Alibaba Group Holding Limited
+// tmall : Alibaba Group Holding Limited
+// https://www.iana.org/domains/root/db/tmall.html
tmall
-// today : 2013-09-20 Binky Moon, LLC
+// today : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/today.html
today
-// tokyo : 2013-11-13 GMO Registry, Inc.
+// tokyo : GMO Registry, Inc.
+// https://www.iana.org/domains/root/db/tokyo.html
tokyo
-// tools : 2013-11-21 Binky Moon, LLC
+// tools : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tools.html
tools
-// top : 2014-03-20 .TOP Registry
+// top : .TOP Registry
+// https://www.iana.org/domains/root/db/top.html
top
-// toray : 2014-12-18 Toray Industries, Inc.
+// toray : Toray Industries, Inc.
+// https://www.iana.org/domains/root/db/toray.html
toray
-// toshiba : 2014-04-10 TOSHIBA Corporation
+// toshiba : TOSHIBA Corporation
+// https://www.iana.org/domains/root/db/toshiba.html
toshiba
-// total : 2015-08-06 TotalEnergies SE
+// total : TotalEnergies SE
+// https://www.iana.org/domains/root/db/total.html
total
-// tours : 2015-01-22 Binky Moon, LLC
+// tours : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tours.html
tours
-// town : 2014-03-06 Binky Moon, LLC
+// town : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/town.html
town
-// toyota : 2015-04-23 TOYOTA MOTOR CORPORATION
+// toyota : TOYOTA MOTOR CORPORATION
+// https://www.iana.org/domains/root/db/toyota.html
toyota
-// toys : 2014-03-06 Binky Moon, LLC
+// toys : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/toys.html
toys
-// trade : 2014-01-23 Elite Registry Limited
+// trade : Elite Registry Limited
+// https://www.iana.org/domains/root/db/trade.html
trade
-// trading : 2014-12-11 Dog Beach, LLC
+// trading : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/trading.html
trading
-// training : 2013-11-07 Binky Moon, LLC
+// training : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/training.html
training
-// travel : 2015-10-09 Dog Beach, LLC
+// travel : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/travel.html
travel
-// travelchannel : 2015-07-02 Lifestyle Domain Holdings, Inc.
-travelchannel
-
-// travelers : 2015-03-26 Travelers TLD, LLC
+// travelers : Travelers TLD, LLC
+// https://www.iana.org/domains/root/db/travelers.html
travelers
-// travelersinsurance : 2015-03-26 Travelers TLD, LLC
+// travelersinsurance : Travelers TLD, LLC
+// https://www.iana.org/domains/root/db/travelersinsurance.html
travelersinsurance
-// trust : 2014-10-16 Internet Naming Company LLC
+// trust : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/trust.html
trust
-// trv : 2015-03-26 Travelers TLD, LLC
+// trv : Travelers TLD, LLC
+// https://www.iana.org/domains/root/db/trv.html
trv
-// tube : 2015-06-11 Latin American Telecom LLC
+// tube : Latin American Telecom LLC
+// https://www.iana.org/domains/root/db/tube.html
tube
-// tui : 2014-07-03 TUI AG
+// tui : TUI AG
+// https://www.iana.org/domains/root/db/tui.html
tui
-// tunes : 2015-02-26 Amazon Registry Services, Inc.
+// tunes : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/tunes.html
tunes
-// tushu : 2014-12-18 Amazon Registry Services, Inc.
+// tushu : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/tushu.html
tushu
-// tvs : 2015-02-19 T V SUNDRAM IYENGAR & SONS LIMITED
+// tvs : T V SUNDRAM IYENGAR & SONS LIMITED
+// https://www.iana.org/domains/root/db/tvs.html
tvs
-// ubank : 2015-08-20 National Australia Bank Limited
+// ubank : National Australia Bank Limited
+// https://www.iana.org/domains/root/db/ubank.html
ubank
-// ubs : 2014-12-11 UBS AG
+// ubs : UBS AG
+// https://www.iana.org/domains/root/db/ubs.html
ubs
-// unicom : 2015-10-15 China United Network Communications Corporation Limited
+// unicom : China United Network Communications Corporation Limited
+// https://www.iana.org/domains/root/db/unicom.html
unicom
-// university : 2014-03-06 Binky Moon, LLC
+// university : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/university.html
university
-// uno : 2013-09-11 Radix FZC
+// uno : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/uno.html
uno
-// uol : 2014-05-01 UBN INTERNET LTDA.
+// uol : UBN INTERNET LTDA.
+// https://www.iana.org/domains/root/db/uol.html
uol
-// ups : 2015-06-25 UPS Market Driver, Inc.
+// ups : UPS Market Driver, Inc.
+// https://www.iana.org/domains/root/db/ups.html
ups
-// vacations : 2013-12-05 Binky Moon, LLC
+// vacations : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/vacations.html
vacations
-// vana : 2014-12-11 Lifestyle Domain Holdings, Inc.
+// vana : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/vana.html
vana
-// vanguard : 2015-09-03 The Vanguard Group, Inc.
+// vanguard : The Vanguard Group, Inc.
+// https://www.iana.org/domains/root/db/vanguard.html
vanguard
-// vegas : 2014-01-16 Dot Vegas, Inc.
+// vegas : Dot Vegas, Inc.
+// https://www.iana.org/domains/root/db/vegas.html
vegas
-// ventures : 2013-08-27 Binky Moon, LLC
+// ventures : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/ventures.html
ventures
-// verisign : 2015-08-13 VeriSign, Inc.
+// verisign : VeriSign, Inc.
+// https://www.iana.org/domains/root/db/verisign.html
verisign
-// versicherung : 2014-03-20 tldbox GmbH
+// versicherung : tldbox GmbH
+// https://www.iana.org/domains/root/db/versicherung.html
versicherung
-// vet : 2014-03-06 Dog Beach, LLC
+// vet : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/vet.html
vet
-// viajes : 2013-10-17 Binky Moon, LLC
+// viajes : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/viajes.html
viajes
-// video : 2014-10-16 Dog Beach, LLC
+// video : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/video.html
video
-// vig : 2015-05-14 VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe
+// vig : VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe
+// https://www.iana.org/domains/root/db/vig.html
vig
-// viking : 2015-04-02 Viking River Cruises (Bermuda) Ltd.
+// viking : Viking River Cruises (Bermuda) Ltd.
+// https://www.iana.org/domains/root/db/viking.html
viking
-// villas : 2013-12-05 Binky Moon, LLC
+// villas : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/villas.html
villas
-// vin : 2015-06-18 Binky Moon, LLC
+// vin : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/vin.html
vin
-// vip : 2015-01-22 Registry Services, LLC
+// vip : Registry Services, LLC
+// https://www.iana.org/domains/root/db/vip.html
vip
-// virgin : 2014-09-25 Virgin Enterprises Limited
+// virgin : Virgin Enterprises Limited
+// https://www.iana.org/domains/root/db/virgin.html
virgin
-// visa : 2015-07-30 Visa Worldwide Pte. Limited
+// visa : Visa Worldwide Pte. Limited
+// https://www.iana.org/domains/root/db/visa.html
visa
-// vision : 2013-12-05 Binky Moon, LLC
+// vision : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/vision.html
vision
-// viva : 2014-11-07 Saudi Telecom Company
+// viva : Saudi Telecom Company
+// https://www.iana.org/domains/root/db/viva.html
viva
-// vivo : 2015-07-31 Telefonica Brasil S.A.
+// vivo : Telefonica Brasil S.A.
+// https://www.iana.org/domains/root/db/vivo.html
vivo
-// vlaanderen : 2014-02-06 DNS.be vzw
+// vlaanderen : DNS.be vzw
+// https://www.iana.org/domains/root/db/vlaanderen.html
vlaanderen
-// vodka : 2013-12-19 Registry Services, LLC
+// vodka : Registry Services, LLC
+// https://www.iana.org/domains/root/db/vodka.html
vodka
-// volkswagen : 2015-05-14 Volkswagen Group of America Inc.
+// volkswagen : Volkswagen Group of America Inc.
+// https://www.iana.org/domains/root/db/volkswagen.html
volkswagen
-// volvo : 2015-11-12 Volvo Holding Sverige Aktiebolag
+// volvo : Volvo Holding Sverige Aktiebolag
+// https://www.iana.org/domains/root/db/volvo.html
volvo
-// vote : 2013-11-21 Monolith Registry LLC
+// vote : Monolith Registry LLC
+// https://www.iana.org/domains/root/db/vote.html
vote
-// voting : 2013-11-13 Valuetainment Corp.
+// voting : Valuetainment Corp.
+// https://www.iana.org/domains/root/db/voting.html
voting
-// voto : 2013-11-21 Monolith Registry LLC
+// voto : Monolith Registry LLC
+// https://www.iana.org/domains/root/db/voto.html
voto
-// voyage : 2013-08-27 Binky Moon, LLC
+// voyage : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/voyage.html
voyage
-// vuelos : 2015-03-05 Travel Reservations SRL
-vuelos
-
-// wales : 2014-05-08 Nominet UK
+// wales : Nominet UK
+// https://www.iana.org/domains/root/db/wales.html
wales
-// walmart : 2015-07-31 Wal-Mart Stores, Inc.
+// walmart : Wal-Mart Stores, Inc.
+// https://www.iana.org/domains/root/db/walmart.html
walmart
-// walter : 2014-11-13 Sandvik AB
+// walter : Sandvik AB
+// https://www.iana.org/domains/root/db/walter.html
walter
-// wang : 2013-10-24 Zodiac Wang Limited
+// wang : Zodiac Wang Limited
+// https://www.iana.org/domains/root/db/wang.html
wang
-// wanggou : 2014-12-18 Amazon Registry Services, Inc.
+// wanggou : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/wanggou.html
wanggou
-// watch : 2013-11-14 Binky Moon, LLC
+// watch : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/watch.html
watch
-// watches : 2014-12-22 Identity Digital Limited
+// watches : Identity Digital Limited
+// https://www.iana.org/domains/root/db/watches.html
watches
-// weather : 2015-01-08 International Business Machines Corporation
+// weather : International Business Machines Corporation
+// https://www.iana.org/domains/root/db/weather.html
weather
-// weatherchannel : 2015-03-12 International Business Machines Corporation
+// weatherchannel : International Business Machines Corporation
+// https://www.iana.org/domains/root/db/weatherchannel.html
weatherchannel
-// webcam : 2014-01-23 dot Webcam Limited
+// webcam : dot Webcam Limited
+// https://www.iana.org/domains/root/db/webcam.html
webcam
-// weber : 2015-06-04 Saint-Gobain Weber SA
+// weber : Saint-Gobain Weber SA
+// https://www.iana.org/domains/root/db/weber.html
weber
-// website : 2014-04-03 Radix FZC
+// website : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/website.html
website
-// wedding : 2014-04-24 Registry Services, LLC
+// wedding : Registry Services, LLC
+// https://www.iana.org/domains/root/db/wedding.html
wedding
-// weibo : 2015-03-05 Sina Corporation
+// weibo : Sina Corporation
+// https://www.iana.org/domains/root/db/weibo.html
weibo
-// weir : 2015-01-29 Weir Group IP Limited
+// weir : Weir Group IP Limited
+// https://www.iana.org/domains/root/db/weir.html
weir
-// whoswho : 2014-02-20 Who's Who Registry
+// whoswho : Who's Who Registry
+// https://www.iana.org/domains/root/db/whoswho.html
whoswho
-// wien : 2013-10-28 punkt.wien GmbH
+// wien : punkt.wien GmbH
+// https://www.iana.org/domains/root/db/wien.html
wien
-// wiki : 2013-11-07 Top Level Design, LLC
+// wiki : Registry Services, LLC
+// https://www.iana.org/domains/root/db/wiki.html
wiki
-// williamhill : 2014-03-13 William Hill Organization Limited
+// williamhill : William Hill Organization Limited
+// https://www.iana.org/domains/root/db/williamhill.html
williamhill
-// win : 2014-11-20 First Registry Limited
+// win : First Registry Limited
+// https://www.iana.org/domains/root/db/win.html
win
-// windows : 2014-12-18 Microsoft Corporation
+// windows : Microsoft Corporation
+// https://www.iana.org/domains/root/db/windows.html
windows
-// wine : 2015-06-18 Binky Moon, LLC
+// wine : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/wine.html
wine
-// winners : 2015-07-16 The TJX Companies, Inc.
+// winners : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/winners.html
winners
-// wme : 2014-02-13 William Morris Endeavor Entertainment, LLC
+// wme : William Morris Endeavor Entertainment, LLC
+// https://www.iana.org/domains/root/db/wme.html
wme
-// wolterskluwer : 2015-08-06 Wolters Kluwer N.V.
+// wolterskluwer : Wolters Kluwer N.V.
+// https://www.iana.org/domains/root/db/wolterskluwer.html
wolterskluwer
-// woodside : 2015-07-09 Woodside Petroleum Limited
+// woodside : Woodside Petroleum Limited
+// https://www.iana.org/domains/root/db/woodside.html
woodside
-// work : 2013-12-19 Registry Services, LLC
+// work : Registry Services, LLC
+// https://www.iana.org/domains/root/db/work.html
work
-// works : 2013-11-14 Binky Moon, LLC
+// works : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/works.html
works
-// world : 2014-06-12 Binky Moon, LLC
+// world : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/world.html
world
-// wow : 2015-10-08 Amazon Registry Services, Inc.
+// wow : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/wow.html
wow
-// wtc : 2013-12-19 World Trade Centers Association, Inc.
+// wtc : World Trade Centers Association, Inc.
+// https://www.iana.org/domains/root/db/wtc.html
wtc
-// wtf : 2014-03-06 Binky Moon, LLC
+// wtf : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/wtf.html
wtf
-// xbox : 2014-12-18 Microsoft Corporation
+// xbox : Microsoft Corporation
+// https://www.iana.org/domains/root/db/xbox.html
xbox
-// xerox : 2014-10-24 Xerox DNHC LLC
+// xerox : Xerox DNHC LLC
+// https://www.iana.org/domains/root/db/xerox.html
xerox
-// xfinity : 2015-07-09 Comcast IP Holdings I, LLC
+// xfinity : Comcast IP Holdings I, LLC
+// https://www.iana.org/domains/root/db/xfinity.html
xfinity
-// xihuan : 2015-01-08 Beijing Qihu Keji Co., Ltd.
+// xihuan : Beijing Qihu Keji Co., Ltd.
+// https://www.iana.org/domains/root/db/xihuan.html
xihuan
-// xin : 2014-12-11 Elegant Leader Limited
+// xin : Elegant Leader Limited
+// https://www.iana.org/domains/root/db/xin.html
xin
-// xn--11b4c3d : 2015-01-15 VeriSign Sarl
+// xn--11b4c3d : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--11b4c3d.html
कॉम
-// xn--1ck2e1b : 2015-02-26 Amazon Registry Services, Inc.
+// xn--1ck2e1b : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--1ck2e1b.html
セール
-// xn--1qqw23a : 2014-01-09 Guangzhou YU Wei Information Technology Co., Ltd.
+// xn--1qqw23a : Guangzhou YU Wei Information Technology Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--1qqw23a.html
佛山
-// xn--30rr7y : 2014-06-12 Excellent First Limited
+// xn--30rr7y : Excellent First Limited
+// https://www.iana.org/domains/root/db/xn--30rr7y.html
慈善
-// xn--3bst00m : 2013-09-13 Eagle Horizon Limited
+// xn--3bst00m : Eagle Horizon Limited
+// https://www.iana.org/domains/root/db/xn--3bst00m.html
集团
-// xn--3ds443g : 2013-09-08 TLD REGISTRY LIMITED OY
+// xn--3ds443g : TLD REGISTRY LIMITED OY
+// https://www.iana.org/domains/root/db/xn--3ds443g.html
在线
-// xn--3pxu8k : 2015-01-15 VeriSign Sarl
+// xn--3pxu8k : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--3pxu8k.html
点看
-// xn--42c2d9a : 2015-01-15 VeriSign Sarl
+// xn--42c2d9a : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--42c2d9a.html
คอม
-// xn--45q11c : 2013-11-21 Zodiac Gemini Ltd
+// xn--45q11c : Zodiac Gemini Ltd
+// https://www.iana.org/domains/root/db/xn--45q11c.html
八卦
-// xn--4gbrim : 2013-10-04 Helium TLDs Ltd
+// xn--4gbrim : Helium TLDs Ltd
+// https://www.iana.org/domains/root/db/xn--4gbrim.html
موقع
-// xn--55qw42g : 2013-11-08 China Organizational Name Administration Center
+// xn--55qw42g : China Organizational Name Administration Center
+// https://www.iana.org/domains/root/db/xn--55qw42g.html
公益
-// xn--55qx5d : 2013-11-14 China Internet Network Information Center (CNNIC)
+// xn--55qx5d : China Internet Network Information Center (CNNIC)
+// https://www.iana.org/domains/root/db/xn--55qx5d.html
公司
-// xn--5su34j936bgsg : 2015-09-03 Shangri‐La International Hotel Management Limited
+// xn--5su34j936bgsg : Shangri‐La International Hotel Management Limited
+// https://www.iana.org/domains/root/db/xn--5su34j936bgsg.html
香格里拉
-// xn--5tzm5g : 2014-12-22 Global Website TLD Asia Limited
+// xn--5tzm5g : Global Website TLD Asia Limited
+// https://www.iana.org/domains/root/db/xn--5tzm5g.html
网站
-// xn--6frz82g : 2013-09-23 Identity Digital Limited
+// xn--6frz82g : Identity Digital Limited
+// https://www.iana.org/domains/root/db/xn--6frz82g.html
移动
-// xn--6qq986b3xl : 2013-09-13 Tycoon Treasure Limited
+// xn--6qq986b3xl : Tycoon Treasure Limited
+// https://www.iana.org/domains/root/db/xn--6qq986b3xl.html
我爱你
-// xn--80adxhks : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
+// xn--80adxhks : Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
+// https://www.iana.org/domains/root/db/xn--80adxhks.html
москва
-// xn--80aqecdr1a : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+// xn--80aqecdr1a : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+// https://www.iana.org/domains/root/db/xn--80aqecdr1a.html
католик
-// xn--80asehdb : 2013-07-14 CORE Association
+// xn--80asehdb : CORE Association
+// https://www.iana.org/domains/root/db/xn--80asehdb.html
онлайн
-// xn--80aswg : 2013-07-14 CORE Association
+// xn--80aswg : CORE Association
+// https://www.iana.org/domains/root/db/xn--80aswg.html
сайт
-// xn--8y0a063a : 2015-03-26 China United Network Communications Corporation Limited
+// xn--8y0a063a : China United Network Communications Corporation Limited
+// https://www.iana.org/domains/root/db/xn--8y0a063a.html
联通
-// xn--9dbq2a : 2015-01-15 VeriSign Sarl
+// xn--9dbq2a : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--9dbq2a.html
קום
-// xn--9et52u : 2014-06-12 RISE VICTORY LIMITED
+// xn--9et52u : RISE VICTORY LIMITED
+// https://www.iana.org/domains/root/db/xn--9et52u.html
时尚
-// xn--9krt00a : 2015-03-12 Sina Corporation
+// xn--9krt00a : Sina Corporation
+// https://www.iana.org/domains/root/db/xn--9krt00a.html
微博
-// xn--b4w605ferd : 2014-08-07 Temasek Holdings (Private) Limited
+// xn--b4w605ferd : Temasek Holdings (Private) Limited
+// https://www.iana.org/domains/root/db/xn--b4w605ferd.html
淡马锡
-// xn--bck1b9a5dre4c : 2015-02-26 Amazon Registry Services, Inc.
+// xn--bck1b9a5dre4c : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--bck1b9a5dre4c.html
ファッション
-// xn--c1avg : 2013-11-14 Public Interest Registry
+// xn--c1avg : Public Interest Registry
+// https://www.iana.org/domains/root/db/xn--c1avg.html
орг
-// xn--c2br7g : 2015-01-15 VeriSign Sarl
+// xn--c2br7g : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--c2br7g.html
नेट
-// xn--cck2b3b : 2015-02-26 Amazon Registry Services, Inc.
+// xn--cck2b3b : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--cck2b3b.html
ストア
-// xn--cckwcxetd : 2019-12-19 Amazon Registry Services, Inc.
+// xn--cckwcxetd : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--cckwcxetd.html
アマゾン
-// xn--cg4bki : 2013-09-27 SAMSUNG SDS CO., LTD
+// xn--cg4bki : SAMSUNG SDS CO., LTD
+// https://www.iana.org/domains/root/db/xn--cg4bki.html
삼성
-// xn--czr694b : 2014-01-16 Internet DotTrademark Organisation Limited
+// xn--czr694b : Internet DotTrademark Organisation Limited
+// https://www.iana.org/domains/root/db/xn--czr694b.html
商标
-// xn--czrs0t : 2013-12-19 Binky Moon, LLC
+// xn--czrs0t : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/xn--czrs0t.html
商店
-// xn--czru2d : 2013-11-21 Zodiac Aquarius Limited
+// xn--czru2d : Zodiac Aquarius Limited
+// https://www.iana.org/domains/root/db/xn--czru2d.html
商城
-// xn--d1acj3b : 2013-11-20 The Foundation for Network Initiatives “The Smart Internet”
+// xn--d1acj3b : The Foundation for Network Initiatives “The Smart Internet”
+// https://www.iana.org/domains/root/db/xn--d1acj3b.html
дети
-// xn--eckvdtc9d : 2014-12-18 Amazon Registry Services, Inc.
+// xn--eckvdtc9d : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--eckvdtc9d.html
ポイント
-// xn--efvy88h : 2014-08-22 Guangzhou YU Wei Information Technology Co., Ltd.
+// xn--efvy88h : Guangzhou YU Wei Information Technology Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--efvy88h.html
新闻
-// xn--fct429k : 2015-04-09 Amazon Registry Services, Inc.
+// xn--fct429k : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--fct429k.html
家電
-// xn--fhbei : 2015-01-15 VeriSign Sarl
+// xn--fhbei : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--fhbei.html
كوم
-// xn--fiq228c5hs : 2013-09-08 TLD REGISTRY LIMITED OY
+// xn--fiq228c5hs : TLD REGISTRY LIMITED OY
+// https://www.iana.org/domains/root/db/xn--fiq228c5hs.html
中文网
-// xn--fiq64b : 2013-10-14 CITIC Group Corporation
+// xn--fiq64b : CITIC Group Corporation
+// https://www.iana.org/domains/root/db/xn--fiq64b.html
中信
-// xn--fjq720a : 2014-05-22 Binky Moon, LLC
+// xn--fjq720a : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/xn--fjq720a.html
娱乐
-// xn--flw351e : 2014-07-31 Charleston Road Registry Inc.
+// xn--flw351e : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/xn--flw351e.html
谷歌
-// xn--fzys8d69uvgm : 2015-05-14 PCCW Enterprises Limited
+// xn--fzys8d69uvgm : PCCW Enterprises Limited
+// https://www.iana.org/domains/root/db/xn--fzys8d69uvgm.html
電訊盈科
-// xn--g2xx48c : 2015-01-30 Nawang Heli(Xiamen) Network Service Co., LTD.
+// xn--g2xx48c : Nawang Heli(Xiamen) Network Service Co., LTD.
+// https://www.iana.org/domains/root/db/xn--g2xx48c.html
购物
-// xn--gckr3f0f : 2015-02-26 Amazon Registry Services, Inc.
+// xn--gckr3f0f : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--gckr3f0f.html
クラウド
-// xn--gk3at1e : 2015-10-08 Amazon Registry Services, Inc.
+// xn--gk3at1e : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--gk3at1e.html
通販
-// xn--hxt814e : 2014-05-15 Zodiac Taurus Limited
+// xn--hxt814e : Zodiac Taurus Limited
+// https://www.iana.org/domains/root/db/xn--hxt814e.html
网店
-// xn--i1b6b1a6a2e : 2013-11-14 Public Interest Registry
+// xn--i1b6b1a6a2e : Public Interest Registry
+// https://www.iana.org/domains/root/db/xn--i1b6b1a6a2e.html
संगठन
-// xn--imr513n : 2014-12-11 Internet DotTrademark Organisation Limited
+// xn--imr513n : Internet DotTrademark Organisation Limited
+// https://www.iana.org/domains/root/db/xn--imr513n.html
餐厅
-// xn--io0a7i : 2013-11-14 China Internet Network Information Center (CNNIC)
+// xn--io0a7i : China Internet Network Information Center (CNNIC)
+// https://www.iana.org/domains/root/db/xn--io0a7i.html
网络
-// xn--j1aef : 2015-01-15 VeriSign Sarl
+// xn--j1aef : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--j1aef.html
ком
-// xn--jlq480n2rg : 2019-12-19 Amazon Registry Services, Inc.
+// xn--jlq480n2rg : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--jlq480n2rg.html
亚马逊
-// xn--jvr189m : 2015-02-26 Amazon Registry Services, Inc.
+// xn--jvr189m : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--jvr189m.html
食品
-// xn--kcrx77d1x4a : 2014-11-07 Koninklijke Philips N.V.
+// xn--kcrx77d1x4a : Koninklijke Philips N.V.
+// https://www.iana.org/domains/root/db/xn--kcrx77d1x4a.html
飞利浦
-// xn--kput3i : 2014-02-13 Beijing RITT-Net Technology Development Co., Ltd
+// xn--kput3i : Beijing RITT-Net Technology Development Co., Ltd
+// https://www.iana.org/domains/root/db/xn--kput3i.html
手机
-// xn--mgba3a3ejt : 2014-11-20 Aramco Services Company
+// xn--mgba3a3ejt : Aramco Services Company
+// https://www.iana.org/domains/root/db/xn--mgba3a3ejt.html
ارامكو
-// xn--mgba7c0bbn0a : 2015-05-14 Crescent Holding GmbH
+// xn--mgba7c0bbn0a : Competrol (Luxembourg) Sarl
+// https://www.iana.org/domains/root/db/xn--mgba7c0bbn0a.html
العليان
-// xn--mgbaakc7dvf : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat)
+// xn--mgbaakc7dvf : Emirates Telecommunications Corporation (trading as Etisalat)
+// https://www.iana.org/domains/root/db/xn--mgbaakc7dvf.html
اتصالات
-// xn--mgbab2bd : 2013-10-31 CORE Association
+// xn--mgbab2bd : CORE Association
+// https://www.iana.org/domains/root/db/xn--mgbab2bd.html
بازار
-// xn--mgbca7dzdo : 2015-07-30 Abu Dhabi Systems and Information Centre
+// xn--mgbca7dzdo : Abu Dhabi Systems and Information Centre
+// https://www.iana.org/domains/root/db/xn--mgbca7dzdo.html
ابوظبي
-// xn--mgbi4ecexp : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+// xn--mgbi4ecexp : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+// https://www.iana.org/domains/root/db/xn--mgbi4ecexp.html
كاثوليك
-// xn--mgbt3dhd : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// xn--mgbt3dhd : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// https://www.iana.org/domains/root/db/xn--mgbt3dhd.html
همراه
-// xn--mk1bu44c : 2015-01-15 VeriSign Sarl
+// xn--mk1bu44c : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--mk1bu44c.html
닷컴
-// xn--mxtq1m : 2014-03-06 Net-Chinese Co., Ltd.
+// xn--mxtq1m : Net-Chinese Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--mxtq1m.html
政府
-// xn--ngbc5azd : 2013-07-13 International Domain Registry Pty. Ltd.
+// xn--ngbc5azd : International Domain Registry Pty. Ltd.
+// https://www.iana.org/domains/root/db/xn--ngbc5azd.html
شبكة
-// xn--ngbe9e0a : 2014-12-04 Kuwait Finance House
+// xn--ngbe9e0a : Kuwait Finance House
+// https://www.iana.org/domains/root/db/xn--ngbe9e0a.html
بيتك
-// xn--ngbrx : 2015-11-12 League of Arab States
+// xn--ngbrx : League of Arab States
+// https://www.iana.org/domains/root/db/xn--ngbrx.html
عرب
-// xn--nqv7f : 2013-11-14 Public Interest Registry
+// xn--nqv7f : Public Interest Registry
+// https://www.iana.org/domains/root/db/xn--nqv7f.html
机构
-// xn--nqv7fs00ema : 2013-11-14 Public Interest Registry
+// xn--nqv7fs00ema : Public Interest Registry
+// https://www.iana.org/domains/root/db/xn--nqv7fs00ema.html
组织机构
-// xn--nyqy26a : 2014-11-07 Stable Tone Limited
+// xn--nyqy26a : Stable Tone Limited
+// https://www.iana.org/domains/root/db/xn--nyqy26a.html
健康
-// xn--otu796d : 2017-08-06 Jiang Yu Liang Cai Technology Company Limited
+// xn--otu796d : Jiang Yu Liang Cai Technology Company Limited
+// https://www.iana.org/domains/root/db/xn--otu796d.html
招聘
-// xn--p1acf : 2013-12-12 Rusnames Limited
+// xn--p1acf : Rusnames Limited
+// https://www.iana.org/domains/root/db/xn--p1acf.html
рус
-// xn--pssy2u : 2015-01-15 VeriSign Sarl
+// xn--pssy2u : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--pssy2u.html
大拿
-// xn--q9jyb4c : 2013-09-17 Charleston Road Registry Inc.
+// xn--q9jyb4c : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/xn--q9jyb4c.html
みんな
-// xn--qcka1pmc : 2014-07-31 Charleston Road Registry Inc.
+// xn--qcka1pmc : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/xn--qcka1pmc.html
グーグル
-// xn--rhqv96g : 2013-09-11 Stable Tone Limited
+// xn--rhqv96g : Stable Tone Limited
+// https://www.iana.org/domains/root/db/xn--rhqv96g.html
世界
-// xn--rovu88b : 2015-02-26 Amazon Registry Services, Inc.
+// xn--rovu88b : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--rovu88b.html
書籍
-// xn--ses554g : 2014-01-16 KNET Co., Ltd.
+// xn--ses554g : KNET Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--ses554g.html
网址
-// xn--t60b56a : 2015-01-15 VeriSign Sarl
+// xn--t60b56a : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--t60b56a.html
닷넷
-// xn--tckwe : 2015-01-15 VeriSign Sarl
+// xn--tckwe : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--tckwe.html
コム
-// xn--tiq49xqyj : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+// xn--tiq49xqyj : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
+// https://www.iana.org/domains/root/db/xn--tiq49xqyj.html
天主教
-// xn--unup4y : 2013-07-14 Binky Moon, LLC
+// xn--unup4y : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/xn--unup4y.html
游戏
-// xn--vermgensberater-ctb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// xn--vermgensberater-ctb : Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// https://www.iana.org/domains/root/db/xn--vermgensberater-ctb.html
vermögensberater
-// xn--vermgensberatung-pwb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// xn--vermgensberatung-pwb : Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// https://www.iana.org/domains/root/db/xn--vermgensberatung-pwb.html
vermögensberatung
-// xn--vhquv : 2013-08-27 Binky Moon, LLC
+// xn--vhquv : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/xn--vhquv.html
企业
-// xn--vuq861b : 2014-10-16 Beijing Tele-info Network Technology Co., Ltd.
+// xn--vuq861b : Beijing Tele-info Technology Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--vuq861b.html
信息
-// xn--w4r85el8fhu5dnra : 2015-04-30 Kerry Trading Co. Limited
+// xn--w4r85el8fhu5dnra : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/xn--w4r85el8fhu5dnra.html
嘉里大酒店
-// xn--w4rs40l : 2015-07-30 Kerry Trading Co. Limited
+// xn--w4rs40l : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/xn--w4rs40l.html
嘉里
-// xn--xhq521b : 2013-11-14 Guangzhou YU Wei Information Technology Co., Ltd.
+// xn--xhq521b : Guangzhou YU Wei Information Technology Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--xhq521b.html
广东
-// xn--zfr164b : 2013-11-08 China Organizational Name Administration Center
+// xn--zfr164b : China Organizational Name Administration Center
+// https://www.iana.org/domains/root/db/xn--zfr164b.html
政务
-// xyz : 2013-12-05 XYZ.COM LLC
+// xyz : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/xyz.html
xyz
-// yachts : 2014-01-09 XYZ.COM LLC
+// yachts : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/yachts.html
yachts
-// yahoo : 2015-04-02 Oath Inc.
+// yahoo : Oath Inc.
+// https://www.iana.org/domains/root/db/yahoo.html
yahoo
-// yamaxun : 2014-12-18 Amazon Registry Services, Inc.
+// yamaxun : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/yamaxun.html
yamaxun
-// yandex : 2014-04-10 Yandex Europe B.V.
+// yandex : Yandex Europe B.V.
+// https://www.iana.org/domains/root/db/yandex.html
yandex
-// yodobashi : 2014-11-20 YODOBASHI CAMERA CO.,LTD.
+// yodobashi : YODOBASHI CAMERA CO.,LTD.
+// https://www.iana.org/domains/root/db/yodobashi.html
yodobashi
-// yoga : 2014-05-29 Registry Services, LLC
+// yoga : Registry Services, LLC
+// https://www.iana.org/domains/root/db/yoga.html
yoga
-// yokohama : 2013-12-12 GMO Registry, Inc.
+// yokohama : GMO Registry, Inc.
+// https://www.iana.org/domains/root/db/yokohama.html
yokohama
-// you : 2015-04-09 Amazon Registry Services, Inc.
+// you : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/you.html
you
-// youtube : 2014-05-01 Charleston Road Registry Inc.
+// youtube : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/youtube.html
youtube
-// yun : 2015-01-08 Beijing Qihu Keji Co., Ltd.
+// yun : Beijing Qihu Keji Co., Ltd.
+// https://www.iana.org/domains/root/db/yun.html
yun
-// zappos : 2015-06-25 Amazon Registry Services, Inc.
+// zappos : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/zappos.html
zappos
-// zara : 2014-11-07 Industria de Diseño Textil, S.A. (INDITEX, S.A.)
+// zara : Industria de Diseño Textil, S.A. (INDITEX, S.A.)
+// https://www.iana.org/domains/root/db/zara.html
zara
-// zero : 2014-12-18 Amazon Registry Services, Inc.
+// zero : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/zero.html
zero
-// zip : 2014-05-08 Charleston Road Registry Inc.
+// zip : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/zip.html
zip
-// zone : 2013-11-14 Binky Moon, LLC
+// zone : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/zone.html
zone
-// zuerich : 2014-11-07 Kanton Zürich (Canton of Zurich)
+// zuerich : Kanton Zürich (Canton of Zurich)
+// https://www.iana.org/domains/root/db/zuerich.html
zuerich
@@ -10189,11 +11317,78 @@ myamaze.net
// Submitted by AWS Security
// Subsections of Amazon/subsidiaries will appear until "concludes" tag
+// Amazon API Gateway
+// Submitted by AWS Security
+// Reference: 4d863337-ff98-4501-a6f2-361eba8445d6
+execute-api.cn-north-1.amazonaws.com.cn
+execute-api.cn-northwest-1.amazonaws.com.cn
+execute-api.af-south-1.amazonaws.com
+execute-api.ap-east-1.amazonaws.com
+execute-api.ap-northeast-1.amazonaws.com
+execute-api.ap-northeast-2.amazonaws.com
+execute-api.ap-northeast-3.amazonaws.com
+execute-api.ap-south-1.amazonaws.com
+execute-api.ap-south-2.amazonaws.com
+execute-api.ap-southeast-1.amazonaws.com
+execute-api.ap-southeast-2.amazonaws.com
+execute-api.ap-southeast-3.amazonaws.com
+execute-api.ap-southeast-4.amazonaws.com
+execute-api.ca-central-1.amazonaws.com
+execute-api.eu-central-1.amazonaws.com
+execute-api.eu-central-2.amazonaws.com
+execute-api.eu-north-1.amazonaws.com
+execute-api.eu-south-1.amazonaws.com
+execute-api.eu-south-2.amazonaws.com
+execute-api.eu-west-1.amazonaws.com
+execute-api.eu-west-2.amazonaws.com
+execute-api.eu-west-3.amazonaws.com
+execute-api.il-central-1.amazonaws.com
+execute-api.me-central-1.amazonaws.com
+execute-api.me-south-1.amazonaws.com
+execute-api.sa-east-1.amazonaws.com
+execute-api.us-east-1.amazonaws.com
+execute-api.us-east-2.amazonaws.com
+execute-api.us-gov-east-1.amazonaws.com
+execute-api.us-gov-west-1.amazonaws.com
+execute-api.us-west-1.amazonaws.com
+execute-api.us-west-2.amazonaws.com
+
// Amazon CloudFront
// Submitted by Donavan Miller
// Reference: 54144616-fd49-4435-8535-19c6a601bdb3
cloudfront.net
+// Amazon Cognito
+// Submitted by AWS Security
+// Reference: 7bee1013-f456-47df-bfe8-03c78d946d61
+auth.af-south-1.amazoncognito.com
+auth.ap-northeast-1.amazoncognito.com
+auth.ap-northeast-2.amazoncognito.com
+auth.ap-northeast-3.amazoncognito.com
+auth.ap-south-1.amazoncognito.com
+auth.ap-southeast-1.amazoncognito.com
+auth.ap-southeast-2.amazoncognito.com
+auth.ap-southeast-3.amazoncognito.com
+auth.ca-central-1.amazoncognito.com
+auth.eu-central-1.amazoncognito.com
+auth.eu-north-1.amazoncognito.com
+auth.eu-south-1.amazoncognito.com
+auth.eu-west-1.amazoncognito.com
+auth.eu-west-2.amazoncognito.com
+auth.eu-west-3.amazoncognito.com
+auth.il-central-1.amazoncognito.com
+auth.me-south-1.amazoncognito.com
+auth.sa-east-1.amazoncognito.com
+auth.us-east-1.amazoncognito.com
+auth-fips.us-east-1.amazoncognito.com
+auth.us-east-2.amazoncognito.com
+auth-fips.us-east-2.amazoncognito.com
+auth-fips.us-gov-west-1.amazoncognito.com
+auth.us-west-1.amazoncognito.com
+auth-fips.us-west-1.amazoncognito.com
+auth.us-west-2.amazoncognito.com
+auth-fips.us-west-2.amazoncognito.com
+
// Amazon EC2
// Submitted by Luke Wells
// Reference: 4c38fa71-58ac-4768-99e5-689c1767e537
@@ -10202,47 +11397,307 @@ cloudfront.net
*.compute.amazonaws.com.cn
us-east-1.amazonaws.com
+// Amazon EMR
+// Submitted by AWS Security
+// Reference: 597f3f8e-9283-4e48-8e32-7ee25a1ff6ab
+emrappui-prod.cn-north-1.amazonaws.com.cn
+emrnotebooks-prod.cn-north-1.amazonaws.com.cn
+emrstudio-prod.cn-north-1.amazonaws.com.cn
+emrappui-prod.cn-northwest-1.amazonaws.com.cn
+emrnotebooks-prod.cn-northwest-1.amazonaws.com.cn
+emrstudio-prod.cn-northwest-1.amazonaws.com.cn
+emrappui-prod.af-south-1.amazonaws.com
+emrnotebooks-prod.af-south-1.amazonaws.com
+emrstudio-prod.af-south-1.amazonaws.com
+emrappui-prod.ap-east-1.amazonaws.com
+emrnotebooks-prod.ap-east-1.amazonaws.com
+emrstudio-prod.ap-east-1.amazonaws.com
+emrappui-prod.ap-northeast-1.amazonaws.com
+emrnotebooks-prod.ap-northeast-1.amazonaws.com
+emrstudio-prod.ap-northeast-1.amazonaws.com
+emrappui-prod.ap-northeast-2.amazonaws.com
+emrnotebooks-prod.ap-northeast-2.amazonaws.com
+emrstudio-prod.ap-northeast-2.amazonaws.com
+emrappui-prod.ap-northeast-3.amazonaws.com
+emrnotebooks-prod.ap-northeast-3.amazonaws.com
+emrstudio-prod.ap-northeast-3.amazonaws.com
+emrappui-prod.ap-south-1.amazonaws.com
+emrnotebooks-prod.ap-south-1.amazonaws.com
+emrstudio-prod.ap-south-1.amazonaws.com
+emrappui-prod.ap-southeast-1.amazonaws.com
+emrnotebooks-prod.ap-southeast-1.amazonaws.com
+emrstudio-prod.ap-southeast-1.amazonaws.com
+emrappui-prod.ap-southeast-2.amazonaws.com
+emrnotebooks-prod.ap-southeast-2.amazonaws.com
+emrstudio-prod.ap-southeast-2.amazonaws.com
+emrappui-prod.ap-southeast-3.amazonaws.com
+emrnotebooks-prod.ap-southeast-3.amazonaws.com
+emrstudio-prod.ap-southeast-3.amazonaws.com
+emrappui-prod.ca-central-1.amazonaws.com
+emrnotebooks-prod.ca-central-1.amazonaws.com
+emrstudio-prod.ca-central-1.amazonaws.com
+emrappui-prod.eu-central-1.amazonaws.com
+emrnotebooks-prod.eu-central-1.amazonaws.com
+emrstudio-prod.eu-central-1.amazonaws.com
+emrappui-prod.eu-north-1.amazonaws.com
+emrnotebooks-prod.eu-north-1.amazonaws.com
+emrstudio-prod.eu-north-1.amazonaws.com
+emrappui-prod.eu-south-1.amazonaws.com
+emrnotebooks-prod.eu-south-1.amazonaws.com
+emrstudio-prod.eu-south-1.amazonaws.com
+emrappui-prod.eu-west-1.amazonaws.com
+emrnotebooks-prod.eu-west-1.amazonaws.com
+emrstudio-prod.eu-west-1.amazonaws.com
+emrappui-prod.eu-west-2.amazonaws.com
+emrnotebooks-prod.eu-west-2.amazonaws.com
+emrstudio-prod.eu-west-2.amazonaws.com
+emrappui-prod.eu-west-3.amazonaws.com
+emrnotebooks-prod.eu-west-3.amazonaws.com
+emrstudio-prod.eu-west-3.amazonaws.com
+emrappui-prod.me-central-1.amazonaws.com
+emrnotebooks-prod.me-central-1.amazonaws.com
+emrstudio-prod.me-central-1.amazonaws.com
+emrappui-prod.me-south-1.amazonaws.com
+emrnotebooks-prod.me-south-1.amazonaws.com
+emrstudio-prod.me-south-1.amazonaws.com
+emrappui-prod.sa-east-1.amazonaws.com
+emrnotebooks-prod.sa-east-1.amazonaws.com
+emrstudio-prod.sa-east-1.amazonaws.com
+emrappui-prod.us-east-1.amazonaws.com
+emrnotebooks-prod.us-east-1.amazonaws.com
+emrstudio-prod.us-east-1.amazonaws.com
+emrappui-prod.us-east-2.amazonaws.com
+emrnotebooks-prod.us-east-2.amazonaws.com
+emrstudio-prod.us-east-2.amazonaws.com
+emrappui-prod.us-gov-east-1.amazonaws.com
+emrnotebooks-prod.us-gov-east-1.amazonaws.com
+emrstudio-prod.us-gov-east-1.amazonaws.com
+emrappui-prod.us-gov-west-1.amazonaws.com
+emrnotebooks-prod.us-gov-west-1.amazonaws.com
+emrstudio-prod.us-gov-west-1.amazonaws.com
+emrappui-prod.us-west-1.amazonaws.com
+emrnotebooks-prod.us-west-1.amazonaws.com
+emrstudio-prod.us-west-1.amazonaws.com
+emrappui-prod.us-west-2.amazonaws.com
+emrnotebooks-prod.us-west-2.amazonaws.com
+emrstudio-prod.us-west-2.amazonaws.com
+
+// Amazon Managed Workflows for Apache Airflow
+// Submitted by AWS Security
+// Reference: 4ab55e6f-90c0-4a8d-b6a0-52ca5dbb1c2e
+*.cn-north-1.airflow.amazonaws.com.cn
+*.cn-northwest-1.airflow.amazonaws.com.cn
+*.ap-northeast-1.airflow.amazonaws.com
+*.ap-northeast-2.airflow.amazonaws.com
+*.ap-south-1.airflow.amazonaws.com
+*.ap-southeast-1.airflow.amazonaws.com
+*.ap-southeast-2.airflow.amazonaws.com
+*.ca-central-1.airflow.amazonaws.com
+*.eu-central-1.airflow.amazonaws.com
+*.eu-north-1.airflow.amazonaws.com
+*.eu-west-1.airflow.amazonaws.com
+*.eu-west-2.airflow.amazonaws.com
+*.eu-west-3.airflow.amazonaws.com
+*.sa-east-1.airflow.amazonaws.com
+*.us-east-1.airflow.amazonaws.com
+*.us-east-2.airflow.amazonaws.com
+*.us-west-2.airflow.amazonaws.com
+
// Amazon S3
-// Submitted by Luke Wells
-// Reference: d068bd97-f0a9-4838-a6d8-954b622ef4ae
+// Submitted by AWS Security
+// Reference: 0e801048-08f2-4064-9cb8-e7373e0b57f4
+s3.dualstack.cn-north-1.amazonaws.com.cn
+s3-accesspoint.dualstack.cn-north-1.amazonaws.com.cn
+s3-website.dualstack.cn-north-1.amazonaws.com.cn
s3.cn-north-1.amazonaws.com.cn
+s3-accesspoint.cn-north-1.amazonaws.com.cn
+s3-deprecated.cn-north-1.amazonaws.com.cn
+s3-object-lambda.cn-north-1.amazonaws.com.cn
+s3-website.cn-north-1.amazonaws.com.cn
+s3.dualstack.cn-northwest-1.amazonaws.com.cn
+s3-accesspoint.dualstack.cn-northwest-1.amazonaws.com.cn
+s3.cn-northwest-1.amazonaws.com.cn
+s3-accesspoint.cn-northwest-1.amazonaws.com.cn
+s3-object-lambda.cn-northwest-1.amazonaws.com.cn
+s3-website.cn-northwest-1.amazonaws.com.cn
+s3.dualstack.af-south-1.amazonaws.com
+s3-accesspoint.dualstack.af-south-1.amazonaws.com
+s3-website.dualstack.af-south-1.amazonaws.com
+s3.af-south-1.amazonaws.com
+s3-accesspoint.af-south-1.amazonaws.com
+s3-object-lambda.af-south-1.amazonaws.com
+s3-website.af-south-1.amazonaws.com
+s3.dualstack.ap-east-1.amazonaws.com
+s3-accesspoint.dualstack.ap-east-1.amazonaws.com
+s3.ap-east-1.amazonaws.com
+s3-accesspoint.ap-east-1.amazonaws.com
+s3-object-lambda.ap-east-1.amazonaws.com
+s3-website.ap-east-1.amazonaws.com
s3.dualstack.ap-northeast-1.amazonaws.com
+s3-accesspoint.dualstack.ap-northeast-1.amazonaws.com
+s3-website.dualstack.ap-northeast-1.amazonaws.com
+s3.ap-northeast-1.amazonaws.com
+s3-accesspoint.ap-northeast-1.amazonaws.com
+s3-object-lambda.ap-northeast-1.amazonaws.com
+s3-website.ap-northeast-1.amazonaws.com
s3.dualstack.ap-northeast-2.amazonaws.com
+s3-accesspoint.dualstack.ap-northeast-2.amazonaws.com
+s3-website.dualstack.ap-northeast-2.amazonaws.com
s3.ap-northeast-2.amazonaws.com
+s3-accesspoint.ap-northeast-2.amazonaws.com
+s3-object-lambda.ap-northeast-2.amazonaws.com
s3-website.ap-northeast-2.amazonaws.com
+s3.dualstack.ap-northeast-3.amazonaws.com
+s3-accesspoint.dualstack.ap-northeast-3.amazonaws.com
+s3-website.dualstack.ap-northeast-3.amazonaws.com
+s3.ap-northeast-3.amazonaws.com
+s3-accesspoint.ap-northeast-3.amazonaws.com
+s3-object-lambda.ap-northeast-3.amazonaws.com
+s3-website.ap-northeast-3.amazonaws.com
s3.dualstack.ap-south-1.amazonaws.com
+s3-accesspoint.dualstack.ap-south-1.amazonaws.com
+s3-website.dualstack.ap-south-1.amazonaws.com
s3.ap-south-1.amazonaws.com
+s3-accesspoint.ap-south-1.amazonaws.com
+s3-object-lambda.ap-south-1.amazonaws.com
s3-website.ap-south-1.amazonaws.com
+s3.dualstack.ap-south-2.amazonaws.com
+s3-accesspoint.dualstack.ap-south-2.amazonaws.com
+s3.ap-south-2.amazonaws.com
+s3-accesspoint.ap-south-2.amazonaws.com
+s3-object-lambda.ap-south-2.amazonaws.com
+s3-website.ap-south-2.amazonaws.com
s3.dualstack.ap-southeast-1.amazonaws.com
+s3-accesspoint.dualstack.ap-southeast-1.amazonaws.com
+s3-website.dualstack.ap-southeast-1.amazonaws.com
+s3.ap-southeast-1.amazonaws.com
+s3-accesspoint.ap-southeast-1.amazonaws.com
+s3-object-lambda.ap-southeast-1.amazonaws.com
+s3-website.ap-southeast-1.amazonaws.com
s3.dualstack.ap-southeast-2.amazonaws.com
+s3-accesspoint.dualstack.ap-southeast-2.amazonaws.com
+s3-website.dualstack.ap-southeast-2.amazonaws.com
+s3.ap-southeast-2.amazonaws.com
+s3-accesspoint.ap-southeast-2.amazonaws.com
+s3-object-lambda.ap-southeast-2.amazonaws.com
+s3-website.ap-southeast-2.amazonaws.com
+s3.dualstack.ap-southeast-3.amazonaws.com
+s3-accesspoint.dualstack.ap-southeast-3.amazonaws.com
+s3.ap-southeast-3.amazonaws.com
+s3-accesspoint.ap-southeast-3.amazonaws.com
+s3-object-lambda.ap-southeast-3.amazonaws.com
+s3-website.ap-southeast-3.amazonaws.com
+s3.dualstack.ap-southeast-4.amazonaws.com
+s3-accesspoint.dualstack.ap-southeast-4.amazonaws.com
+s3.ap-southeast-4.amazonaws.com
+s3-accesspoint.ap-southeast-4.amazonaws.com
+s3-object-lambda.ap-southeast-4.amazonaws.com
+s3-website.ap-southeast-4.amazonaws.com
s3.dualstack.ca-central-1.amazonaws.com
+s3-accesspoint.dualstack.ca-central-1.amazonaws.com
+s3-accesspoint-fips.dualstack.ca-central-1.amazonaws.com
+s3-fips.dualstack.ca-central-1.amazonaws.com
+s3-website.dualstack.ca-central-1.amazonaws.com
s3.ca-central-1.amazonaws.com
+s3-accesspoint.ca-central-1.amazonaws.com
+s3-accesspoint-fips.ca-central-1.amazonaws.com
+s3-fips.ca-central-1.amazonaws.com
+s3-object-lambda.ca-central-1.amazonaws.com
s3-website.ca-central-1.amazonaws.com
s3.dualstack.eu-central-1.amazonaws.com
+s3-accesspoint.dualstack.eu-central-1.amazonaws.com
+s3-website.dualstack.eu-central-1.amazonaws.com
s3.eu-central-1.amazonaws.com
+s3-accesspoint.eu-central-1.amazonaws.com
+s3-object-lambda.eu-central-1.amazonaws.com
s3-website.eu-central-1.amazonaws.com
+s3.dualstack.eu-central-2.amazonaws.com
+s3-accesspoint.dualstack.eu-central-2.amazonaws.com
+s3.eu-central-2.amazonaws.com
+s3-accesspoint.eu-central-2.amazonaws.com
+s3-object-lambda.eu-central-2.amazonaws.com
+s3-website.eu-central-2.amazonaws.com
+s3.dualstack.eu-north-1.amazonaws.com
+s3-accesspoint.dualstack.eu-north-1.amazonaws.com
+s3.eu-north-1.amazonaws.com
+s3-accesspoint.eu-north-1.amazonaws.com
+s3-object-lambda.eu-north-1.amazonaws.com
+s3-website.eu-north-1.amazonaws.com
+s3.dualstack.eu-south-1.amazonaws.com
+s3-accesspoint.dualstack.eu-south-1.amazonaws.com
+s3-website.dualstack.eu-south-1.amazonaws.com
+s3.eu-south-1.amazonaws.com
+s3-accesspoint.eu-south-1.amazonaws.com
+s3-object-lambda.eu-south-1.amazonaws.com
+s3-website.eu-south-1.amazonaws.com
+s3.dualstack.eu-south-2.amazonaws.com
+s3-accesspoint.dualstack.eu-south-2.amazonaws.com
+s3.eu-south-2.amazonaws.com
+s3-accesspoint.eu-south-2.amazonaws.com
+s3-object-lambda.eu-south-2.amazonaws.com
+s3-website.eu-south-2.amazonaws.com
s3.dualstack.eu-west-1.amazonaws.com
+s3-accesspoint.dualstack.eu-west-1.amazonaws.com
+s3-website.dualstack.eu-west-1.amazonaws.com
+s3.eu-west-1.amazonaws.com
+s3-accesspoint.eu-west-1.amazonaws.com
+s3-deprecated.eu-west-1.amazonaws.com
+s3-object-lambda.eu-west-1.amazonaws.com
+s3-website.eu-west-1.amazonaws.com
s3.dualstack.eu-west-2.amazonaws.com
+s3-accesspoint.dualstack.eu-west-2.amazonaws.com
s3.eu-west-2.amazonaws.com
+s3-accesspoint.eu-west-2.amazonaws.com
+s3-object-lambda.eu-west-2.amazonaws.com
s3-website.eu-west-2.amazonaws.com
s3.dualstack.eu-west-3.amazonaws.com
+s3-accesspoint.dualstack.eu-west-3.amazonaws.com
+s3-website.dualstack.eu-west-3.amazonaws.com
s3.eu-west-3.amazonaws.com
+s3-accesspoint.eu-west-3.amazonaws.com
+s3-object-lambda.eu-west-3.amazonaws.com
s3-website.eu-west-3.amazonaws.com
+s3.dualstack.il-central-1.amazonaws.com
+s3-accesspoint.dualstack.il-central-1.amazonaws.com
+s3.il-central-1.amazonaws.com
+s3-accesspoint.il-central-1.amazonaws.com
+s3-object-lambda.il-central-1.amazonaws.com
+s3-website.il-central-1.amazonaws.com
+s3.dualstack.me-central-1.amazonaws.com
+s3-accesspoint.dualstack.me-central-1.amazonaws.com
+s3.me-central-1.amazonaws.com
+s3-accesspoint.me-central-1.amazonaws.com
+s3-object-lambda.me-central-1.amazonaws.com
+s3-website.me-central-1.amazonaws.com
+s3.dualstack.me-south-1.amazonaws.com
+s3-accesspoint.dualstack.me-south-1.amazonaws.com
+s3.me-south-1.amazonaws.com
+s3-accesspoint.me-south-1.amazonaws.com
+s3-object-lambda.me-south-1.amazonaws.com
+s3-website.me-south-1.amazonaws.com
s3.amazonaws.com
+s3-1.amazonaws.com
+s3-ap-east-1.amazonaws.com
s3-ap-northeast-1.amazonaws.com
s3-ap-northeast-2.amazonaws.com
+s3-ap-northeast-3.amazonaws.com
s3-ap-south-1.amazonaws.com
s3-ap-southeast-1.amazonaws.com
s3-ap-southeast-2.amazonaws.com
s3-ca-central-1.amazonaws.com
s3-eu-central-1.amazonaws.com
+s3-eu-north-1.amazonaws.com
s3-eu-west-1.amazonaws.com
s3-eu-west-2.amazonaws.com
s3-eu-west-3.amazonaws.com
s3-external-1.amazonaws.com
+s3-fips-us-gov-east-1.amazonaws.com
s3-fips-us-gov-west-1.amazonaws.com
+mrap.accesspoint.s3-global.amazonaws.com
+s3-me-south-1.amazonaws.com
s3-sa-east-1.amazonaws.com
s3-us-east-2.amazonaws.com
+s3-us-gov-east-1.amazonaws.com
s3-us-gov-west-1.amazonaws.com
s3-us-west-1.amazonaws.com
s3-us-west-2.amazonaws.com
@@ -10252,80 +11707,277 @@ s3-website-ap-southeast-2.amazonaws.com
s3-website-eu-west-1.amazonaws.com
s3-website-sa-east-1.amazonaws.com
s3-website-us-east-1.amazonaws.com
+s3-website-us-gov-west-1.amazonaws.com
s3-website-us-west-1.amazonaws.com
s3-website-us-west-2.amazonaws.com
s3.dualstack.sa-east-1.amazonaws.com
+s3-accesspoint.dualstack.sa-east-1.amazonaws.com
+s3-website.dualstack.sa-east-1.amazonaws.com
+s3.sa-east-1.amazonaws.com
+s3-accesspoint.sa-east-1.amazonaws.com
+s3-object-lambda.sa-east-1.amazonaws.com
+s3-website.sa-east-1.amazonaws.com
s3.dualstack.us-east-1.amazonaws.com
+s3-accesspoint.dualstack.us-east-1.amazonaws.com
+s3-accesspoint-fips.dualstack.us-east-1.amazonaws.com
+s3-fips.dualstack.us-east-1.amazonaws.com
+s3-website.dualstack.us-east-1.amazonaws.com
+s3.us-east-1.amazonaws.com
+s3-accesspoint.us-east-1.amazonaws.com
+s3-accesspoint-fips.us-east-1.amazonaws.com
+s3-deprecated.us-east-1.amazonaws.com
+s3-fips.us-east-1.amazonaws.com
+s3-object-lambda.us-east-1.amazonaws.com
+s3-website.us-east-1.amazonaws.com
s3.dualstack.us-east-2.amazonaws.com
+s3-accesspoint.dualstack.us-east-2.amazonaws.com
+s3-accesspoint-fips.dualstack.us-east-2.amazonaws.com
+s3-fips.dualstack.us-east-2.amazonaws.com
s3.us-east-2.amazonaws.com
+s3-accesspoint.us-east-2.amazonaws.com
+s3-accesspoint-fips.us-east-2.amazonaws.com
+s3-deprecated.us-east-2.amazonaws.com
+s3-fips.us-east-2.amazonaws.com
+s3-object-lambda.us-east-2.amazonaws.com
s3-website.us-east-2.amazonaws.com
+s3.dualstack.us-gov-east-1.amazonaws.com
+s3-accesspoint.dualstack.us-gov-east-1.amazonaws.com
+s3-accesspoint-fips.dualstack.us-gov-east-1.amazonaws.com
+s3-fips.dualstack.us-gov-east-1.amazonaws.com
+s3.us-gov-east-1.amazonaws.com
+s3-accesspoint.us-gov-east-1.amazonaws.com
+s3-accesspoint-fips.us-gov-east-1.amazonaws.com
+s3-fips.us-gov-east-1.amazonaws.com
+s3-object-lambda.us-gov-east-1.amazonaws.com
+s3-website.us-gov-east-1.amazonaws.com
+s3.dualstack.us-gov-west-1.amazonaws.com
+s3-accesspoint.dualstack.us-gov-west-1.amazonaws.com
+s3-accesspoint-fips.dualstack.us-gov-west-1.amazonaws.com
+s3-fips.dualstack.us-gov-west-1.amazonaws.com
+s3.us-gov-west-1.amazonaws.com
+s3-accesspoint.us-gov-west-1.amazonaws.com
+s3-accesspoint-fips.us-gov-west-1.amazonaws.com
+s3-fips.us-gov-west-1.amazonaws.com
+s3-object-lambda.us-gov-west-1.amazonaws.com
+s3-website.us-gov-west-1.amazonaws.com
+s3.dualstack.us-west-1.amazonaws.com
+s3-accesspoint.dualstack.us-west-1.amazonaws.com
+s3-accesspoint-fips.dualstack.us-west-1.amazonaws.com
+s3-fips.dualstack.us-west-1.amazonaws.com
+s3-website.dualstack.us-west-1.amazonaws.com
+s3.us-west-1.amazonaws.com
+s3-accesspoint.us-west-1.amazonaws.com
+s3-accesspoint-fips.us-west-1.amazonaws.com
+s3-fips.us-west-1.amazonaws.com
+s3-object-lambda.us-west-1.amazonaws.com
+s3-website.us-west-1.amazonaws.com
+s3.dualstack.us-west-2.amazonaws.com
+s3-accesspoint.dualstack.us-west-2.amazonaws.com
+s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com
+s3-fips.dualstack.us-west-2.amazonaws.com
+s3-website.dualstack.us-west-2.amazonaws.com
+s3.us-west-2.amazonaws.com
+s3-accesspoint.us-west-2.amazonaws.com
+s3-accesspoint-fips.us-west-2.amazonaws.com
+s3-deprecated.us-west-2.amazonaws.com
+s3-fips.us-west-2.amazonaws.com
+s3-object-lambda.us-west-2.amazonaws.com
+s3-website.us-west-2.amazonaws.com
+
+// Amazon SageMaker Notebook Instances
+// Submitted by AWS Security
+// Reference: fe8c9e94-5a22-486d-8750-991a3a9b13c6
+notebook.af-south-1.sagemaker.aws
+notebook.ap-east-1.sagemaker.aws
+notebook.ap-northeast-1.sagemaker.aws
+notebook.ap-northeast-2.sagemaker.aws
+notebook.ap-northeast-3.sagemaker.aws
+notebook.ap-south-1.sagemaker.aws
+notebook.ap-south-2.sagemaker.aws
+notebook.ap-southeast-1.sagemaker.aws
+notebook.ap-southeast-2.sagemaker.aws
+notebook.ap-southeast-3.sagemaker.aws
+notebook.ap-southeast-4.sagemaker.aws
+notebook.ca-central-1.sagemaker.aws
+notebook.eu-central-1.sagemaker.aws
+notebook.eu-central-2.sagemaker.aws
+notebook.eu-north-1.sagemaker.aws
+notebook.eu-south-1.sagemaker.aws
+notebook.eu-south-2.sagemaker.aws
+notebook.eu-west-1.sagemaker.aws
+notebook.eu-west-2.sagemaker.aws
+notebook.eu-west-3.sagemaker.aws
+notebook.il-central-1.sagemaker.aws
+notebook.me-central-1.sagemaker.aws
+notebook.me-south-1.sagemaker.aws
+notebook.sa-east-1.sagemaker.aws
+notebook.us-east-1.sagemaker.aws
+notebook-fips.us-east-1.sagemaker.aws
+notebook.us-east-2.sagemaker.aws
+notebook-fips.us-east-2.sagemaker.aws
+notebook.us-gov-east-1.sagemaker.aws
+notebook-fips.us-gov-east-1.sagemaker.aws
+notebook.us-gov-west-1.sagemaker.aws
+notebook-fips.us-gov-west-1.sagemaker.aws
+notebook.us-west-1.sagemaker.aws
+notebook.us-west-2.sagemaker.aws
+notebook-fips.us-west-2.sagemaker.aws
+notebook.cn-north-1.sagemaker.com.cn
+notebook.cn-northwest-1.sagemaker.com.cn
+
+// Amazon SageMaker Studio
+// Submitted by AWS Security
+// Reference: 057ee397-6bf8-4f20-b807-d7bc145ac980
+studio.af-south-1.sagemaker.aws
+studio.ap-east-1.sagemaker.aws
+studio.ap-northeast-1.sagemaker.aws
+studio.ap-northeast-2.sagemaker.aws
+studio.ap-northeast-3.sagemaker.aws
+studio.ap-south-1.sagemaker.aws
+studio.ap-southeast-1.sagemaker.aws
+studio.ap-southeast-2.sagemaker.aws
+studio.ap-southeast-3.sagemaker.aws
+studio.ca-central-1.sagemaker.aws
+studio.eu-central-1.sagemaker.aws
+studio.eu-north-1.sagemaker.aws
+studio.eu-south-1.sagemaker.aws
+studio.eu-west-1.sagemaker.aws
+studio.eu-west-2.sagemaker.aws
+studio.eu-west-3.sagemaker.aws
+studio.il-central-1.sagemaker.aws
+studio.me-central-1.sagemaker.aws
+studio.me-south-1.sagemaker.aws
+studio.sa-east-1.sagemaker.aws
+studio.us-east-1.sagemaker.aws
+studio.us-east-2.sagemaker.aws
+studio.us-gov-east-1.sagemaker.aws
+studio-fips.us-gov-east-1.sagemaker.aws
+studio.us-gov-west-1.sagemaker.aws
+studio-fips.us-gov-west-1.sagemaker.aws
+studio.us-west-1.sagemaker.aws
+studio.us-west-2.sagemaker.aws
+studio.cn-north-1.sagemaker.com.cn
+studio.cn-northwest-1.sagemaker.com.cn
+
+// Analytics on AWS
+// Submitted by AWS Security
+// Reference: 955f9f40-a495-4e73-ae85-67b77ac9cadd
+analytics-gateway.ap-northeast-1.amazonaws.com
+analytics-gateway.ap-northeast-2.amazonaws.com
+analytics-gateway.ap-south-1.amazonaws.com
+analytics-gateway.ap-southeast-1.amazonaws.com
+analytics-gateway.ap-southeast-2.amazonaws.com
+analytics-gateway.eu-central-1.amazonaws.com
+analytics-gateway.eu-west-1.amazonaws.com
+analytics-gateway.us-east-1.amazonaws.com
+analytics-gateway.us-east-2.amazonaws.com
+analytics-gateway.us-west-2.amazonaws.com
+
+// AWS Amplify
+// Submitted by AWS Security
+// Reference: 5ecce854-c033-4fc4-a755-1a9916d9a9bb
+*.amplifyapp.com
+
+// AWS App Runner
+// Submitted by AWS Security
+// Reference: 6828c008-ba5d-442f-ade5-48da4e7c2316
+*.awsapprunner.com
// AWS Cloud9
// Submitted by: AWS Security
-// Reference: 2b6dfa9a-3a7f-4367-b2e7-0321e77c0d59
+// Reference: 05c44955-977c-4b57-938a-f2af92733f9f
+webview-assets.aws-cloud9.af-south-1.amazonaws.com
vfs.cloud9.af-south-1.amazonaws.com
webview-assets.cloud9.af-south-1.amazonaws.com
+webview-assets.aws-cloud9.ap-east-1.amazonaws.com
vfs.cloud9.ap-east-1.amazonaws.com
webview-assets.cloud9.ap-east-1.amazonaws.com
+webview-assets.aws-cloud9.ap-northeast-1.amazonaws.com
vfs.cloud9.ap-northeast-1.amazonaws.com
webview-assets.cloud9.ap-northeast-1.amazonaws.com
+webview-assets.aws-cloud9.ap-northeast-2.amazonaws.com
vfs.cloud9.ap-northeast-2.amazonaws.com
webview-assets.cloud9.ap-northeast-2.amazonaws.com
+webview-assets.aws-cloud9.ap-northeast-3.amazonaws.com
vfs.cloud9.ap-northeast-3.amazonaws.com
webview-assets.cloud9.ap-northeast-3.amazonaws.com
+webview-assets.aws-cloud9.ap-south-1.amazonaws.com
vfs.cloud9.ap-south-1.amazonaws.com
webview-assets.cloud9.ap-south-1.amazonaws.com
+webview-assets.aws-cloud9.ap-southeast-1.amazonaws.com
vfs.cloud9.ap-southeast-1.amazonaws.com
webview-assets.cloud9.ap-southeast-1.amazonaws.com
+webview-assets.aws-cloud9.ap-southeast-2.amazonaws.com
vfs.cloud9.ap-southeast-2.amazonaws.com
webview-assets.cloud9.ap-southeast-2.amazonaws.com
+webview-assets.aws-cloud9.ca-central-1.amazonaws.com
vfs.cloud9.ca-central-1.amazonaws.com
webview-assets.cloud9.ca-central-1.amazonaws.com
+webview-assets.aws-cloud9.eu-central-1.amazonaws.com
vfs.cloud9.eu-central-1.amazonaws.com
webview-assets.cloud9.eu-central-1.amazonaws.com
+webview-assets.aws-cloud9.eu-north-1.amazonaws.com
vfs.cloud9.eu-north-1.amazonaws.com
webview-assets.cloud9.eu-north-1.amazonaws.com
+webview-assets.aws-cloud9.eu-south-1.amazonaws.com
vfs.cloud9.eu-south-1.amazonaws.com
webview-assets.cloud9.eu-south-1.amazonaws.com
+webview-assets.aws-cloud9.eu-west-1.amazonaws.com
vfs.cloud9.eu-west-1.amazonaws.com
webview-assets.cloud9.eu-west-1.amazonaws.com
+webview-assets.aws-cloud9.eu-west-2.amazonaws.com
vfs.cloud9.eu-west-2.amazonaws.com
webview-assets.cloud9.eu-west-2.amazonaws.com
+webview-assets.aws-cloud9.eu-west-3.amazonaws.com
vfs.cloud9.eu-west-3.amazonaws.com
webview-assets.cloud9.eu-west-3.amazonaws.com
+webview-assets.aws-cloud9.me-south-1.amazonaws.com
vfs.cloud9.me-south-1.amazonaws.com
webview-assets.cloud9.me-south-1.amazonaws.com
+webview-assets.aws-cloud9.sa-east-1.amazonaws.com
vfs.cloud9.sa-east-1.amazonaws.com
webview-assets.cloud9.sa-east-1.amazonaws.com
+webview-assets.aws-cloud9.us-east-1.amazonaws.com
vfs.cloud9.us-east-1.amazonaws.com
webview-assets.cloud9.us-east-1.amazonaws.com
+webview-assets.aws-cloud9.us-east-2.amazonaws.com
vfs.cloud9.us-east-2.amazonaws.com
webview-assets.cloud9.us-east-2.amazonaws.com
+webview-assets.aws-cloud9.us-west-1.amazonaws.com
vfs.cloud9.us-west-1.amazonaws.com
webview-assets.cloud9.us-west-1.amazonaws.com
+webview-assets.aws-cloud9.us-west-2.amazonaws.com
vfs.cloud9.us-west-2.amazonaws.com
webview-assets.cloud9.us-west-2.amazonaws.com
// AWS Elastic Beanstalk
-// Submitted by Luke Wells
-// Reference: aa202394-43a0-4857-b245-8db04549137e
+// Submitted by AWS Security
+// Reference: bb5a965c-dec3-4967-aa22-e306ad064797
cn-north-1.eb.amazonaws.com.cn
cn-northwest-1.eb.amazonaws.com.cn
elasticbeanstalk.com
+af-south-1.elasticbeanstalk.com
+ap-east-1.elasticbeanstalk.com
ap-northeast-1.elasticbeanstalk.com
ap-northeast-2.elasticbeanstalk.com
ap-northeast-3.elasticbeanstalk.com
ap-south-1.elasticbeanstalk.com
ap-southeast-1.elasticbeanstalk.com
ap-southeast-2.elasticbeanstalk.com
+ap-southeast-3.elasticbeanstalk.com
ca-central-1.elasticbeanstalk.com
eu-central-1.elasticbeanstalk.com
+eu-north-1.elasticbeanstalk.com
+eu-south-1.elasticbeanstalk.com
eu-west-1.elasticbeanstalk.com
eu-west-2.elasticbeanstalk.com
eu-west-3.elasticbeanstalk.com
+il-central-1.elasticbeanstalk.com
+me-south-1.elasticbeanstalk.com
sa-east-1.elasticbeanstalk.com
us-east-1.elasticbeanstalk.com
us-east-2.elasticbeanstalk.com
+us-gov-east-1.elasticbeanstalk.com
us-gov-west-1.elasticbeanstalk.com
us-west-1.elasticbeanstalk.com
us-west-2.elasticbeanstalk.com
@@ -11588,7 +13240,7 @@ freemyip.com
// Submitted by Daniel A. Maierhofer
wien.funkfeuer.at
-// Futureweb OG : http://www.futureweb.at
+// Futureweb GmbH : https://www.futureweb.at
// Submitted by Andreas Schnederle-Wagner
*.futurecms.at
*.ex.futurecms.at
@@ -12095,7 +13747,6 @@ iobb.net
// Submitted by Ihor Kolodyuk
mel.cloudlets.com.au
cloud.interhostsolutions.be
-users.scale.virtualcloud.com.br
mycloud.by
alp1.ae.flow.ch
appengine.flow.ch
@@ -12119,9 +13770,7 @@ ch.trendhosting.cloud
de.trendhosting.cloud
jele.club
amscompute.com
-clicketcloud.com
dopaas.com
-hidora.com
paas.hosted-by-previder.com
rag-cloud.hosteur.com
rag-cloud-ch.hosteur.com
@@ -12436,6 +14085,10 @@ azurestaticapps.net
1.azurestaticapps.net
2.azurestaticapps.net
3.azurestaticapps.net
+4.azurestaticapps.net
+5.azurestaticapps.net
+6.azurestaticapps.net
+7.azurestaticapps.net
centralus.azurestaticapps.net
eastasia.azurestaticapps.net
eastus2.azurestaticapps.net
@@ -12516,6 +14169,9 @@ sa.ngrok.io
us.ngrok.io
ngrok.pizza
+// Nicolaus Copernicus University in Torun - MSK TORMAN (https://www.man.torun.pl)
+torun.pl
+
// Nimbus Hosting Ltd. : https://www.nimbushosting.co.uk/
// Submitted by Nicholas Ford
nh-serv.co.uk
@@ -13230,6 +14886,20 @@ bounty-full.com
alpha.bounty-full.com
beta.bounty-full.com
+// Smallregistry by Promopixel SARL: https://www.smallregistry.net
+// Former AFNIC's SLDs
+// Submitted by Jérôme Lipowicz
+aeroport.fr
+avocat.fr
+chambagri.fr
+chirurgiens-dentistes.fr
+experts-comptables.fr
+medecin.fr
+notaires.fr
+pharmacien.fr
+port.fr
+veterinaire.fr
+
// Small Technology Foundation : https://small-tech.org
// Submitted by Aral Balkan
small-web.org
@@ -13323,6 +14993,10 @@ myspreadshop.co.uk
// Submitted by Jacob Lee
api.stdlib.com
+// Storipress : https://storipress.com
+// Submitted by Benno Liu
+storipress.app
+
// Storj Labs Inc. : https://storj.io/
// Submitted by Philip Hutchins
storj.farm
@@ -13690,6 +15364,8 @@ js.wpenginepowered.com
// Submitted by Shahar Talmi
wixsite.com
editorx.io
+wixstudio.io
+wix.run
// XenonCloud GbR: https://xenoncloud.net
// Submitted by Julian Uphoff
diff --git a/src/java.base/share/legal/public_suffix.md b/src/java.base/share/legal/public_suffix.md
index 24924b6968add..493f3b1680dfb 100644
--- a/src/java.base/share/legal/public_suffix.md
+++ b/src/java.base/share/legal/public_suffix.md
@@ -11,7 +11,7 @@ If you do not wish to use the Public Suffix List, you may remove the
The Source Code of this file is available under the
Mozilla Public License, v. 2.0 and is located at
-https://raw.githubusercontent.com/publicsuffix/list/88467c960d6cdad2ca1623e892e5e17506bc269f/public_suffix_list.dat.
+https://raw.githubusercontent.com/publicsuffix/list/b5bf572c52988dbe9d865b8f090ea819024a9936/public_suffix_list.dat.
If a copy of the MPL was not distributed with this file, you can obtain one
at https://mozilla.org/MPL/2.0/.
diff --git a/src/java.base/unix/native/libnet/Inet4AddressImpl.c b/src/java.base/unix/native/libnet/Inet4AddressImpl.c
index 4db86234b23a8..fff524e03ae97 100644
--- a/src/java.base/unix/native/libnet/Inet4AddressImpl.c
+++ b/src/java.base/unix/native/libnet/Inet4AddressImpl.c
@@ -263,7 +263,11 @@ tcp_ping4(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout,
// set TTL
if (ttl > 0) {
- setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));
+ if (setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)) < 0) {
+ NET_ThrowNew(env, errno, "setsockopt IP_TTL failed");
+ close(fd);
+ return JNI_FALSE;
+ }
}
// A network interface was specified, so let's bind to it.
@@ -349,11 +353,19 @@ ping4(JNIEnv *env, jint fd, SOCKETADDRESS *sa, SOCKETADDRESS *netif,
struct timeval tv = { 0, 0 };
const size_t plen = ICMP_MINLEN + sizeof(tv);
- setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size));
+ if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)) < 0) {
+ NET_ThrowNew(env, errno, "setsockopt SO_RCVBUF failed");
+ close(fd);
+ return JNI_FALSE;
+ }
// sets the ttl (max number of hops)
if (ttl > 0) {
- setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));
+ if (setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)) < 0) {
+ NET_ThrowNew(env, errno, "setsockopt IP_TTL failed");
+ close(fd);
+ return JNI_FALSE;
+ }
}
// a specific interface was specified, so let's bind the socket
diff --git a/src/java.base/unix/native/libnet/Inet6AddressImpl.c b/src/java.base/unix/native/libnet/Inet6AddressImpl.c
index a28b2f99be0f2..bad7872c179fd 100644
--- a/src/java.base/unix/native/libnet/Inet6AddressImpl.c
+++ b/src/java.base/unix/native/libnet/Inet6AddressImpl.c
@@ -463,12 +463,16 @@ tcp_ping6(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout,
// set TTL
if (ttl > 0) {
- setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl));
+ if (setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl)) < 0) {
+ NET_ThrowNew(env, errno, "setsockopt IPV6_UNICAST_HOPS failed");
+ close(fd);
+ return JNI_FALSE;
+ }
}
// A network interface was specified, so let's bind to it.
if (netif != NULL) {
- if (bind(fd, &netif->sa, sizeof(struct sockaddr_in6)) <0) {
+ if (bind(fd, &netif->sa, sizeof(struct sockaddr_in6)) < 0) {
NET_ThrowNew(env, errno, "Can't bind socket");
close(fd);
return JNI_FALSE;
@@ -557,11 +561,19 @@ ping6(JNIEnv *env, jint fd, SOCKETADDRESS *sa, SOCKETADDRESS *netif,
setsockopt(fd, SOL_RAW, IPV6_CHECKSUM, &csum_offset, sizeof(int));
#endif
- setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size));
+ if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)) < 0) {
+ NET_ThrowNew(env, errno, "setsockopt SO_RCVBUF failed");
+ close(fd);
+ return JNI_FALSE;
+ }
// sets the ttl (max number of hops)
if (ttl > 0) {
- setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl));
+ if (setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl)) < 0) {
+ NET_ThrowNew(env, errno, "setsockopt IPV6_UNICAST_HOPS failed");
+ close(fd);
+ return JNI_FALSE;
+ }
}
// a specific interface was specified, so let's bind the socket
diff --git a/src/java.base/unix/native/libnet/net_util_md.c b/src/java.base/unix/native/libnet/net_util_md.c
index 8a6249f504f38..426a3de284502 100644
--- a/src/java.base/unix/native/libnet/net_util_md.c
+++ b/src/java.base/unix/native/libnet/net_util_md.c
@@ -536,7 +536,9 @@ NET_SetSockOpt(int fd, int level, int opt, const void *arg,
}
if (sotype == SOCK_DGRAM) {
- setsockopt(fd, level, SO_REUSEPORT, arg, len);
+ if (setsockopt(fd, level, SO_REUSEPORT, arg, len) < 0) {
+ return -1;
+ }
}
}
#endif
diff --git a/src/java.base/windows/classes/sun/nio/ch/PipeImpl.java b/src/java.base/windows/classes/sun/nio/ch/PipeImpl.java
index 01a72835b88bc..67a344a663d49 100644
--- a/src/java.base/windows/classes/sun/nio/ch/PipeImpl.java
+++ b/src/java.base/windows/classes/sun/nio/ch/PipeImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,14 +129,7 @@ public void run() {
}
// Establish connection (assume connection is eagerly accepted)
- if (sa instanceof InetSocketAddress
- && Thread.currentThread().isVirtual()) {
- // workaround "lost event" issue on older releases of Windows
- sc1 = SocketChannel.open();
- sc1.socket().connect(sa, 10_000);
- } else {
- sc1 = SocketChannel.open(sa);
- }
+ sc1 = SocketChannel.open(sa);
RANDOM_NUMBER_GENERATOR.nextBytes(secret.array());
do {
sc1.write(secret);
diff --git a/src/java.base/windows/classes/sun/nio/ch/WEPollPoller.java b/src/java.base/windows/classes/sun/nio/ch/WEPollPoller.java
index 21aee78d03be7..3db8d67acc67a 100644
--- a/src/java.base/windows/classes/sun/nio/ch/WEPollPoller.java
+++ b/src/java.base/windows/classes/sun/nio/ch/WEPollPoller.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,16 +46,13 @@ class WEPollPoller extends Poller {
@Override
void implRegister(int fdVal) throws IOException {
- // re-arm
- int err = WEPoll.ctl(handle, EPOLL_CTL_MOD, fdVal, (event | EPOLLONESHOT));
- if (err == ENOENT)
- err = WEPoll.ctl(handle, EPOLL_CTL_ADD, fdVal, (event | EPOLLONESHOT));
+ int err = WEPoll.ctl(handle, EPOLL_CTL_ADD, fdVal, (event | EPOLLONESHOT));
if (err != 0)
throw new IOException("epoll_ctl failed: " + err);
}
@Override
- void implDeregister(int fdVal) {
+ void implDeregister(int fdVal, boolean polled) {
WEPoll.ctl(handle, EPOLL_CTL_DEL, fdVal, 0);
}
diff --git a/src/java.base/windows/native/libnet/Inet4AddressImpl.c b/src/java.base/windows/native/libnet/Inet4AddressImpl.c
index 97f3ef4e8e11c..0e2d6a3455f43 100644
--- a/src/java.base/windows/native/libnet/Inet4AddressImpl.c
+++ b/src/java.base/windows/native/libnet/Inet4AddressImpl.c
@@ -232,7 +232,11 @@ tcp_ping4(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout,
// set TTL
if (ttl > 0) {
- setsockopt(fd, IPPROTO_IP, IP_TTL, (const char *)&ttl, sizeof(ttl));
+ if (setsockopt(fd, IPPROTO_IP, IP_TTL, (const char *)&ttl, sizeof(ttl)) == SOCKET_ERROR) {
+ NET_ThrowNew(env, WSAGetLastError(), "setsockopt IP_TTL failed");
+ closesocket(fd);
+ return JNI_FALSE;
+ }
}
// A network interface was specified, so let's bind to it.
diff --git a/src/java.base/windows/native/libnet/Inet6AddressImpl.c b/src/java.base/windows/native/libnet/Inet6AddressImpl.c
index 324024c842ec2..244e2fefa9b1f 100644
--- a/src/java.base/windows/native/libnet/Inet6AddressImpl.c
+++ b/src/java.base/windows/native/libnet/Inet6AddressImpl.c
@@ -310,7 +310,11 @@ tcp_ping6(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout,
// set TTL
if (ttl > 0) {
- setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, (const char *)&ttl, sizeof(ttl));
+ if (setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, (const char *)&ttl, sizeof(ttl)) == SOCKET_ERROR) {
+ NET_ThrowNew(env, WSAGetLastError(), "setsockopt IPV6_UNICAST_HOPS failed");
+ closesocket(fd);
+ return JNI_FALSE;
+ }
}
// A network interface was specified, so let's bind to it.
diff --git a/src/java.base/windows/native/libnio/ch/Net.c b/src/java.base/windows/native/libnio/ch/Net.c
index 5cc5a2cd53f3c..3ccdbcc4752c6 100644
--- a/src/java.base/windows/native/libnio/ch/Net.c
+++ b/src/java.base/windows/native/libnio/ch/Net.c
@@ -156,7 +156,7 @@ Java_sun_nio_ch_Net_socket0(JNIEnv *env, jclass cl, jboolean preferIPv6,
if (s != INVALID_SOCKET) {
SetHandleInformation((HANDLE)s, HANDLE_FLAG_INHERIT, 0);
- /* IPV6_V6ONLY is true by default */
+ /* Attempt to disable IPV6_V6ONLY to ensure dual-socket support; ignore errors */
if (domain == AF_INET6) {
int opt = 0;
setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
diff --git a/src/java.base/windows/native/libnio/ch/WindowsAsynchronousServerSocketChannelImpl.c b/src/java.base/windows/native/libnio/ch/WindowsAsynchronousServerSocketChannelImpl.c
index 340bbb9c8decc..2c6de95ac65f4 100644
--- a/src/java.base/windows/native/libnio/ch/WindowsAsynchronousServerSocketChannelImpl.c
+++ b/src/java.base/windows/native/libnio/ch/WindowsAsynchronousServerSocketChannelImpl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -131,7 +131,9 @@ Java_sun_nio_ch_WindowsAsynchronousServerSocketChannelImpl_updateAcceptContext(J
SOCKET s1 = (SOCKET)jlong_to_ptr(listenSocket);
SOCKET s2 = (SOCKET)jlong_to_ptr(acceptSocket);
- setsockopt(s2, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT, (char *)&s1, sizeof(s1));
+ if (setsockopt(s2, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT, (char *)&s1, sizeof(s1)) == SOCKET_ERROR) {
+ JNU_ThrowIOExceptionWithLastError(env, "setsockopt failed");
+ }
}
diff --git a/src/java.base/windows/native/libnio/ch/WindowsAsynchronousSocketChannelImpl.c b/src/java.base/windows/native/libnio/ch/WindowsAsynchronousSocketChannelImpl.c
index 6b1fa64e70861..b325c34c9d851 100644
--- a/src/java.base/windows/native/libnio/ch/WindowsAsynchronousSocketChannelImpl.c
+++ b/src/java.base/windows/native/libnio/ch/WindowsAsynchronousSocketChannelImpl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,9 @@ Java_sun_nio_ch_WindowsAsynchronousSocketChannelImpl_updateConnectContext(JNIEnv
jlong socket)
{
SOCKET s = (SOCKET)jlong_to_ptr(socket);
- setsockopt(s, SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, NULL, 0);
+ if (setsockopt(s, SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, NULL, 0) == SOCKET_ERROR) {
+ JNU_ThrowIOExceptionWithLastError(env, "setsockopt failed");
+ }
}
diff --git a/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java b/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java
index 00ccc12fddc4a..b79cc98be9d55 100644
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,32 @@
package com.apple.laf;
-import java.awt.*;
-
-import javax.swing.*;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.Insets;
+
+import javax.accessibility.AccessibleContext;
+import javax.swing.ButtonModel;
+import javax.swing.CellRendererPane;
+import javax.swing.DefaultButtonModel;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.ListCellRenderer;
+import javax.swing.UIManager;
import javax.swing.plaf.UIResource;
+import apple.laf.JRSUIConstants.AlignmentHorizontal;
+import apple.laf.JRSUIConstants.AlignmentVertical;
+import apple.laf.JRSUIConstants.ArrowsOnly;
+import apple.laf.JRSUIConstants.Focused;
+import apple.laf.JRSUIConstants.IndicatorOnly;
+import apple.laf.JRSUIConstants.Size;
+import apple.laf.JRSUIConstants.State;
+import apple.laf.JRSUIConstants.Widget;
import apple.laf.JRSUIState;
-import apple.laf.JRSUIConstants.*;
@SuppressWarnings("serial") // Superclass is not serializable across versions
class AquaComboBoxButton extends JButton {
@@ -169,12 +188,15 @@ public void paintComponent(final Graphics g) {
}
}
- protected void doRendererPaint(final Graphics g, final ButtonModel buttonModel, final boolean editable, final Insets insets, int left, int top, int width, int height) {
+ private Component getRendererComponent() {
final ListCellRenderer renderer = comboBox.getRenderer();
+ return renderer.getListCellRendererComponent(list, comboBox.getSelectedItem(), -1, false, false);
+ }
+
+ protected void doRendererPaint(final Graphics g, final ButtonModel buttonModel, final boolean editable, final Insets insets, int left, int top, int width, int height) {
// fake it out! not renderPressed
- final Component c = renderer.getListCellRendererComponent(list, comboBox.getSelectedItem(), -1, false, false);
- // System.err.println("Renderer: " + renderer);
+ final Component c = getRendererComponent();
if (!editable && !AquaComboBoxUI.isTableCellEditor(comboBox)) {
final int indentLeft = 10;
@@ -233,4 +255,25 @@ protected void doRendererPaint(final Graphics g, final ButtonModel buttonModel,
// Remove component from renderer pane, allowing it to be gc'ed.
rendererPane.remove(c);
}
+
+ @Override
+ public AccessibleContext getAccessibleContext() {
+ if (accessibleContext == null) {
+ accessibleContext = new AccessibleAquaComboBoxButton();
+ }
+ return accessibleContext;
+ }
+
+ private final class AccessibleAquaComboBoxButton extends AccessibleJButton {
+ @Override
+ public String getAccessibleName() {
+ String name = super.getAccessibleName();
+ if ((name == null || name.isEmpty())
+ && (!comboBox.isEditable() && comboBox.getSelectedItem() != null)) {
+ Component c = getRendererComponent();
+ name = c.getAccessibleContext().getAccessibleName();
+ }
+ return name;
+ }
+ }
}
diff --git a/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java b/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java
index 9027f9e037e59..b9b60994085b4 100644
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -728,4 +728,35 @@ public AquaComboBoxUI convertJComponentToTarget(final JComboBox> combo) {
static ClientPropertyApplicator, AquaComboBoxUI> getApplicator() {
return APPLICATOR.get();
}
+
+ @Override
+ public int getAccessibleChildrenCount(JComponent c) {
+ return 2;
+ }
+
+ @Override
+ public Accessible getAccessibleChild(JComponent c, int i) {
+ // 0 = the popup
+ // 1 = the editor for editable combobox and the arrow button for non-editable combobox
+ switch ( i ) {
+ case 0:
+ if (popup instanceof Accessible accessiblePopup) {
+ AccessibleContext ac = accessiblePopup.getAccessibleContext();
+ ac.setAccessibleParent(comboBox);
+ return accessiblePopup;
+ }
+ break;
+ case 1:
+ if (comboBox.isEditable()
+ && (editor instanceof Accessible accessibleEditor)) {
+ AccessibleContext ac = accessibleEditor.getAccessibleContext();
+ ac.setAccessibleParent(comboBox);
+ return accessibleEditor;
+ } else if (!comboBox.isEditable()) {
+ return arrowButton;
+ }
+ break;
+ }
+ return null;
+ }
}
diff --git a/src/java.desktop/share/classes/sun/font/HBShaper.java b/src/java.desktop/share/classes/sun/font/HBShaper.java
new file mode 100644
index 0000000000000..90877623c2b33
--- /dev/null
+++ b/src/java.desktop/share/classes/sun/font/HBShaper.java
@@ -0,0 +1,659 @@
+/*
+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.font;
+
+import java.awt.geom.Point2D;
+import sun.font.GlyphLayout.GVData;
+import sun.java2d.Disposer;
+import sun.java2d.DisposerRecord;
+
+import java.lang.foreign.Arena;
+import java.lang.foreign.FunctionDescriptor;
+import java.lang.foreign.Linker;
+import java.lang.foreign.MemoryLayout;
+import java.lang.foreign.MemorySegment;
+import static java.lang.foreign.MemorySegment.NULL;
+import java.lang.foreign.SequenceLayout;
+import java.lang.foreign.StructLayout;
+import java.lang.foreign.SymbolLookup;
+import java.lang.foreign.UnionLayout;
+import static java.lang.foreign.ValueLayout.*;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import java.lang.invoke.VarHandle;
+
+import java.util.Optional;
+import java.util.WeakHashMap;
+
+public class HBShaper {
+
+ /*
+ * union _hb_var_int_t {
+ * uint32_t u32;
+ * int32_t i32;
+ * uint16_t u16[2];
+ * int16_t i16[2];
+ * uint8_t u8[4];
+ * int8_t i8[4];
+ * };
+ */
+ private static final UnionLayout VarIntLayout = MemoryLayout.unionLayout(
+ JAVA_INT.withName("u32"),
+ JAVA_INT.withName("i32"),
+ MemoryLayout.sequenceLayout(2, JAVA_SHORT).withName("u16"),
+ MemoryLayout.sequenceLayout(2, JAVA_SHORT).withName("i16"),
+ MemoryLayout.sequenceLayout(4, JAVA_BYTE).withName("u8"),
+ MemoryLayout.sequenceLayout(4, JAVA_BYTE).withName("i8")
+ ).withName("_hb_var_int_t");
+
+ /*
+ * struct hb_glyph_position_t {
+ * hb_position_t x_advance;
+ * hb_position_t y_advance;
+ * hb_position_t x_offset;
+ * hb_position_t y_offset;
+ * hb_var_int_t var;
+ * };
+ */
+ private static final StructLayout PositionLayout = MemoryLayout.structLayout(
+ JAVA_INT.withName("x_advance"),
+ JAVA_INT.withName("y_advance"),
+ JAVA_INT.withName("x_offset"),
+ JAVA_INT.withName("y_offset"),
+ VarIntLayout.withName("var")
+ ).withName("hb_glyph_position_t");
+
+ /**
+ * struct hb_glyph_info_t {
+ * hb_codepoint_t codepoint;
+ * hb_mask_t mask;
+ * uint32_t cluster;
+ * hb_var_int_t var1;
+ * hb_var_int_t var2;
+ * };
+ */
+ private static final StructLayout GlyphInfoLayout = MemoryLayout.structLayout(
+ JAVA_INT.withName("codepoint"),
+ JAVA_INT.withName("mask"),
+ JAVA_INT.withName("cluster"),
+ VarIntLayout.withName("var1"),
+ VarIntLayout.withName("var2")
+ ).withName("hb_glyph_info_t");
+
+ private static VarHandle getVarHandle(StructLayout struct, String name) {
+ VarHandle h = struct.arrayElementVarHandle(PathElement.groupElement(name));
+ /* insert 0 offset so don't need to pass arg every time */
+ return MethodHandles.insertCoordinates(h, 1, 0L).withInvokeExactBehavior();
+ }
+
+ private static final VarHandle x_offsetHandle;
+ private static final VarHandle y_offsetHandle;
+ private static final VarHandle x_advanceHandle;
+ private static final VarHandle y_advanceHandle;
+ private static final VarHandle codePointHandle;
+ private static final VarHandle clusterHandle;
+
+ private static final MethodHandles.Lookup MH_LOOKUP;
+ private static final Linker LINKER;
+ private static final SymbolLookup SYM_LOOKUP;
+ private static final MethodHandle malloc_handle;
+ private static final MethodHandle create_face_handle;
+ private static final MethodHandle dispose_face_handle;
+ private static final MethodHandle jdk_hb_shape_handle;
+
+ /* hb_jdk_font_funcs_struct is a pointer to a harfbuzz font_funcs
+ * object which references the 5 following upcall stubs.
+ * The singleton shared font_funcs ptr is passed down in each
+ * call to shape() and installed on the hb_font.
+ */
+ private static final MemorySegment hb_jdk_font_funcs_struct;
+ private static final MemorySegment get_var_glyph_stub;
+ private static final MemorySegment get_nominal_glyph_stub;
+ private static final MemorySegment get_h_advance_stub;
+ private static final MemorySegment get_v_advance_stub;
+ private static final MemorySegment get_contour_pt_stub;
+
+ private static final MemorySegment store_layout_results_stub;
+
+ private static FunctionDescriptor
+ getFunctionDescriptor(MemoryLayout retType,
+ MemoryLayout... argTypes) {
+
+ return (retType == null) ?
+ FunctionDescriptor.ofVoid(argTypes) :
+ FunctionDescriptor.of(retType, argTypes);
+ }
+
+ private static MethodHandle getMethodHandle
+ (String mName,
+ FunctionDescriptor fd) {
+
+ try {
+ MethodType mType = fd.toMethodType();
+ return MH_LOOKUP.findStatic(HBShaper.class, mName, mType);
+ } catch (IllegalAccessException | NoSuchMethodException e) {
+ return null;
+ }
+ }
+
+ static {
+ MH_LOOKUP = MethodHandles.lookup();
+ LINKER = Linker.nativeLinker();
+ SYM_LOOKUP = SymbolLookup.loaderLookup().or(LINKER.defaultLookup());
+ FunctionDescriptor mallocDescriptor =
+ FunctionDescriptor.of(ADDRESS, JAVA_LONG);
+ Optional malloc_symbol = SYM_LOOKUP.find("malloc");
+ @SuppressWarnings("restricted")
+ MethodHandle tmp1 = LINKER.downcallHandle(malloc_symbol.get(), mallocDescriptor);
+ malloc_handle = tmp1;
+
+ FunctionDescriptor createFaceDescriptor =
+ FunctionDescriptor.of(ADDRESS, ADDRESS);
+ Optional create_face_symbol = SYM_LOOKUP.find("HBCreateFace");
+ @SuppressWarnings("restricted")
+ MethodHandle tmp2 = LINKER.downcallHandle(create_face_symbol.get(), createFaceDescriptor);
+ create_face_handle = tmp2;
+
+ FunctionDescriptor disposeFaceDescriptor = FunctionDescriptor.ofVoid(ADDRESS);
+ Optional dispose_face_symbol = SYM_LOOKUP.find("HBDisposeFace");
+ @SuppressWarnings("restricted")
+ MethodHandle tmp3 = LINKER.downcallHandle(dispose_face_symbol.get(), disposeFaceDescriptor);
+ dispose_face_handle = tmp3;
+
+ FunctionDescriptor shapeDesc = FunctionDescriptor.ofVoid(
+ //JAVA_INT, // return type
+ JAVA_FLOAT, // ptSize
+ ADDRESS, // matrix
+ ADDRESS, // face
+ ADDRESS, // chars
+ JAVA_INT, // len
+ JAVA_INT, // script
+ JAVA_INT, // offset
+ JAVA_INT, // limit
+ JAVA_INT, // baseIndex
+ JAVA_FLOAT, // startX
+ JAVA_FLOAT, // startY
+ JAVA_INT, // flags,
+ JAVA_INT, // slot,
+ ADDRESS, // ptr to harfbuzz font_funcs object.
+ ADDRESS); // store_results_fn
+
+ Optional shape_sym = SYM_LOOKUP.find("jdk_hb_shape");
+ @SuppressWarnings("restricted")
+ MethodHandle tmp4 = LINKER.downcallHandle(shape_sym.get(), shapeDesc);
+ jdk_hb_shape_handle = tmp4;
+
+ Arena garena = Arena.global(); // creating stubs that exist until VM exit.
+ FunctionDescriptor get_var_glyph_fd = getFunctionDescriptor(JAVA_INT, // return type
+ ADDRESS, ADDRESS, JAVA_INT, JAVA_INT, ADDRESS, ADDRESS); // arg types
+ MethodHandle get_var_glyph_mh =
+ getMethodHandle("get_variation_glyph", get_var_glyph_fd);
+ @SuppressWarnings("restricted")
+ MemorySegment tmp5 = LINKER.upcallStub(get_var_glyph_mh, get_var_glyph_fd, garena);
+ get_var_glyph_stub = tmp5;
+
+ FunctionDescriptor get_nominal_glyph_fd = getFunctionDescriptor(JAVA_INT, // return type
+ ADDRESS, ADDRESS, JAVA_INT, ADDRESS, ADDRESS); // arg types
+ MethodHandle get_nominal_glyph_mh =
+ getMethodHandle("get_nominal_glyph", get_nominal_glyph_fd);
+ @SuppressWarnings("restricted")
+ MemorySegment tmp6 = LINKER.upcallStub(get_nominal_glyph_mh, get_nominal_glyph_fd, garena);
+ get_nominal_glyph_stub = tmp6;
+
+ FunctionDescriptor get_h_adv_fd = getFunctionDescriptor(JAVA_INT, // return type
+ ADDRESS, ADDRESS, JAVA_INT, ADDRESS); // arg types
+ MethodHandle get_h_adv_mh =
+ getMethodHandle("get_glyph_h_advance", get_h_adv_fd);
+ @SuppressWarnings("restricted")
+ MemorySegment tmp7 = LINKER.upcallStub(get_h_adv_mh, get_h_adv_fd, garena);
+ get_h_advance_stub = tmp7;
+
+ FunctionDescriptor get_v_adv_fd = getFunctionDescriptor(JAVA_INT, // return type
+ ADDRESS, ADDRESS, JAVA_INT, ADDRESS); // arg types
+ MethodHandle get_v_adv_mh =
+ getMethodHandle("get_glyph_v_advance", get_v_adv_fd);
+ @SuppressWarnings("restricted")
+ MemorySegment tmp8 = LINKER.upcallStub(get_v_adv_mh, get_v_adv_fd, garena);
+ get_v_advance_stub = tmp8;
+
+ FunctionDescriptor get_contour_pt_fd = getFunctionDescriptor(JAVA_INT, // return type
+ ADDRESS, ADDRESS, JAVA_INT, JAVA_INT, ADDRESS, ADDRESS, ADDRESS); // arg types
+ MethodHandle get_contour_pt_mh =
+ getMethodHandle("get_glyph_contour_point", get_contour_pt_fd);
+ @SuppressWarnings("restricted")
+ MemorySegment tmp9 = LINKER.upcallStub(get_contour_pt_mh, get_contour_pt_fd, garena);
+ get_contour_pt_stub = tmp9;
+
+ /* Having now created the font upcall stubs, we can call down to create
+ * the native harfbuzz object holding these.
+ */
+ FunctionDescriptor createFontFuncsDescriptor = FunctionDescriptor.of(
+ ADDRESS, // hb_font_funcs* return type
+ ADDRESS, // glyph_fn upcall stub
+ ADDRESS, // variation_fn upcall stub
+ ADDRESS, // h_advance_fn upcall stub
+ ADDRESS, // v_advance_fn upcall stub
+ ADDRESS); // contour_pt_fn upcall stub
+ Optional create_font_funcs_symbol = SYM_LOOKUP.find("HBCreateFontFuncs");
+ @SuppressWarnings("restricted")
+ MethodHandle create_font_funcs_handle =
+ LINKER.downcallHandle(create_font_funcs_symbol.get(), createFontFuncsDescriptor);
+
+ MemorySegment s = null;
+ try {
+ s = (MemorySegment)create_font_funcs_handle.invokeExact(
+ get_nominal_glyph_stub,
+ get_var_glyph_stub,
+ get_h_advance_stub,
+ get_v_advance_stub,
+ get_contour_pt_stub);
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ hb_jdk_font_funcs_struct = s;
+
+ FunctionDescriptor store_layout_fd =
+ FunctionDescriptor.ofVoid(
+ JAVA_INT, // slot
+ JAVA_INT, // baseIndex
+ JAVA_INT, // offset
+ JAVA_FLOAT, // startX
+ JAVA_FLOAT, // startX
+ JAVA_FLOAT, // devScale
+ JAVA_INT, // charCount
+ JAVA_INT, // glyphCount
+ ADDRESS, // glyphInfo
+ ADDRESS); // glyphPos
+ MethodHandle store_layout_mh =
+ getMethodHandle("store_layout_results", store_layout_fd);
+ @SuppressWarnings("restricted")
+ MemorySegment tmp10 = LINKER.upcallStub(store_layout_mh, store_layout_fd, garena);
+ store_layout_results_stub = tmp10;
+
+ x_offsetHandle = getVarHandle(PositionLayout, "x_offset");
+ y_offsetHandle = getVarHandle(PositionLayout, "y_offset");
+ x_advanceHandle = getVarHandle(PositionLayout, "x_advance");
+ y_advanceHandle = getVarHandle(PositionLayout, "y_advance");
+ codePointHandle = getVarHandle(GlyphInfoLayout, "codepoint");
+ clusterHandle = getVarHandle(GlyphInfoLayout, "cluster");
+ }
+
+
+ /*
+ * This is expensive but it is done just once per font.
+ * The unbound stub could be cached but the savings would
+ * be very low in the only case it is used.
+ */
+ @SuppressWarnings("restricted")
+ private static MemorySegment getBoundUpcallStub
+ (Arena arena, Class> clazz, Object bindArg, String mName,
+ MemoryLayout retType, MemoryLayout... argTypes) {
+
+ try {
+ FunctionDescriptor nativeDescriptor =
+ (retType == null) ?
+ FunctionDescriptor.ofVoid(argTypes) :
+ FunctionDescriptor.of(retType, argTypes);
+ MethodType mType = nativeDescriptor.toMethodType();
+ mType = mType.insertParameterTypes(0, clazz);
+ MethodHandle mh = MH_LOOKUP.findStatic(HBShaper.class, mName, mType);
+ MethodHandle bound_handle = mh.bindTo(bindArg);
+ return LINKER.upcallStub(bound_handle, nativeDescriptor, arena);
+ } catch (IllegalAccessException | NoSuchMethodException e) {
+ return null;
+ }
+ }
+
+ private static int get_nominal_glyph(
+ MemorySegment font_ptr, /* Not used */
+ MemorySegment font_data, /* Not used */
+ int unicode,
+ MemorySegment glyph, /* pointer to location to store glyphID */
+ MemorySegment user_data /* Not used */
+ ) {
+
+ Font2D font2D = scopedVars.get().font();
+ int glyphID = font2D.charToGlyph(unicode);
+ @SuppressWarnings("restricted")
+ MemorySegment glyphIDPtr = glyph.reinterpret(4);
+ glyphIDPtr.setAtIndex(JAVA_INT, 0, glyphID);
+ return (glyphID != 0) ? 1 : 0;
+ }
+
+ private static int get_variation_glyph(
+ MemorySegment font_ptr, /* Not used */
+ MemorySegment font_data, /* Not used */
+ int unicode,
+ int variation_selector,
+ MemorySegment glyph, /* pointer to location to store glyphID */
+ MemorySegment user_data /* Not used */
+ ) {
+ Font2D font2D = scopedVars.get().font();
+ int glyphID = font2D.charToVariationGlyph(unicode, variation_selector);
+ @SuppressWarnings("restricted")
+ MemorySegment glyphIDPtr = glyph.reinterpret(4);
+ glyphIDPtr.setAtIndex(JAVA_INT, 0, glyphID);
+ return (glyphID != 0) ? 1 : 0;
+ }
+
+ private static final float HBFloatToFixedScale = ((float)(1 << 16));
+ private static final int HBFloatToFixed(float f) {
+ return ((int)((f) * HBFloatToFixedScale));
+ }
+
+ private static int get_glyph_h_advance(
+ MemorySegment font_ptr, /* Not used */
+ MemorySegment font_data, /* Not used */
+ int glyph,
+ MemorySegment user_data /* Not used */
+ ) {
+ FontStrike strike = scopedVars.get().fontStrike();
+ Point2D.Float pt = strike.getGlyphMetrics(glyph);
+ return (pt != null) ? HBFloatToFixed(pt.x) : 0;
+ }
+
+ private static int get_glyph_v_advance(
+ MemorySegment font_ptr, /* Not used */
+ MemorySegment font_data, /* Not used */
+ int glyph,
+ MemorySegment user_data /* Not used */
+ ) {
+
+ FontStrike strike = scopedVars.get().fontStrike();
+ Point2D.Float pt = strike.getGlyphMetrics(glyph);
+ return (pt != null) ? HBFloatToFixed(pt.y) : 0;
+ }
+
+ /*
+ * This class exists to make the code that uses it less verbose
+ */
+ private static class IntPtr {
+ MemorySegment seg;
+ IntPtr(MemorySegment seg) {
+ }
+
+ void set(int i) {
+ seg.setAtIndex(JAVA_INT, 0, i);
+ }
+ }
+
+ private static int get_glyph_contour_point(
+ MemorySegment font_ptr, /* Not used */
+ MemorySegment font_data, /* Not used */
+ int glyph,
+ int point_index,
+ MemorySegment x_ptr, /* ptr to return x */
+ MemorySegment y_ptr, /* ptr to return y */
+ MemorySegment user_data /* Not used */
+ ) {
+ IntPtr x = new IntPtr(x_ptr);
+ IntPtr y = new IntPtr(y_ptr);
+
+ if ((glyph & 0xfffe) == 0xfffe) {
+ x.set(0);
+ y.set(0);
+ return 1;
+ }
+
+ FontStrike strike = scopedVars.get().fontStrike();
+ Point2D.Float pt = ((PhysicalStrike)strike).getGlyphPoint(glyph, point_index);
+ x.set(HBFloatToFixed(pt.x));
+ y.set(HBFloatToFixed(pt.y));
+
+ return 1;
+ }
+
+ record ScopedVars (
+ Font2D font,
+ FontStrike fontStrike,
+ GVData gvData,
+ Point2D.Float point) {}
+
+ static final ScopedValue scopedVars = ScopedValue.newInstance();
+
+ static void shape(
+ Font2D font2D,
+ FontStrike fontStrike,
+ float ptSize,
+ float[] mat,
+ MemorySegment hbface,
+ char[] text,
+ GVData gvData,
+ int script,
+ int offset,
+ int limit,
+ int baseIndex,
+ Point2D.Float startPt,
+ int flags,
+ int slot) {
+
+ /*
+ * ScopedValue is needed so that call backs into Java during
+ * shaping can locate the correct instances of these to query or update.
+ * The alternative of creating bound method handles is far too slow.
+ */
+ ScopedVars vars = new ScopedVars(font2D, fontStrike, gvData, startPt);
+ ScopedValue.where(scopedVars, vars)
+ .run(() -> {
+
+ try (Arena arena = Arena.ofConfined()) {
+
+ float startX = (float)startPt.getX();
+ float startY = (float)startPt.getY();
+
+ MemorySegment matrix = arena.allocateFrom(JAVA_FLOAT, mat);
+ MemorySegment chars = arena.allocateFrom(JAVA_CHAR, text);
+
+ /*int ret =*/ jdk_hb_shape_handle.invokeExact(
+ ptSize, matrix, hbface, chars, text.length,
+ script, offset, limit,
+ baseIndex, startX, startY, flags, slot,
+ hb_jdk_font_funcs_struct,
+ store_layout_results_stub);
+ } catch (Throwable t) {
+ }
+ });
+ }
+
+ private static int getFontTableData(Font2D font2D,
+ int tag,
+ MemorySegment data_ptr_out) {
+
+ /*
+ * On return, the data_out_ptr will point to memory allocated by native malloc,
+ * so it will be freed by the caller using native free - when it is
+ * done with it.
+ */
+ @SuppressWarnings("restricted")
+ MemorySegment data_ptr = data_ptr_out.reinterpret(ADDRESS.byteSize());
+ if (tag == 0) {
+ data_ptr.setAtIndex(ADDRESS, 0, NULL);
+ return 0;
+ }
+ byte[] data = font2D.getTableBytes(tag);
+ if (data == null) {
+ data_ptr.setAtIndex(ADDRESS, 0, NULL);
+ return 0;
+ }
+ int len = data.length;
+ MemorySegment zero_len = NULL;
+ try {
+ zero_len = (MemorySegment)malloc_handle.invokeExact((long)len);
+ } catch (Throwable t) {
+ }
+ if (zero_len.equals(NULL)) {
+ data_ptr.setAtIndex(ADDRESS, 0, NULL);
+ return 0;
+ }
+ @SuppressWarnings("restricted")
+ MemorySegment mem = zero_len.reinterpret(len);
+ MemorySegment.copy(data, 0, mem, JAVA_BYTE, 0, len);
+ data_ptr.setAtIndex(ADDRESS, 0, mem);
+ return len;
+ }
+
+ /* WeakHashMap is used so that we do not retain temporary fonts
+ *
+ * The value is a class that implements the 2D Disposer, so
+ * that the native resources for temp. fonts can be freed.
+ *
+ * Installed fonts should never be cleared from the map as
+ * they are permanently referenced.
+ */
+ private static final WeakHashMap
+ faceMap = new WeakHashMap<>();
+
+ static MemorySegment getFace(Font2D font2D) {
+ FaceRef ref;
+ synchronized (faceMap) {
+ ref = faceMap.computeIfAbsent(font2D, FaceRef::new);
+ }
+ return ref.getFace();
+ }
+
+ private static class FaceRef implements DisposerRecord {
+ private Font2D font2D;
+ private MemorySegment face;
+ // get_table_data_fn uses an Arena managed by GC,
+ // so we need to keep a reference to it here until
+ // this FaceRef is collected.
+ private MemorySegment get_table_data_fn;
+
+ private FaceRef(Font2D font) {
+ this.font2D = font;
+ }
+
+ private synchronized MemorySegment getFace() {
+ if (face == null) {
+ createFace();
+ if (face != null) {
+ Disposer.addObjectRecord(font2D, this);
+ }
+ font2D = null;
+ }
+ return face;
+ }
+
+ private void createFace() {
+ try {
+ get_table_data_fn = getBoundUpcallStub(Arena.ofAuto(),
+ Font2D.class,
+ font2D, // bind arg
+ "getFontTableData", // method name
+ JAVA_INT, // return type
+ JAVA_INT, ADDRESS); // arg types
+ if (get_table_data_fn == null) {
+ return;
+ }
+ face = (MemorySegment)create_face_handle.invokeExact(get_table_data_fn);
+ } catch (Throwable t) {
+ }
+ }
+
+ @Override
+ public void dispose() {
+ try {
+ dispose_face_handle.invokeExact(face);
+ } catch (Throwable t) {
+ }
+ }
+ }
+
+
+ /* Upcall to receive results of layout */
+ private static void store_layout_results(
+ int slot,
+ int baseIndex,
+ int offset,
+ float startX,
+ float startY,
+ float devScale,
+ int charCount,
+ int glyphCount,
+ MemorySegment /* hb_glyph_info_t* */ glyphInfo,
+ MemorySegment /* hb_glyph_position_t* */ glyphPos
+ ) {
+
+ GVData gvdata = scopedVars.get().gvData();
+ Point2D.Float startPt = scopedVars.get().point();
+ float x=0, y=0;
+ float advX, advY;
+ float scale = 1.0f / HBFloatToFixedScale / devScale;
+
+ int initialCount = gvdata._count;
+
+ int maxGlyphs = (charCount > glyphCount) ? charCount : glyphCount;
+ int maxStore = maxGlyphs + initialCount;
+ boolean needToGrow = (maxStore > gvdata._glyphs.length) ||
+ ((maxStore * 2 + 2) > gvdata._positions.length);
+ if (needToGrow) {
+ gvdata.grow(maxStore-initialCount);
+ }
+
+ int glyphPosLen = glyphCount * 2 + 2;
+ long posSize = glyphPosLen * PositionLayout.byteSize();
+ @SuppressWarnings("restricted")
+ MemorySegment glyphPosArr = glyphPos.reinterpret(posSize);
+
+ long glyphInfoSize = glyphCount * GlyphInfoLayout.byteSize();
+ @SuppressWarnings("restricted")
+ MemorySegment glyphInfoArr = glyphInfo.reinterpret(glyphInfoSize);
+
+ for (int i = 0; i < glyphCount; i++) {
+ int storei = i + initialCount;
+ int cluster = (int)clusterHandle.get(glyphInfoArr, (long)i) - offset;
+ gvdata._indices[storei] = baseIndex + cluster;
+ int codePoint = (int)codePointHandle.get(glyphInfoArr, (long)i);
+ gvdata._glyphs[storei] = (slot | codePoint);
+ int x_offset = (int)x_offsetHandle.get(glyphPosArr, (long)i);
+ int y_offset = (int)y_offsetHandle.get(glyphPosArr, (long)i);
+ gvdata._positions[(storei*2)] = startX + x + (x_offset * scale);
+ gvdata._positions[(storei*2)+1] = startY + y - (y_offset * scale);
+ int x_advance = (int)x_advanceHandle.get(glyphPosArr, (long)i);
+ int y_advance = (int)y_advanceHandle.get(glyphPosArr, (long)i);
+ x += x_advance * scale;
+ y += y_advance * scale;
+ }
+ int storeadv = initialCount + glyphCount;
+ gvdata._count = storeadv;
+ // The final slot in the positions array is important
+ // because when the GlyphVector is created from this
+ // data it determines the overall advance of the glyphvector
+ // and this is used in positioning the next glyphvector
+ // during rendering where text is broken into runs.
+ // We also need to report it back into "pt", so layout can
+ // pass it back down for any next run.
+ advX = startX + x;
+ advY = startY + y;
+ gvdata._positions[(storeadv*2)] = advX;
+ gvdata._positions[(storeadv*2)+1] = advY;
+ startPt.x = advX;
+ startPt.y = advY;
+ }
+}
diff --git a/src/java.desktop/share/classes/sun/font/SunLayoutEngine.java b/src/java.desktop/share/classes/sun/font/SunLayoutEngine.java
index bc3e6f2dad7c6..c291e45b5580c 100644
--- a/src/java.desktop/share/classes/sun/font/SunLayoutEngine.java
+++ b/src/java.desktop/share/classes/sun/font/SunLayoutEngine.java
@@ -35,7 +35,10 @@
import sun.java2d.DisposerRecord;
import java.awt.geom.Point2D;
+import java.lang.foreign.MemorySegment;
import java.lang.ref.SoftReference;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.concurrent.ConcurrentHashMap;
import java.util.WeakHashMap;
@@ -162,17 +165,38 @@ private long getFacePtr(Font2D font2D) {
return ref.getNativePtr();
}
+ static boolean useFFM = true;
+ static {
+ @SuppressWarnings("removal")
+ String prop = AccessController.doPrivileged(
+ (PrivilegedAction) () ->
+ System.getProperty("sun.font.layout.ffm", "true"));
+ useFFM = "true".equals(prop);
+
+ }
+
public void layout(FontStrikeDesc desc, float[] mat, float ptSize, int gmask,
int baseIndex, TextRecord tr, int typo_flags,
Point2D.Float pt, GVData data) {
+
Font2D font = key.font();
FontStrike strike = font.getStrike(desc);
- long pFace = getFacePtr(font);
- if (pFace != 0) {
- shape(font, strike, ptSize, mat, pFace,
+ if (useFFM) {
+ MemorySegment face = HBShaper.getFace(font);
+ if (face != null) {
+ HBShaper.shape(font, strike, ptSize, mat, face,
+ tr.text, data, key.script(),
+ tr.start, tr.limit, baseIndex, pt,
+ typo_flags, gmask);
+ }
+ } else {
+ long pFace = getFacePtr(font);
+ if (pFace != 0) {
+ shape(font, strike, ptSize, mat, pFace,
tr.text, data, key.script(),
tr.start, tr.limit, baseIndex, pt,
typo_flags, gmask);
+ }
}
}
diff --git a/src/java.desktop/share/native/libfontmanager/HBShaper_Panama.c b/src/java.desktop/share/native/libfontmanager/HBShaper_Panama.c
new file mode 100644
index 0000000000000..94289db7046c5
--- /dev/null
+++ b/src/java.desktop/share/native/libfontmanager/HBShaper_Panama.c
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include
+#include "hb.h"
+#include "hb-jdk-p.h"
+#include "hb-ot.h"
+#include "scriptMapping.h"
+
+static float euclidianDistance(float a, float b)
+{
+ float root;
+ if (a < 0) {
+ a = -a;
+ }
+
+ if (b < 0) {
+ b = -b;
+ }
+
+ if (a == 0) {
+ return b;
+ }
+
+ if (b == 0) {
+ return a;
+ }
+
+ /* Do an initial approximation, in root */
+ root = a > b ? a + (b / 2) : b + (a / 2);
+
+ /* An unrolled Newton-Raphson iteration sequence */
+ root = (root + (a * (a / root)) + (b * (b / root)) + 1) / 2;
+ root = (root + (a * (a / root)) + (b * (b / root)) + 1) / 2;
+ root = (root + (a * (a / root)) + (b * (b / root)) + 1) / 2;
+
+ return root;
+}
+
+#define TYPO_KERN 0x00000001
+#define TYPO_LIGA 0x00000002
+#define TYPO_RTL 0x80000000
+
+JDKEXPORT int jdk_hb_shape(
+ float ptSize,
+ float *matrix,
+ void* pFace,
+ unsigned short *chars,
+ int len,
+ int script,
+ int offset,
+ int limit,
+ int baseIndex,
+ float startX,
+ float startY,
+ int flags,
+ int slot,
+ hb_font_funcs_t* font_funcs,
+ store_layoutdata_func_t store_layout_results_fn
+ ) {
+
+ hb_buffer_t *buffer;
+ hb_face_t* hbface;
+ hb_font_t* hbfont;
+ int glyphCount;
+ hb_glyph_info_t *glyphInfo;
+ hb_glyph_position_t *glyphPos;
+ hb_direction_t direction = HB_DIRECTION_LTR;
+ hb_feature_t *features = NULL;
+ int featureCount = 0;
+ char* kern = (flags & TYPO_KERN) ? "kern" : "-kern";
+ char* liga = (flags & TYPO_LIGA) ? "liga" : "-liga";
+ int ret;
+ unsigned int buflen;
+
+ float devScale = 1.0f;
+ if (getenv("HB_NODEVTX") != NULL) {
+ float xPtSize = euclidianDistance(matrix[0], matrix[1]);
+ float yPtSize = euclidianDistance(matrix[2], matrix[3]);
+ devScale = xPtSize / ptSize;
+ }
+
+ hbface = (hb_face_t*)pFace;
+ hbfont = jdk_font_create_hbp(hbface,
+ ptSize, devScale, NULL,
+ font_funcs);
+
+ buffer = hb_buffer_create();
+ hb_buffer_set_script(buffer, getHBScriptCode(script));
+ hb_buffer_set_language(buffer,
+ hb_ot_tag_to_language(HB_OT_TAG_DEFAULT_LANGUAGE));
+ if ((flags & TYPO_RTL) != 0) {
+ direction = HB_DIRECTION_RTL;
+ }
+ hb_buffer_set_direction(buffer, direction);
+ hb_buffer_set_cluster_level(buffer,
+ HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);
+
+ int charCount = limit - offset;
+ hb_buffer_add_utf16(buffer, chars, len, offset, charCount);
+
+ features = calloc(2, sizeof(hb_feature_t));
+ if (features) {
+ hb_feature_from_string(kern, -1, &features[featureCount++]);
+ hb_feature_from_string(liga, -1, &features[featureCount++]);
+ }
+
+ hb_shape_full(hbfont, buffer, features, featureCount, 0);
+ glyphCount = hb_buffer_get_length(buffer);
+ glyphInfo = hb_buffer_get_glyph_infos(buffer, 0);
+ glyphPos = hb_buffer_get_glyph_positions(buffer, &buflen);
+
+ ret = (*store_layout_results_fn)
+ (slot, baseIndex, offset, startX, startY, devScale,
+ charCount, glyphCount, glyphInfo, glyphPos);
+
+ hb_buffer_destroy (buffer);
+ hb_font_destroy(hbfont);
+ if (features != NULL) {
+ free(features);
+ }
+ return ret;
+}
diff --git a/src/java.desktop/share/native/libfontmanager/hb-jdk-font-p.cc b/src/java.desktop/share/native/libfontmanager/hb-jdk-font-p.cc
new file mode 100644
index 0000000000000..590c273d151a4
--- /dev/null
+++ b/src/java.desktop/share/native/libfontmanager/hb-jdk-font-p.cc
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include "hb.h"
+#include "hb-jdk-p.h"
+#include
+
+#if defined(__GNUC__) && __GNUC__ >= 4
+#define HB_UNUSED __attribute__((unused))
+#else
+#define HB_UNUSED
+#endif
+
+static hb_bool_t
+hb_jdk_get_glyph_h_origin (hb_font_t *font HB_UNUSED,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph HB_UNUSED,
+ hb_position_t *x HB_UNUSED,
+ hb_position_t *y HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ /* We always work in the horizontal coordinates. */
+ return true;
+}
+
+static hb_bool_t
+hb_jdk_get_glyph_v_origin (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t glyph,
+ hb_position_t *x,
+ hb_position_t *y,
+ void *user_data HB_UNUSED)
+{
+ return false;
+}
+
+static hb_position_t
+hb_jdk_get_glyph_h_kerning (hb_font_t *font,
+ void *font_data,
+ hb_codepoint_t lejdk_glyph,
+ hb_codepoint_t right_glyph,
+ void *user_data HB_UNUSED)
+{
+ /* Not implemented. This seems to be in the HB API
+ * as a way to fall back to Freetype's kerning support
+ * which could be based on some on-the fly glyph analysis.
+ * But more likely it reads the kern table. That is easy
+ * enough code to add if we find a need to fall back
+ * to that instead of using gpos. It seems like if
+ * there is a gpos table at all, the practice is to
+ * use that and ignore kern, no matter that gpos does
+ * not implement the kern feature.
+ */
+ return 0;
+}
+
+static hb_position_t
+hb_jdk_get_glyph_v_kerning (hb_font_t *font HB_UNUSED,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t top_glyph HB_UNUSED,
+ hb_codepoint_t bottom_glyph HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ /* OpenType doesn't have vertical-kerning other than GPOS. */
+ return 0;
+}
+
+static hb_bool_t
+hb_jdk_get_glyph_extents (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t glyph,
+ hb_glyph_extents_t *extents,
+ void *user_data HB_UNUSED)
+{
+ /* TODO */
+ return false;
+}
+
+static hb_bool_t
+hb_jdk_get_glyph_name (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t glyph,
+ char *name, unsigned int size,
+ void *user_data HB_UNUSED)
+{
+ return false;
+}
+
+static hb_bool_t
+hb_jdk_get_glyph_from_name (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ const char *name, int len,
+ hb_codepoint_t *glyph,
+ void *user_data HB_UNUSED)
+{
+ return false;
+}
+
+extern "C" {
+/*
+ * This is called exactly once, from Java code, and the result is
+ * used by all downcalls to do shaping(), installing the functions
+ * on the hb_font.
+ * The parameters are all FFM upcall stubs.
+ * I was surprised we can cache these native pointers to upcall
+ * stubs on the native side, but it seems to be fine using the global Arena.
+ * These stubs don't need to be bound to a particular font or strike
+ * since they use Scoped Locals to access the data they need to operate on.
+ * This is how we can cache them.
+ * Also caching the hb_font_funcs_t on the Java side means we can
+ * marshall fewer args to the calls to shape().
+ */
+JDKEXPORT hb_font_funcs_t *
+HBCreateFontFuncs(hb_font_get_nominal_glyph_func_t nominal_fn,
+ hb_font_get_variation_glyph_func_t variation_fn,
+ hb_font_get_glyph_h_advance_func_t h_advance_fn,
+ hb_font_get_glyph_v_advance_func_t v_advance_fn,
+ hb_font_get_glyph_contour_point_func_t contour_pt_fn)
+{
+ hb_font_funcs_t *ff = hb_font_funcs_create();
+
+ hb_font_funcs_set_nominal_glyph_func(ff, nominal_fn, NULL, NULL);
+ hb_font_funcs_set_variation_glyph_func(ff, variation_fn, NULL, NULL);
+ hb_font_funcs_set_glyph_h_advance_func(ff, h_advance_fn, NULL, NULL);
+ hb_font_funcs_set_glyph_v_advance_func(ff, v_advance_fn, NULL, NULL);
+ hb_font_funcs_set_glyph_contour_point_func(ff, contour_pt_fn, NULL, NULL);
+
+ /* These are all simple default implementations */
+ hb_font_funcs_set_glyph_h_origin_func(ff,
+ hb_jdk_get_glyph_h_origin, NULL, NULL);
+ hb_font_funcs_set_glyph_v_origin_func(ff,
+ hb_jdk_get_glyph_v_origin, NULL, NULL);
+ hb_font_funcs_set_glyph_h_kerning_func(ff,
+ hb_jdk_get_glyph_h_kerning, NULL, NULL);
+ hb_font_funcs_set_glyph_v_kerning_func(ff,
+ hb_jdk_get_glyph_v_kerning, NULL, NULL);
+ hb_font_funcs_set_glyph_extents_func(ff,
+ hb_jdk_get_glyph_extents, NULL, NULL);
+ hb_font_funcs_set_glyph_name_func(ff,
+ hb_jdk_get_glyph_name, NULL, NULL);
+ hb_font_funcs_set_glyph_from_name_func(ff,
+ hb_jdk_get_glyph_from_name, NULL, NULL);
+ hb_font_funcs_make_immutable(ff); // done setting functions.
+
+ return ff;
+}
+
+} /* extern "C" */
+
+static void _do_nothing(void) {
+}
+
+typedef int (*GetTableDataFn) (int tag, char **dataPtr);
+
+static hb_blob_t *
+reference_table(hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) {
+
+ // HB_TAG_NONE is 0 and is used to get the whole font file.
+ // It is not expected to be needed for JDK.
+ if (tag == 0) {
+ return NULL;
+ }
+
+ // This has to be a method handle bound to the right Font2D
+ GetTableDataFn getDataFn = (GetTableDataFn)user_data;
+
+ char *tableData = NULL;
+ int length = (*getDataFn)(tag, &tableData);
+ if ((length == 0) || (tableData == NULL)) {
+ return NULL;
+ }
+
+ /* Can't call this non-exported hb fn from Java so can't have
+ * a Java version of the reference_table fn, which is why it
+ * has as a parameter the upcall stub that will be used.
+ * And the memory is freed by 'free' so the upcall needs to
+ * call back down to malloc to allocate it.
+ */
+ return hb_blob_create((const char *)tableData, length,
+ HB_MEMORY_MODE_WRITABLE,
+ tableData, free);
+}
+
+extern "C" {
+
+JDKEXPORT hb_face_t* HBCreateFace(GetTableDataFn *get_data_upcall_fn) {
+
+ hb_face_t *face = hb_face_create_for_tables(reference_table, get_data_upcall_fn, NULL);
+ return face;
+}
+
+JDKEXPORT void HBDisposeFace(hb_face_t* face) {
+ hb_face_destroy(face);
+}
+
+// Use 16.16 for better precision than 26.6
+#define HBFloatToFixedScale ((float)(1 << 16))
+#define HBFloatToFixed(f) ((unsigned int)((f) * HBFloatToFixedScale))
+
+hb_font_t* jdk_font_create_hbp(
+ hb_face_t* face,
+ float ptSize, float devScale,
+ hb_destroy_func_t destroy,
+ hb_font_funcs_t *font_funcs) {
+
+ hb_font_t *font;
+
+ font = hb_font_create(face);
+ hb_font_set_funcs(font,
+ font_funcs,
+ NULL,
+ (hb_destroy_func_t)_do_nothing);
+ hb_font_set_scale(font,
+ HBFloatToFixed(ptSize*devScale),
+ HBFloatToFixed(ptSize*devScale));
+ return font;
+}
+
+} // extern "C"
diff --git a/src/java.desktop/share/native/libfontmanager/hb-jdk-p.h b/src/java.desktop/share/native/libfontmanager/hb-jdk-p.h
new file mode 100644
index 0000000000000..58d39816b7591
--- /dev/null
+++ b/src/java.desktop/share/native/libfontmanager/hb-jdk-p.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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 HB_JDK_H
+#define HB_JDK_H
+
+#ifndef JDKEXPORT
+ #ifdef WIN32
+ #define JDKEXPORT __declspec(dllexport)
+ #else
+ #if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
+ #ifdef ARM
+ #define JDKEXPORT __attribute__((externally_visible,visibility("default")))
+ #else
+ #define JDKEXPORT __attribute__((visibility("default")))
+ #endif
+ #else
+ #define JDKEXPORT
+ #endif
+ #endif
+#endif
+
+#include "hb.h"
+
+# ifdef __cplusplus
+extern "C" {
+#endif
+
+
+hb_font_t* jdk_font_create_hbp(
+ hb_face_t* face,
+ float ptSize, float devScale,
+ hb_destroy_func_t destroy,
+ hb_font_funcs_t* font_funcs);
+
+
+typedef int (*store_layoutdata_func_t)
+ (int slot, int baseIndex, int offset,
+ float startX, float startY, float devScale,
+ int charCount, int glyphCount,
+ hb_glyph_info_t *glyphInfo, hb_glyph_position_t *glyphPos);
+
+JDKEXPORT int jdk_hb_shape(
+
+ float ptSize,
+ float *matrix,
+ void* pFace,
+ unsigned short* chars,
+ int len,
+ int script,
+ int offset,
+ int limit,
+ int baseIndex, // used only to store results.
+ float startX, // used only to store results.
+ float startY, // used only to store results.
+ int flags,
+ int slot, // used only to store results
+ // Provide upcall Method handles that harfbuzz needs
+ hb_font_funcs_t* font_funcs,
+ store_layoutdata_func_t store_layout_data_upcall
+);
+
+# ifdef __cplusplus
+}
+#endif
+
+#endif /* HB_JDK_H */
diff --git a/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiIn.cpp b/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiIn.cpp
index 4d1f4fee19e9e..91e1a50c66129 100644
--- a/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiIn.cpp
+++ b/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiIn.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -301,7 +301,7 @@ INT32 prepareBuffers(MidiDeviceHandle* handle) {
}
sysex = (SysExQueue*) handle->longBuffers;
for (i = 0; icount; i++) {
- MIDIHDR* hdr = &(sysex->header[i]);
+ MIDIHDR* hdr = &(sysex->headerInfo[i].header);
midiInPrepareHeader((HMIDIIN) handle->deviceHandle, hdr, sizeof(MIDIHDR));
err = midiInAddBuffer((HMIDIIN) handle->deviceHandle, hdr, sizeof(MIDIHDR));
}
@@ -320,7 +320,7 @@ INT32 unprepareBuffers(MidiDeviceHandle* handle) {
}
sysex = (SysExQueue*) handle->longBuffers;
for (i = 0; icount; i++) {
- err = midiInUnprepareHeader((HMIDIIN) handle->deviceHandle, &(sysex->header[i]), sizeof(MIDIHDR));
+ err = midiInUnprepareHeader((HMIDIIN) handle->deviceHandle, &(sysex->headerInfo[i].header), sizeof(MIDIHDR));
}
MIDIIN_CHECK_ERROR;
return (INT32) err;
@@ -502,7 +502,7 @@ void MIDI_IN_ReleaseMessage(MidiDeviceHandle* handle, MidiMessage* msg) {
}
sysex = (SysExQueue*) handle->longBuffers;
if (msg->type == LONG_MESSAGE && sysex) {
- MIDIHDR* hdr = &(sysex->header[msg->data.l.index]);
+ MIDIHDR* hdr = &(sysex->headerInfo[msg->data.l.index].header);
//fprintf(stdout, "ReleaseMessage index %d\n", msg->data.l.index); fflush(stdout);
hdr->dwBytesRecorded = 0;
midiInAddBuffer((HMIDIIN) handle->deviceHandle, hdr, sizeof(MIDIHDR));
diff --git a/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiOut.c b/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiOut.c
index 01f2cc866d4b9..dc872d541bcc0 100644
--- a/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiOut.c
+++ b/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiOut.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -161,7 +161,7 @@ INT32 unprepareLongBuffers(MidiDeviceHandle* handle) {
}
sysex = (SysExQueue*) handle->longBuffers;
for (i = 0; icount; i++) {
- MIDIHDR* hdr = &(sysex->header[i]);
+ MIDIHDR* hdr = &(sysex->headerInfo[i].header);
if (hdr->dwFlags) {
err = midiOutUnprepareHeader((HMIDIOUT) handle->deviceHandle, hdr, sizeof(MIDIHDR));
}
@@ -170,8 +170,9 @@ INT32 unprepareLongBuffers(MidiDeviceHandle* handle) {
return (INT32) err;
}
-INT32 freeLongBuffer(MIDIHDR* hdr, HMIDIOUT deviceHandle, INT32 minToLeaveData) {
+INT32 freeLongBuffer(MidiHeaderInfo* info, HMIDIOUT deviceHandle, INT32 minToLeaveData) {
MMRESULT err = MMSYSERR_NOERROR;
+ MIDIHDR* hdr = &(info->header);
if (!hdr) {
ERROR0("MIDI_OUT_freeLongBuffer: hdr == NULL\n");
@@ -180,10 +181,11 @@ INT32 freeLongBuffer(MIDIHDR* hdr, HMIDIOUT deviceHandle, INT32 minToLeaveData)
if (hdr->dwFlags && deviceHandle) {
err = midiOutUnprepareHeader(deviceHandle, hdr, sizeof(MIDIHDR));
}
- if (hdr->lpData && (((INT32) hdr->dwBufferLength) < minToLeaveData || minToLeaveData < 0)) {
+ if (hdr->lpData && (info->bufferLength < minToLeaveData || minToLeaveData < 0)) {
free(hdr->lpData);
hdr->lpData=NULL;
hdr->dwBufferLength=0;
+ info->bufferLength=0;
}
hdr->dwBytesRecorded=0;
hdr->dwFlags=0;
@@ -201,7 +203,7 @@ INT32 freeLongBuffers(MidiDeviceHandle* handle) {
}
sysex = (SysExQueue*) handle->longBuffers;
for (i = 0; icount; i++) {
- err = freeLongBuffer(&(sysex->header[i]), (HMIDIOUT) handle->deviceHandle, -1);
+ err = freeLongBuffer(&(sysex->headerInfo[i]), (HMIDIOUT) handle->deviceHandle, -1);
}
MIDIOUT_CHECK_ERROR;
return (INT32) err;
@@ -352,6 +354,7 @@ INT32 MIDI_OUT_SendShortMessage(MidiDeviceHandle* handle, UINT32 packedMsg, UINT
INT32 MIDI_OUT_SendLongMessage(MidiDeviceHandle* handle, UBYTE* data, UINT32 size, UINT32 timestamp) {
MMRESULT err;
SysExQueue* sysex;
+ MidiHeaderInfo* info = NULL;
MIDIHDR* hdr = NULL;
INT32 remainingSize;
int i;
@@ -378,10 +381,12 @@ INT32 MIDI_OUT_SendLongMessage(MidiDeviceHandle* handle, UBYTE* data, UINT32 siz
while (!hdr && handle->platformData) {
/* find a non-queued header */
for (i = 0; i < sysex->count; i++) {
- hdr = &(sysex->header[i]);
+ info = &(sysex->headerInfo[i]);
+ hdr = &(info->header);
if ((hdr->dwFlags & MHDR_DONE) || (hdr->dwFlags == 0)) {
break;
}
+ info = NULL;
hdr = NULL;
}
/* wait for a buffer to free up */
@@ -404,22 +409,26 @@ INT32 MIDI_OUT_SendLongMessage(MidiDeviceHandle* handle, UBYTE* data, UINT32 siz
}
TRACE2("-> sending %d bytes with buffer index=%d\n", (int) size, (int) hdr->dwUser);
- freeLongBuffer(hdr, handle->deviceHandle, (INT32) size);
+ freeLongBuffer(info, handle->deviceHandle, (INT32) size);
if (hdr->lpData == NULL) {
hdr->lpData = malloc(size);
- hdr->dwBufferLength = size;
+ info->bufferLength = size;
}
+ // Because midiOutLongMsg() ignores dwBytesRecorded, set both
+ // dwBufferLength to the size of the data. The actual buffer
+ // size is recorded in info->bufferLength.
+ hdr->dwBufferLength = size;
hdr->dwBytesRecorded = size;
memcpy(hdr->lpData, data, size);
err = midiOutPrepareHeader((HMIDIOUT) handle->deviceHandle, hdr, sizeof(MIDIHDR));
if (err != MMSYSERR_NOERROR) {
- freeLongBuffer(hdr, handle->deviceHandle, -1);
+ freeLongBuffer(info, handle->deviceHandle, -1);
MIDIOUT_CHECK_ERROR;
return (INT32) err;
}
err = midiOutLongMsg((HMIDIOUT) handle->deviceHandle, hdr, sizeof(MIDIHDR));
if (err != MMSYSERR_NOERROR) {
- freeLongBuffer(hdr, handle->deviceHandle, -1);
+ freeLongBuffer(info, handle->deviceHandle, -1);
ERROR0("ERROR: MIDI_OUT_SendLongMessage: midiOutLongMsg returned error:\n");
MIDIOUT_CHECK_ERROR;
return (INT32) err;
diff --git a/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_Util.c b/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_Util.c
index 7823195987155..249887d776138 100644
--- a/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_Util.c
+++ b/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_Util.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,7 @@ int MIDI_WinCreateLongBufferQueue(MidiDeviceHandle* handle, int count, int size,
SysExQueue* sysex;
int i;
UBYTE* dataPtr;
- int structSize = sizeof(SysExQueue) + ((count - 1) * sizeof(MIDIHDR));
+ int structSize = sizeof(SysExQueue) + ((count - 1) * sizeof(MidiHeaderInfo));
sysex = (SysExQueue*) malloc(structSize);
if (!sysex) return FALSE;
@@ -112,10 +112,11 @@ int MIDI_WinCreateLongBufferQueue(MidiDeviceHandle* handle, int count, int size,
// set up headers
dataPtr = preAllocatedMem;
for (i=0; iheader[i].lpData = dataPtr;
- sysex->header[i].dwBufferLength = size;
+ sysex->headerInfo[i].header.lpData = dataPtr;
+ sysex->headerInfo[i].header.dwBufferLength = size;
+ sysex->headerInfo[i].bufferLength = size;
// user data is the index of the buffer
- sysex->header[i].dwUser = (DWORD) i;
+ sysex->headerInfo[i].header.dwUser = (DWORD) i;
dataPtr += size;
}
return TRUE;
diff --git a/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_Util.h b/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_Util.h
index 20ce55b19fb76..dddca80f1050c 100644
--- a/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_Util.h
+++ b/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_Util.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,12 +46,17 @@
#include "PlatformMidi.h"
+typedef struct tag_MidiHeaderInfo {
+ MIDIHDR header; // Windows specific structure to hold meta info
+ INT32 bufferLength; // the actual length of the buffer in MIDIHDR
+} MidiHeaderInfo;
+
typedef struct tag_SysExQueue {
- int count; // number of sys ex headers
- int size; // data size per sys ex header
- int ownsLinearMem; // true when linearMem is to be disposed
- UBYTE* linearMem; // where the actual sys ex data is, count*size bytes
- MIDIHDR header[1]; // Windows specific structure to hold meta info
+ int count; // number of sys ex headers
+ int size; // data size per sys ex header
+ int ownsLinearMem; // true when linearMem is to be disposed
+ UBYTE* linearMem; // where the actual sys ex data is, count*size bytes
+ MidiHeaderInfo headerInfo[1]; // a structure to hold MIDIHDR and the actual buffer length
} SysExQueue;
/* set the startTime field in MidiDeviceHandle */
diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java b/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java
index 09845636b896b..c662983d0af40 100644
--- a/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java
@@ -54,17 +54,27 @@
import java.util.function.IntBinaryOperator;
/**
- * Implements SSL using two SubscriberWrappers.
+ * Implements SSL using two {@link SubscriberWrapper}s.
*
- * Constructor takes two Flow.Subscribers: one that receives the network
- * data (after it has been encrypted by SSLFlowDelegate) data, and one that
- * receives the application data (before it has been encrypted by SSLFlowDelegate).
+ *
Constructor takes two {@linkplain Flow.Subscriber subscribers} - {@code downReader}
+ * and {@code downWriter}. {@code downReader} receives the application data (after it has
+ * been decrypted by SSLFlowDelegate). {@code downWriter} receives the network data (after it has
+ * been encrypted by SSLFlowDelegate).
*
- *
Methods upstreamReader() and upstreamWriter() return the corresponding
- * Flow.Subscribers containing Flows for the encrypted/decrypted upstream data.
- * See diagram below.
+ *
Method {@link #upstreamWriter()} returns a {@linkplain Subscriber subscriber} which should
+ * be subscribed with a {@linkplain Flow.Publisher publisher} which publishes application data
+ * that can then be encrypted into network data by this SSLFlowDelegate and handed off to the
+ * {@code downWriter}.
*
- *
How Flow.Subscribers are used in this class, and where they come from:
+ *
Method {@link #upstreamReader()} returns a {@link Subscriber subscriber} which should be
+ * subscribed with a {@linkplain Flow.Publisher publisher} which publishes encrypted network data
+ * that can then be decrypted into application data by this SSLFlowDelegate and handed off to the
+ * {@code downReader}.
+ *
+ *
Errors are reported to the {@code downReader} subscriber.
+ *
+ *
The diagram below illustrates how the Flow.Subscribers are used in this class, and where
+ * they come from:
*
* {@code
*
@@ -73,17 +83,21 @@
* ---------> data flow direction
*
*
- * +------------------+
- * upstreamWriter | | downWriter
- * ---------------> | | ------------>
- * obtained from this | | supplied to constructor
- * | SSLFlowDelegate |
- * downReader | | upstreamReader
- * <--------------- | | <--------------
- * supplied to constructor | | obtained from this
- * +------------------+
- *
- * Errors are reported to the downReader Flow.Subscriber
+ * | ^
+ * upstreamWriter | | downReader
+ * obtained from | | supplied to
+ * upstreamWriter() | | constructor
+ * v |
+ * +-----------------------------------------------------------+
+ * * decrypts *
+ * * SSLFlowDelegate *
+ * * encrypts *
+ * +-----------------------------------------------------------+
+ * | ^
+ * downWriter | | upstreamReader
+ * supplied to | | obtained from
+ * constructor | | upstreamReader()
+ * v |
*
* }
*
@@ -477,7 +491,7 @@ else if (this.completing) {
readBufferLock.unlock();
}
// request more data and return.
- requestMore();
+ requestMoreDataIfNeeded();
return;
}
if (complete && result.status() == Status.CLOSED) {
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/Init.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/Init.java
index a35a4699d82a4..72153164340e4 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/Init.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/Init.java
@@ -57,17 +57,22 @@
*/
public class Init {
- /** The namespace for CONF file **/
+ /**
+ * The namespace for CONF file
+ **/
public static final String CONF_NS = "http://www.xmlsecurity.org/NS/#configuration";
private static final com.sun.org.slf4j.internal.Logger LOG =
- com.sun.org.slf4j.internal.LoggerFactory.getLogger(Init.class);
+ com.sun.org.slf4j.internal.LoggerFactory.getLogger(Init.class);
- /** Field alreadyInitialized */
+ /**
+ * Field alreadyInitialized
+ */
private static boolean alreadyInitialized = false;
/**
* Method isInitialized
+ *
* @return true if the library is already initialized.
*/
public static final synchronized boolean isInitialized() {
@@ -76,35 +81,28 @@ public static final synchronized boolean isInitialized() {
/**
* Method init
- *
*/
public static synchronized void init() {
if (alreadyInitialized) {
return;
}
+ PrivilegedAction action = () -> {
+ String cfile = System.getProperty("com.sun.org.apache.xml.internal.security.resource.config");
+ if (cfile == null) {
+ return null;
+ }
+ return getResourceAsStream(cfile, Init.class);
+ };
- @SuppressWarnings("removal")
- InputStream is = //NOPMD
- AccessController.doPrivileged(
- (PrivilegedAction)
- () -> {
- String cfile =
- System.getProperty("com.sun.org.apache.xml.internal.security.resource.config");
- if (cfile == null) {
- return null;
- }
- return getResourceAsStream(cfile, Init.class);
- }
- );
- if (is == null) {
- dynamicInit();
- } else {
- fileInit(is);
- try {
- is.close();
- } catch (IOException ex) {
- LOG.warn(ex.getMessage());
+ try (@SuppressWarnings("removal")
+ InputStream is = AccessController.doPrivileged(action)) {
+ if (is == null) {
+ dynamicInit();
+ } else {
+ fileInit(is);
}
+ } catch (IOException ex) {
+ LOG.warn(ex.getMessage(), ex);
}
alreadyInitialized = true;
@@ -412,9 +410,11 @@ private static List getResources(String resourceName, Class> callingClass
}
List ret = new ArrayList<>();
Enumeration urls = new Enumeration() {
+ @Override
public boolean hasMoreElements() {
return false;
}
+ @Override
public URL nextElement() {
return null;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java
index 5483f02f127d4..e4c1a30d52545 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java
@@ -40,7 +40,9 @@ public class JCEMapper {
private static Map algorithmsMap = new ConcurrentHashMap<>();
- private static String providerName;
+ private static String globalProviderName;
+
+ private static final ThreadLocal threadSpecificProviderName = new ThreadLocal<>();
/**
* Method register
@@ -344,7 +346,10 @@ private static Algorithm getAlgorithm(String algorithmURI) {
* @return the default providerId.
*/
public static String getProviderId() {
- return providerName;
+ if (threadSpecificProviderName.get() != null) {
+ return threadSpecificProviderName.get();
+ }
+ return globalProviderName;
}
/**
@@ -355,7 +360,18 @@ public static String getProviderId() {
*/
public static void setProviderId(String provider) {
JavaUtils.checkRegisterPermission();
- providerName = provider;
+ globalProviderName = provider;
+ }
+
+ /**
+ * Sets the default Provider for this thread to obtain the security algorithms
+ * @param threadSpecificProviderName the default providerId.
+ * @throws SecurityException if a security manager is installed and the
+ * caller does not have permission to register the JCE algorithm
+ */
+ public static void setThreadSpecificProviderName(String threadSpecificProviderName) {
+ JavaUtils.checkRegisterPermission();
+ JCEMapper.threadSpecificProviderName.set(threadSpecificProviderName);
}
/**
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.java
index 6c3f500dbe81b..17351f0211e9e 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.java
@@ -256,11 +256,13 @@ public void update(byte[] buf, int offset, int len) {
}
/** {@inheritDoc} */
+ @Override
public String getBaseNamespace() {
return Constants.SignatureSpecNS;
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_DIGESTMETHOD;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java
index 0c984d4e0300b..439eefb10dc73 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java
@@ -31,7 +31,11 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import com.sun.org.apache.xml.internal.security.algorithms.implementations.*;
+import com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac;
+import com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA;
+import com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureDSA;
+import com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureECDSA;
+import com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureEDDSA;
import com.sun.org.apache.xml.internal.security.exceptions.AlgorithmAlreadyRegisteredException;
import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
import com.sun.org.apache.xml.internal.security.signature.XMLSignature;
@@ -524,6 +528,7 @@ public static void registerDefaultAlgorithms() {
*
* @return URI of this element
*/
+ @Override
public String getBaseNamespace() {
return Constants.SignatureSpecNS;
}
@@ -533,6 +538,7 @@ public String getBaseNamespace() {
*
* @return Local name
*/
+ @Override
public String getBaseLocalName() {
return Constants._TAG_SIGNATUREMETHOD;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithmSpi.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithmSpi.java
index a049733c0ad1a..fde070f635452 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithmSpi.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithmSpi.java
@@ -22,7 +22,12 @@
*/
package com.sun.org.apache.xml.internal.security.algorithms;
-import java.security.*;
+import java.security.InvalidKeyException;
+import java.security.Key;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.SecureRandom;
+import java.security.Signature;
import java.security.spec.AlgorithmParameterSpec;
import com.sun.org.apache.xml.internal.security.signature.XMLSignatureException;
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/ECDSAUtils.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/ECDSAUtils.java
index 510fab21584ec..73e02864bd926 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/ECDSAUtils.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/ECDSAUtils.java
@@ -28,7 +28,12 @@
import java.io.IOException;
import java.math.BigInteger;
import java.security.interfaces.ECPublicKey;
-import java.security.spec.*;
+import java.security.spec.ECField;
+import java.security.spec.ECFieldF2m;
+import java.security.spec.ECFieldFp;
+import java.security.spec.ECParameterSpec;
+import java.security.spec.ECPoint;
+import java.security.spec.EllipticCurve;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/IntegrityHmac.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/IntegrityHmac.java
index fdaf8643279c8..8f833756ff88c 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/IntegrityHmac.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/IntegrityHmac.java
@@ -90,6 +90,7 @@ public IntegrityHmac(Provider provider) throws XMLSignatureException {
* @param params
* @throws XMLSignatureException
*/
+ @Override
protected void engineSetParameter(AlgorithmParameterSpec params) throws XMLSignatureException {
throw new XMLSignatureException("empty", new Object[]{"Incorrect method call"});
}
@@ -102,6 +103,7 @@ protected void engineSetParameter(AlgorithmParameterSpec params) throws XMLSigna
* @return true if the signature is correct
* @throws XMLSignatureException
*/
+ @Override
protected boolean engineVerify(byte[] signature) throws XMLSignatureException {
try {
if (hmacOutputLength != null && hmacOutputLength.length < getDigestLength()) {
@@ -124,6 +126,7 @@ protected boolean engineVerify(byte[] signature) throws XMLSignatureException {
* @param secretKey
* @throws XMLSignatureException
*/
+ @Override
protected void engineInitVerify(Key secretKey) throws XMLSignatureException {
if (!(secretKey instanceof SecretKey)) {
String supplied = null;
@@ -150,6 +153,7 @@ protected void engineInitVerify(Key secretKey) throws XMLSignatureException {
* @return the result of the {@link java.security.Signature#sign()} method
* @throws XMLSignatureException
*/
+ @Override
protected byte[] engineSign() throws XMLSignatureException {
try {
if (hmacOutputLength != null && hmacOutputLength.length < getDigestLength()) {
@@ -170,6 +174,7 @@ protected byte[] engineSign() throws XMLSignatureException {
* @param secretKey
* @throws XMLSignatureException
*/
+ @Override
protected void engineInitSign(Key secretKey) throws XMLSignatureException {
engineInitSign(secretKey, (AlgorithmParameterSpec)null);
}
@@ -181,6 +186,7 @@ protected void engineInitSign(Key secretKey) throws XMLSignatureException {
* @param algorithmParameterSpec
* @throws XMLSignatureException
*/
+ @Override
protected void engineInitSign(
Key secretKey, AlgorithmParameterSpec algorithmParameterSpec
) throws XMLSignatureException {
@@ -213,6 +219,7 @@ protected void engineInitSign(
* @param secureRandom
* @throws XMLSignatureException
*/
+ @Override
protected void engineInitSign(Key secretKey, SecureRandom secureRandom)
throws XMLSignatureException {
throw new XMLSignatureException("algorithms.CannotUseSecureRandomOnMAC");
@@ -225,6 +232,7 @@ protected void engineInitSign(Key secretKey, SecureRandom secureRandom)
* @param input
* @throws XMLSignatureException
*/
+ @Override
protected void engineUpdate(byte[] input) throws XMLSignatureException {
try {
this.macAlgorithm.update(input);
@@ -240,6 +248,7 @@ protected void engineUpdate(byte[] input) throws XMLSignatureException {
* @param input
* @throws XMLSignatureException
*/
+ @Override
protected void engineUpdate(byte input) throws XMLSignatureException {
try {
this.macAlgorithm.update(input);
@@ -257,6 +266,7 @@ protected void engineUpdate(byte input) throws XMLSignatureException {
* @param len
* @throws XMLSignatureException
*/
+ @Override
protected void engineUpdate(byte[] buf, int offset, int len) throws XMLSignatureException {
try {
this.macAlgorithm.update(buf, offset, len);
@@ -270,6 +280,7 @@ protected void engineUpdate(byte[] buf, int offset, int len) throws XMLSignature
* {@inheritDoc}
*
*/
+ @Override
protected String engineGetJCEAlgorithmString() {
return this.macAlgorithm.getAlgorithm();
}
@@ -279,6 +290,7 @@ protected String engineGetJCEAlgorithmString() {
*
* {@inheritDoc}
*/
+ @Override
protected String engineGetJCEProviderName() {
return this.macAlgorithm.getProvider().getName();
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.java
index 5186520729a6f..45dafc3ad3894 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.java
@@ -31,6 +31,8 @@
import java.security.Signature;
import java.security.SignatureException;
import java.security.spec.AlgorithmParameterSpec;
+import java.security.spec.MGF1ParameterSpec;
+import java.security.spec.PSSParameterSpec;
import com.sun.org.apache.xml.internal.security.algorithms.JCEMapper;
import com.sun.org.apache.xml.internal.security.algorithms.SignatureAlgorithmSpi;
@@ -43,8 +45,6 @@
import org.w3c.dom.Text;
import javax.xml.crypto.dsig.DigestMethod;
-import java.security.spec.MGF1ParameterSpec;
-import java.security.spec.PSSParameterSpec;
public abstract class SignatureBaseRSA extends SignatureAlgorithmSpi {
@@ -65,20 +65,25 @@ public SignatureBaseRSA() throws XMLSignatureException {
public SignatureBaseRSA(Provider provider) throws XMLSignatureException {
String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
- LOG.debug("Created SignatureRSA using {}", algorithmID);
+ this.signatureAlgorithm = getSignature(provider, algorithmID);
+ LOG.debug("Created SignatureRSA using {0} and provider {1}",
+ algorithmID, signatureAlgorithm.getProvider());
+ }
+ Signature getSignature(Provider provider, String algorithmID)
+ throws XMLSignatureException {
try {
if (provider == null) {
String providerId = JCEMapper.getProviderId();
if (providerId == null) {
- this.signatureAlgorithm = Signature.getInstance(algorithmID);
+ return Signature.getInstance(algorithmID);
} else {
- this.signatureAlgorithm = Signature.getInstance(algorithmID, providerId);
+ return Signature.getInstance(algorithmID, providerId);
}
} else {
- this.signatureAlgorithm = Signature.getInstance(algorithmID, provider);
+ return Signature.getInstance(algorithmID, provider);
}
} catch (NoSuchAlgorithmException | NoSuchProviderException ex) {
@@ -88,6 +93,7 @@ public SignatureBaseRSA(Provider provider) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineSetParameter(AlgorithmParameterSpec params)
throws XMLSignatureException {
try {
@@ -98,6 +104,7 @@ protected void engineSetParameter(AlgorithmParameterSpec params)
}
/** {@inheritDoc} */
+ @Override
protected boolean engineVerify(byte[] signature) throws XMLSignatureException {
try {
return this.signatureAlgorithm.verify(signature);
@@ -107,11 +114,13 @@ protected boolean engineVerify(byte[] signature) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineInitVerify(Key publicKey) throws XMLSignatureException {
engineInitVerify(publicKey, this.signatureAlgorithm);
}
/** {@inheritDoc} */
+ @Override
protected byte[] engineSign() throws XMLSignatureException {
try {
return this.signatureAlgorithm.sign();
@@ -121,17 +130,20 @@ protected byte[] engineSign() throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
throws XMLSignatureException {
engineInitSign(privateKey, secureRandom, this.signatureAlgorithm);
}
/** {@inheritDoc} */
+ @Override
protected void engineInitSign(Key privateKey) throws XMLSignatureException {
engineInitSign(privateKey, (SecureRandom)null);
}
/** {@inheritDoc} */
+ @Override
protected void engineUpdate(byte[] input) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(input);
@@ -141,6 +153,7 @@ protected void engineUpdate(byte[] input) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineUpdate(byte input) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(input);
@@ -150,6 +163,7 @@ protected void engineUpdate(byte input) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineUpdate(byte[] buf, int offset, int len) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(buf, offset, len);
@@ -159,22 +173,26 @@ protected void engineUpdate(byte[] buf, int offset, int len) throws XMLSignature
}
/** {@inheritDoc} */
+ @Override
protected String engineGetJCEAlgorithmString() {
return this.signatureAlgorithm.getAlgorithm();
}
/** {@inheritDoc} */
+ @Override
protected String engineGetJCEProviderName() {
return this.signatureAlgorithm.getProvider().getName();
}
/** {@inheritDoc} */
+ @Override
protected void engineSetHMACOutputLength(int HMACOutputLength)
throws XMLSignatureException {
throw new XMLSignatureException("algorithms.HMACOutputLengthOnlyForHMAC");
}
/** {@inheritDoc} */
+ @Override
protected void engineInitSign(
Key signingKey, AlgorithmParameterSpec algorithmParameterSpec
) throws XMLSignatureException {
@@ -356,10 +374,53 @@ public String engineGetURI() {
}
}
+ public abstract static class SignatureBaseRSAPSS extends SignatureBaseRSA {
+
+ public SignatureBaseRSAPSS() throws XMLSignatureException {
+ super();
+ }
+
+ public SignatureBaseRSAPSS(Provider provider) throws XMLSignatureException {
+ super(provider);
+ }
+
+ @Override
+ Signature getSignature(Provider provider, String algorithmID)
+ throws XMLSignatureException {
+ try {
+ Signature sig;
+ if (provider == null) {
+ String providerId = JCEMapper.getProviderId();
+ if (providerId == null) {
+ sig = Signature.getInstance("RSASSA-PSS");
+ } else {
+ sig = Signature.getInstance("RSASSA-PSS", providerId);
+ }
+ } else {
+ sig = Signature.getInstance("RSASSA-PSS", provider);
+ }
+ try {
+ sig.setParameter(getPSSParameterSpec());
+ } catch (InvalidAlgorithmParameterException e) {
+ throw new NoSuchAlgorithmException("Should not happen", e);
+ }
+ return sig;
+ } catch (NoSuchAlgorithmException | NoSuchProviderException e) {
+ return super.getSignature(provider, algorithmID);
+ }
+ }
+
+ abstract PSSParameterSpec getPSSParameterSpec();
+ }
+
/**
* Class SignatureRSASHA1MGF1
*/
- public static class SignatureRSASHA1MGF1 extends SignatureBaseRSA {
+ public static class SignatureRSASHA1MGF1 extends SignatureBaseRSAPSS {
+
+ private static final PSSParameterSpec SHA1_MGF1_PARAMS
+ = new PSSParameterSpec("SHA-1", "MGF1", MGF1ParameterSpec.SHA1,
+ 20, PSSParameterSpec.TRAILER_FIELD_BC);
/**
* Constructor SignatureRSASHA1MGF1
@@ -379,12 +440,21 @@ public SignatureRSASHA1MGF1(Provider provider) throws XMLSignatureException {
public String engineGetURI() {
return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1_MGF1;
}
+
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA1_MGF1_PARAMS;
+ }
}
/**
* Class SignatureRSASHA224MGF1
*/
- public static class SignatureRSASHA224MGF1 extends SignatureBaseRSA {
+ public static class SignatureRSASHA224MGF1 extends SignatureBaseRSAPSS {
+
+ private static final PSSParameterSpec SHA224_MGF1_PARAMS
+ = new PSSParameterSpec("SHA-224", "MGF1", MGF1ParameterSpec.SHA224,
+ 28, PSSParameterSpec.TRAILER_FIELD_BC);
/**
* Constructor SignatureRSASHA224MGF1
@@ -404,12 +474,21 @@ public SignatureRSASHA224MGF1(Provider provider) throws XMLSignatureException {
public String engineGetURI() {
return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA224_MGF1;
}
+
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA224_MGF1_PARAMS;
+ }
}
/**
* Class SignatureRSASHA256MGF1
*/
- public static class SignatureRSASHA256MGF1 extends SignatureBaseRSA {
+ public static class SignatureRSASHA256MGF1 extends SignatureBaseRSAPSS {
+
+ private static final PSSParameterSpec SHA256_MGF1_PARAMS
+ = new PSSParameterSpec("SHA-256", "MGF1", MGF1ParameterSpec.SHA256,
+ 32, PSSParameterSpec.TRAILER_FIELD_BC);
/**
* Constructor SignatureRSASHA256MGF1
@@ -429,12 +508,21 @@ public SignatureRSASHA256MGF1(Provider provider) throws XMLSignatureException {
public String engineGetURI() {
return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA256_MGF1;
}
+
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA256_MGF1_PARAMS;
+ }
}
/**
* Class SignatureRSASHA384MGF1
*/
- public static class SignatureRSASHA384MGF1 extends SignatureBaseRSA {
+ public static class SignatureRSASHA384MGF1 extends SignatureBaseRSAPSS {
+
+ private static final PSSParameterSpec SHA384_MGF1_PARAMS
+ = new PSSParameterSpec("SHA-384", "MGF1", MGF1ParameterSpec.SHA384,
+ 48, PSSParameterSpec.TRAILER_FIELD_BC);
/**
* Constructor SignatureRSASHA384MGF1
@@ -454,12 +542,21 @@ public SignatureRSASHA384MGF1(Provider provider) throws XMLSignatureException {
public String engineGetURI() {
return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA384_MGF1;
}
+
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA384_MGF1_PARAMS;
+ }
}
/**
* Class SignatureRSASHA512MGF1
*/
- public static class SignatureRSASHA512MGF1 extends SignatureBaseRSA {
+ public static class SignatureRSASHA512MGF1 extends SignatureBaseRSAPSS {
+
+ private static final PSSParameterSpec SHA512_MGF1_PARAMS
+ = new PSSParameterSpec("SHA-512", "MGF1", MGF1ParameterSpec.SHA512,
+ 64, PSSParameterSpec.TRAILER_FIELD_BC);
/**
* Constructor SignatureRSASHA512MGF1
@@ -479,12 +576,22 @@ public SignatureRSASHA512MGF1(Provider provider) throws XMLSignatureException {
public String engineGetURI() {
return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA512_MGF1;
}
+
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA512_MGF1_PARAMS;
+ }
}
/**
* Class SignatureRSA3_SHA224MGF1
*/
- public static class SignatureRSASHA3_224MGF1 extends SignatureBaseRSA {
+ public static class SignatureRSASHA3_224MGF1 extends SignatureBaseRSAPSS {
+
+ private static final PSSParameterSpec SHA3_224_MGF1_PARAMS
+ = new PSSParameterSpec("SHA3-224", "MGF1",
+ new MGF1ParameterSpec("SHA3-224"),
+ 28, PSSParameterSpec.TRAILER_FIELD_BC);
/**
* Constructor SignatureRSASHA3_224MGF1
@@ -504,12 +611,22 @@ public SignatureRSASHA3_224MGF1(Provider provider) throws XMLSignatureException
public String engineGetURI() {
return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA3_224_MGF1;
}
+
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA3_224_MGF1_PARAMS;
+ }
}
/**
* Class SignatureRSA3_SHA256MGF1
*/
- public static class SignatureRSASHA3_256MGF1 extends SignatureBaseRSA {
+ public static class SignatureRSASHA3_256MGF1 extends SignatureBaseRSAPSS {
+
+ private static final PSSParameterSpec SHA3_256_MGF1_PARAMS
+ = new PSSParameterSpec("SHA3-256", "MGF1",
+ new MGF1ParameterSpec("SHA3-256"),
+ 32, PSSParameterSpec.TRAILER_FIELD_BC);
/**
* Constructor SignatureRSASHA3_256MGF1
@@ -529,12 +646,22 @@ public SignatureRSASHA3_256MGF1(Provider provider) throws XMLSignatureException
public String engineGetURI() {
return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA3_256_MGF1;
}
+
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA3_256_MGF1_PARAMS;
+ }
}
/**
* Class SignatureRSA3_SHA384MGF1
*/
- public static class SignatureRSASHA3_384MGF1 extends SignatureBaseRSA {
+ public static class SignatureRSASHA3_384MGF1 extends SignatureBaseRSAPSS {
+
+ private static final PSSParameterSpec SHA3_384_MGF1_PARAMS
+ = new PSSParameterSpec("SHA3-384", "MGF1",
+ new MGF1ParameterSpec("SHA3-384"),
+ 48, PSSParameterSpec.TRAILER_FIELD_BC);
/**
* Constructor SignatureRSASHA3_384MGF1
@@ -554,12 +681,22 @@ public SignatureRSASHA3_384MGF1(Provider provider) throws XMLSignatureException
public String engineGetURI() {
return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA3_384_MGF1;
}
+
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA3_384_MGF1_PARAMS;
+ }
}
/**
* Class SignatureRSASHA3_512MGF1
*/
- public static class SignatureRSASHA3_512MGF1 extends SignatureBaseRSA {
+ public static class SignatureRSASHA3_512MGF1 extends SignatureBaseRSAPSS {
+
+ private static final PSSParameterSpec SHA3_512_MGF1_PARAMS
+ = new PSSParameterSpec("SHA3-512", "MGF1",
+ new MGF1ParameterSpec("SHA3-512"),
+ 64, PSSParameterSpec.TRAILER_FIELD_BC);
/**
* Constructor SignatureRSASHA3_512MGF1
@@ -579,10 +716,15 @@ public SignatureRSASHA3_512MGF1(Provider provider) throws XMLSignatureException
public String engineGetURI() {
return XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA3_512_MGF1;
}
+
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA3_512_MGF1_PARAMS;
+ }
}
public static class SignatureRSASSAPSS extends SignatureBaseRSA {
- PSSParameterSpec pssParameterSpec;
+ private PSSParameterSpec pssParameterSpec;
public enum DigestAlgorithm {
SHA224("SHA-224", DigestMethod.SHA224, 28),
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureDSA.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureDSA.java
index 0f9f8463252a8..c2b0d05763df7 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureDSA.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureDSA.java
@@ -60,6 +60,7 @@ public class SignatureDSA extends SignatureAlgorithmSpi {
*
* {@inheritDoc}
*/
+ @Override
protected String engineGetURI() {
return XMLSignature.ALGO_ID_SIGNATURE_DSA;
}
@@ -100,6 +101,7 @@ public SignatureDSA(Provider provider) throws XMLSignatureException {
/**
* {@inheritDoc}
*/
+ @Override
protected void engineSetParameter(AlgorithmParameterSpec params)
throws XMLSignatureException {
try {
@@ -112,6 +114,7 @@ protected void engineSetParameter(AlgorithmParameterSpec params)
/**
* {@inheritDoc}
*/
+ @Override
protected boolean engineVerify(byte[] signature)
throws XMLSignatureException {
try {
@@ -130,6 +133,7 @@ protected boolean engineVerify(byte[] signature)
/**
* {@inheritDoc}
*/
+ @Override
protected void engineInitVerify(Key publicKey) throws XMLSignatureException {
engineInitVerify(publicKey, this.signatureAlgorithm);
size = ((DSAKey)publicKey).getParams().getQ().bitLength();
@@ -138,6 +142,7 @@ protected void engineInitVerify(Key publicKey) throws XMLSignatureException {
/**
* {@inheritDoc}
*/
+ @Override
protected byte[] engineSign() throws XMLSignatureException {
try {
byte[] jcebytes = this.signatureAlgorithm.sign();
@@ -151,6 +156,7 @@ protected byte[] engineSign() throws XMLSignatureException {
/**
* {@inheritDoc}
*/
+ @Override
protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
throws XMLSignatureException {
engineInitSign(privateKey, secureRandom, this.signatureAlgorithm);
@@ -160,6 +166,7 @@ protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
/**
* {@inheritDoc}
*/
+ @Override
protected void engineInitSign(Key privateKey) throws XMLSignatureException {
engineInitSign(privateKey, (SecureRandom)null);
}
@@ -167,6 +174,7 @@ protected void engineInitSign(Key privateKey) throws XMLSignatureException {
/**
* {@inheritDoc}
*/
+ @Override
protected void engineUpdate(byte[] input) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(input);
@@ -178,6 +186,7 @@ protected void engineUpdate(byte[] input) throws XMLSignatureException {
/**
* {@inheritDoc}
*/
+ @Override
protected void engineUpdate(byte input) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(input);
@@ -189,6 +198,7 @@ protected void engineUpdate(byte input) throws XMLSignatureException {
/**
* {@inheritDoc}
*/
+ @Override
protected void engineUpdate(byte[] buf, int offset, int len) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(buf, offset, len);
@@ -202,6 +212,7 @@ protected void engineUpdate(byte[] buf, int offset, int len) throws XMLSignature
*
* {@inheritDoc}
*/
+ @Override
protected String engineGetJCEAlgorithmString() {
return this.signatureAlgorithm.getAlgorithm();
}
@@ -211,6 +222,7 @@ protected String engineGetJCEAlgorithmString() {
*
* {@inheritDoc}
*/
+ @Override
protected String engineGetJCEProviderName() {
return this.signatureAlgorithm.getProvider().getName();
}
@@ -221,6 +233,7 @@ protected String engineGetJCEProviderName() {
* @param HMACOutputLength
* @throws XMLSignatureException
*/
+ @Override
protected void engineSetHMACOutputLength(int HMACOutputLength) throws XMLSignatureException {
throw new XMLSignatureException("algorithms.HMACOutputLengthOnlyForHMAC");
}
@@ -232,6 +245,7 @@ protected void engineSetHMACOutputLength(int HMACOutputLength) throws XMLSignatu
* @param algorithmParameterSpec
* @throws XMLSignatureException
*/
+ @Override
protected void engineInitSign(
Key signingKey, AlgorithmParameterSpec algorithmParameterSpec
) throws XMLSignatureException {
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.java
index 381ead9ec2efb..75a88b8eb1332 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.java
@@ -26,7 +26,14 @@
package com.sun.org.apache.xml.internal.security.algorithms.implementations;
import java.io.IOException;
-import java.security.*;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.SecureRandom;
+import java.security.Signature;
+import java.security.SignatureException;
import java.security.interfaces.ECPrivateKey;
import java.security.spec.AlgorithmParameterSpec;
@@ -118,6 +125,7 @@ public SignatureECDSA(Provider provider) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineSetParameter(AlgorithmParameterSpec params)
throws XMLSignatureException {
try {
@@ -128,6 +136,7 @@ protected void engineSetParameter(AlgorithmParameterSpec params)
}
/** {@inheritDoc} */
+ @Override
protected boolean engineVerify(byte[] signature) throws XMLSignatureException {
try {
byte[] jcebytes = SignatureECDSA.convertXMLDSIGtoASN1(signature);
@@ -143,11 +152,13 @@ protected boolean engineVerify(byte[] signature) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineInitVerify(Key publicKey) throws XMLSignatureException {
engineInitVerify(publicKey, signatureAlgorithm);
}
/** {@inheritDoc} */
+ @Override
protected byte[] engineSign() throws XMLSignatureException {
try {
byte[] jcebytes = this.signatureAlgorithm.sign();
@@ -158,6 +169,7 @@ protected byte[] engineSign() throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
throws XMLSignatureException {
if (privateKey instanceof ECPrivateKey) {
@@ -169,11 +181,13 @@ protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
}
/** {@inheritDoc} */
+ @Override
protected void engineInitSign(Key privateKey) throws XMLSignatureException {
engineInitSign(privateKey, (SecureRandom)null);
}
/** {@inheritDoc} */
+ @Override
protected void engineUpdate(byte[] input) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(input);
@@ -183,6 +197,7 @@ protected void engineUpdate(byte[] input) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineUpdate(byte input) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(input);
@@ -192,6 +207,7 @@ protected void engineUpdate(byte input) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineUpdate(byte[] buf, int offset, int len) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(buf, offset, len);
@@ -201,22 +217,26 @@ protected void engineUpdate(byte[] buf, int offset, int len) throws XMLSignature
}
/** {@inheritDoc} */
+ @Override
protected String engineGetJCEAlgorithmString() {
return this.signatureAlgorithm.getAlgorithm();
}
/** {@inheritDoc} */
+ @Override
protected String engineGetJCEProviderName() {
return this.signatureAlgorithm.getProvider().getName();
}
/** {@inheritDoc} */
+ @Override
protected void engineSetHMACOutputLength(int HMACOutputLength)
throws XMLSignatureException {
throw new XMLSignatureException("algorithms.HMACOutputLengthOnlyForHMAC");
}
/** {@inheritDoc} */
+ @Override
protected void engineInitSign(
Key signingKey, AlgorithmParameterSpec algorithmParameterSpec
) throws XMLSignatureException {
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureEDDSA.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureEDDSA.java
index 03eb36e076c27..c297d96faeab5 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureEDDSA.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureEDDSA.java
@@ -22,16 +22,22 @@
*/
package com.sun.org.apache.xml.internal.security.algorithms.implementations;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.SecureRandom;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.spec.AlgorithmParameterSpec;
+
import com.sun.org.apache.xml.internal.security.algorithms.JCEMapper;
import com.sun.org.apache.xml.internal.security.algorithms.SignatureAlgorithmSpi;
import com.sun.org.apache.xml.internal.security.signature.XMLSignature;
import com.sun.org.apache.xml.internal.security.signature.XMLSignatureException;
import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
-import java.io.IOException;
-import java.security.*;
-import java.security.spec.AlgorithmParameterSpec;
-
/**
*
*/
@@ -77,6 +83,7 @@ public SignatureEDDSA(Provider provider) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineSetParameter(AlgorithmParameterSpec params)
throws XMLSignatureException {
try {
@@ -87,6 +94,7 @@ protected void engineSetParameter(AlgorithmParameterSpec params)
}
/** {@inheritDoc} */
+ @Override
protected boolean engineVerify(byte[] signature) throws XMLSignatureException {
try {
@@ -101,11 +109,13 @@ protected boolean engineVerify(byte[] signature) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineInitVerify(Key publicKey) throws XMLSignatureException {
engineInitVerify(publicKey, signatureAlgorithm);
}
/** {@inheritDoc} */
+ @Override
protected byte[] engineSign() throws XMLSignatureException {
try {
return this.signatureAlgorithm.sign();
@@ -115,6 +125,7 @@ protected byte[] engineSign() throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
throws XMLSignatureException {
@@ -122,11 +133,13 @@ protected void engineInitSign(Key privateKey, SecureRandom secureRandom)
}
/** {@inheritDoc} */
+ @Override
protected void engineInitSign(Key privateKey) throws XMLSignatureException {
engineInitSign(privateKey, (SecureRandom)null);
}
/** {@inheritDoc} */
+ @Override
protected void engineUpdate(byte[] input) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(input);
@@ -136,6 +149,7 @@ protected void engineUpdate(byte[] input) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineUpdate(byte input) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(input);
@@ -145,6 +159,7 @@ protected void engineUpdate(byte input) throws XMLSignatureException {
}
/** {@inheritDoc} */
+ @Override
protected void engineUpdate(byte[] buf, int offset, int len) throws XMLSignatureException {
try {
this.signatureAlgorithm.update(buf, offset, len);
@@ -154,22 +169,26 @@ protected void engineUpdate(byte[] buf, int offset, int len) throws XMLSignature
}
/** {@inheritDoc} */
+ @Override
protected String engineGetJCEAlgorithmString() {
return this.signatureAlgorithm.getAlgorithm();
}
/** {@inheritDoc} */
+ @Override
protected String engineGetJCEProviderName() {
return this.signatureAlgorithm.getProvider().getName();
}
/** {@inheritDoc} */
+ @Override
protected void engineSetHMACOutputLength(int HMACOutputLength)
throws XMLSignatureException {
throw new XMLSignatureException("algorithms.HMACOutputLengthOnlyForHMAC");
}
/** {@inheritDoc} */
+ @Override
protected void engineInitSign(
Key signingKey, AlgorithmParameterSpec algorithmParameterSpec
) throws XMLSignatureException {
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.java
index 71e2d976b5735..4e639339523e1 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.java
@@ -122,7 +122,7 @@ private Canonicalizer(String algorithmURI) throws InvalidCanonicalizerException
* @return a Canonicalizer instance ready for the job
* @throws InvalidCanonicalizerException
*/
- public static final Canonicalizer getInstance(String algorithmURI)
+ public static Canonicalizer getInstance(String algorithmURI)
throws InvalidCanonicalizerException {
return new Canonicalizer(algorithmURI);
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/helper/AttrCompare.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/helper/AttrCompare.java
index 5ac239cd3a3b3..cbd541e63b055 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/helper/AttrCompare.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/helper/AttrCompare.java
@@ -22,11 +22,12 @@
*/
package com.sun.org.apache.xml.internal.security.c14n.helper;
-import com.sun.org.apache.xml.internal.security.utils.Constants;
-import org.w3c.dom.Attr;
import java.io.Serializable;
import java.util.Comparator;
+import com.sun.org.apache.xml.internal.security.utils.Constants;
+import org.w3c.dom.Attr;
+
/**
* Compares two attributes based on the C14n specification.
*
@@ -69,6 +70,7 @@ public class AttrCompare implements Comparator, Serializable {
* obj0 is less than, equal to, or greater than obj1
*
*/
+ @Override
public int compare(Attr attr0, Attr attr1) {
String namespaceURI0 = attr0.getNamespaceURI();
String namespaceURI1 = attr1.getNamespaceURI();
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_OmitComments.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_OmitComments.java
index 867faad7a8d5b..2f8254449f804 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_OmitComments.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_OmitComments.java
@@ -32,6 +32,7 @@ public Canonicalizer11_OmitComments() {
super(false, true);
}
+ @Override
public final String engineGetURI() {
return Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_WithComments.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_WithComments.java
index b4ded12429f47..181e559f5a172 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_WithComments.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_WithComments.java
@@ -32,6 +32,7 @@ public Canonicalizer11_WithComments() {
super(true, true);
}
+ @Override
public final String engineGetURI() {
return Canonicalizer.ALGO_ID_C14N11_WITH_COMMENTS;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java
index f0cd610b3209a..6b6fda395c9f4 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java
@@ -83,6 +83,7 @@ public Canonicalizer20010315(boolean includeComments, boolean c14n11) {
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException always
*/
+ @Override
public void engineCanonicalizeXPathNodeSet(Set xpathNodeSet, String inclusiveNamespaces, OutputStream writer)
throws CanonicalizationException {
@@ -98,6 +99,7 @@ public void engineCanonicalizeXPathNodeSet(Set xpathNodeSet, String inclus
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException
*/
+ @Override
public void engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces, OutputStream writer)
throws CanonicalizationException {
@@ -113,6 +115,7 @@ public void engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces,
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException
*/
+ @Override
public void engineCanonicalizeSubTree(
Node rootNode, String inclusiveNamespaces, boolean propagateDefaultNamespace, OutputStream writer)
throws CanonicalizationException {
@@ -297,6 +300,7 @@ protected void outputAttributes(Element element, NameSpaceSymbTable ns,
}
}
+ @Override
protected void circumventBugIfNeeded(XMLSignatureInput input)
throws XMLParserException, IOException {
if (!input.isNeedsToBeExpanded()) {
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java
index b7c543e583a42..44323692ee723 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java
@@ -82,6 +82,7 @@ public Canonicalizer20010315Excl(boolean includeComments) {
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException
*/
+ @Override
public void engineCanonicalizeSubTree(Node rootNode, OutputStream writer)
throws CanonicalizationException {
engineCanonicalizeSubTree(rootNode, "", null, writer);
@@ -95,6 +96,7 @@ public void engineCanonicalizeSubTree(Node rootNode, OutputStream writer)
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException
*/
+ @Override
public void engineCanonicalizeSubTree(
Node rootNode, String inclusiveNamespaces, OutputStream writer
) throws CanonicalizationException {
@@ -110,6 +112,7 @@ public void engineCanonicalizeSubTree(
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException
*/
+ @Override
public void engineCanonicalizeSubTree(
Node rootNode, String inclusiveNamespaces, boolean propagateDefaultNamespace, OutputStream writer
) throws CanonicalizationException {
@@ -155,6 +158,7 @@ public void engineCanonicalize(
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException
*/
+ @Override
public void engineCanonicalizeXPathNodeSet(
Set xpathNodeSet, String inclusiveNamespaces, OutputStream writer
) throws CanonicalizationException {
@@ -336,6 +340,7 @@ protected void outputAttributes(Element element, NameSpaceSymbTable ns,
}
}
+ @Override
protected void circumventBugIfNeeded(XMLSignatureInput input)
throws XMLParserException, IOException {
if (!input.isNeedsToBeExpanded() || inclusiveNSSet.isEmpty()) {
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclOmitComments.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclOmitComments.java
index df9f88a8386b1..ab6a65ccabc47 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclOmitComments.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclOmitComments.java
@@ -34,6 +34,7 @@ public Canonicalizer20010315ExclOmitComments() {
}
/** {@inheritDoc} */
+ @Override
public final String engineGetURI() {
return Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclWithComments.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclWithComments.java
index 6b80e68525ee8..054343005ff53 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclWithComments.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclWithComments.java
@@ -38,6 +38,7 @@ public Canonicalizer20010315ExclWithComments() {
}
/** {@inheritDoc} */
+ @Override
public final String engineGetURI() {
return Canonicalizer.ALGO_ID_C14N_EXCL_WITH_COMMENTS;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315OmitComments.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315OmitComments.java
index 6615436467fb5..46f44362d8c0f 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315OmitComments.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315OmitComments.java
@@ -37,6 +37,7 @@ public Canonicalizer20010315OmitComments() {
}
/** {@inheritDoc} */
+ @Override
public final String engineGetURI() {
return Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315WithComments.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315WithComments.java
index 23dd3496da561..54742c6b80e74 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315WithComments.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315WithComments.java
@@ -36,6 +36,7 @@ public Canonicalizer20010315WithComments() {
}
/** {@inheritDoc} */
+ @Override
public final String engineGetURI() {
return Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java
index d57a947dc0d4b..c1f499078fa63 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java
@@ -107,6 +107,7 @@ protected CanonicalizerBase(boolean includeComments) {
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException
*/
+ @Override
public void engineCanonicalizeSubTree(Node rootNode, OutputStream writer)
throws CanonicalizationException {
engineCanonicalizeSubTree(rootNode, (Node)null, writer);
@@ -119,6 +120,7 @@ public void engineCanonicalizeSubTree(Node rootNode, OutputStream writer)
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException
*/
+ @Override
public void engineCanonicalizeXPathNodeSet(Set xpathNodeSet, OutputStream writer)
throws CanonicalizationException {
this.xpathNodeSet = xpathNodeSet;
@@ -457,8 +459,7 @@ private void canonicalizeXPathNodeSet(Node currentNode, Node endnode, OutputStre
} while(true);
}
- protected int isVisibleDO(Node currentNode, int level)
- throws CanonicalizationException {
+ protected int isVisibleDO(Node currentNode, int level) throws CanonicalizationException {
if (nodeFilter != null) {
for (NodeFilter filter : nodeFilter) {
try {
@@ -477,8 +478,7 @@ protected int isVisibleDO(Node currentNode, int level)
return 1;
}
- protected int isVisibleInt(Node currentNode)
- throws CanonicalizationException {
+ protected int isVisibleInt(Node currentNode) throws CanonicalizationException {
if (nodeFilter != null) {
for (NodeFilter filter : nodeFilter) {
try {
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerPhysical.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerPhysical.java
index 66ad12029fc0d..c0756d5e09c4a 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerPhysical.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerPhysical.java
@@ -68,6 +68,7 @@ public CanonicalizerPhysical() {
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException always
*/
+ @Override
public void engineCanonicalizeXPathNodeSet(Set xpathNodeSet, String inclusiveNamespaces, OutputStream writer)
throws CanonicalizationException {
@@ -83,6 +84,7 @@ public void engineCanonicalizeXPathNodeSet(Set xpathNodeSet, String inclus
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException
*/
+ @Override
public void engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces, OutputStream writer)
throws CanonicalizationException {
@@ -98,6 +100,7 @@ public void engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces,
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException
*/
+ @Override
public void engineCanonicalizeSubTree(
Node rootNode, String inclusiveNamespaces, boolean propagateDefaultNamespace, OutputStream writer)
throws CanonicalizationException {
@@ -165,6 +168,7 @@ protected void handleParent(Element e, NameSpaceSymbTable ns) {
}
/** {@inheritDoc} */
+ @Override
public final String engineGetURI() {
return Canonicalizer.ALGO_ID_C14N_PHYSICAL;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/NameSpaceSymbTable.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/NameSpaceSymbTable.java
index 2ffe680595793..290ff35ea6103 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/NameSpaceSymbTable.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/NameSpaceSymbTable.java
@@ -26,7 +26,6 @@
import java.util.Collection;
import java.util.List;
-
import org.w3c.dom.Attr;
import org.w3c.dom.Node;
@@ -74,16 +73,16 @@ public NameSpaceSymbTable() {
* @param result the list where to fill the unrendered xmlns definitions.
**/
public void getUnrenderedNodes(Collection result) {
- for (NameSpaceSymbEntry n : symb.entrySet()) {
+ for (NameSpaceSymbEntry nsEntry : symb.entrySet()) {
//put them rendered?
- if (!n.rendered && n.n != null) {
- n = n.clone();
+ if (!nsEntry.rendered && nsEntry.n != null) {
+ nsEntry = nsEntry.clone();
needsClone();
- symb.put(n.prefix, n);
- n.lastrendered = n.uri;
- n.rendered = true;
+ symb.put(nsEntry.prefix, nsEntry);
+ nsEntry.lastrendered = nsEntry.uri;
+ nsEntry.rendered = true;
- result.add(n.n);
+ result.add(nsEntry.n);
}
}
}
@@ -311,6 +310,7 @@ class NameSpaceSymbEntry implements Cloneable {
}
/** {@inheritDoc} */
+ @Override
public NameSpaceSymbEntry clone() { //NOPMD
try {
return (NameSpaceSymbEntry)super.clone();
@@ -344,9 +344,9 @@ void put(String key, NameSpaceSymbEntry value) {
List entrySet() {
List a = new ArrayList<>();
- for (int i = 0;i < entries.length;i++) {
- if (entries[i] != null && entries[i].uri.length() != 0) {
- a.add(entries[i]);
+ for (NameSpaceSymbEntry nsEntry : entries) {
+ if (nsEntry != null && !nsEntry.uri.isEmpty()) {
+ a.add(nsEntry);
}
}
return a;
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityException.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityException.java
index 98764012ea789..18314073d512d 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityException.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityException.java
@@ -160,6 +160,7 @@ public String getMsgID() {
}
/** {@inheritDoc} */
+ @Override
public String toString() {
String s = this.getClass().getName();
String message = super.getLocalizedMessage();
@@ -181,6 +182,7 @@ public String toString() {
* Method printStackTrace
*
*/
+ @Override
public void printStackTrace() {
synchronized (System.err) {
super.printStackTrace(System.err);
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyInfo.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyInfo.java
index 519df28b81413..62f25d1298daf 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyInfo.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyInfo.java
@@ -1184,6 +1184,7 @@ public void addStorageResolver(StorageResolver storageResolver) {
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_KEYINFO;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java
index 6a727b2c719c3..823a50366801f 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java
@@ -98,6 +98,7 @@ public String getId() {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_DERENCODEDKEYVALUE;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyInfoReference.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyInfoReference.java
index 89e95dec431f8..66ef3e36c8430 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyInfoReference.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyInfoReference.java
@@ -95,6 +95,7 @@ public String getId() {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_KEYINFOREFERENCE;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyName.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyName.java
index c098cfa8d1ffb..45c18b63014ec 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyName.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyName.java
@@ -65,6 +65,7 @@ public String getKeyName() {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_KEYNAME;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.java
index d30f504cf29e9..ee999e6578351 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.java
@@ -160,6 +160,7 @@ public PublicKey getPublicKey() throws XMLSecurityException {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_KEYVALUE;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/MgmtData.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/MgmtData.java
index 53fcf0f89543f..affe29c32764b 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/MgmtData.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/MgmtData.java
@@ -66,6 +66,7 @@ public String getMgmtData() {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_MGMTDATA;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/PGPData.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/PGPData.java
index 27e2550f4ddd4..240bf48a03b6c 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/PGPData.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/PGPData.java
@@ -44,6 +44,7 @@ public PGPData(Element element, String baseURI) throws XMLSecurityException {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_PGPDATA;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/RetrievalMethod.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/RetrievalMethod.java
index 82a949d34d3ba..84054ddd74540 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/RetrievalMethod.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/RetrievalMethod.java
@@ -129,6 +129,7 @@ public Transforms getTransforms() throws XMLSecurityException {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_RETRIEVALMETHOD;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/SPKIData.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/SPKIData.java
index a352c056ef770..23eaf1c12572a 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/SPKIData.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/SPKIData.java
@@ -45,6 +45,7 @@ public SPKIData(Element element, String baseURI)
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_SPKIDATA;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/X509Data.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/X509Data.java
index 06aeae25fa737..c7640e4e4e166 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/X509Data.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/X509Data.java
@@ -528,6 +528,7 @@ public boolean containsUnknownElement() {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_X509DATA;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/DSAKeyValue.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/DSAKeyValue.java
index 95697892df834..9b2a2d258eaf3 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/DSAKeyValue.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/DSAKeyValue.java
@@ -97,6 +97,7 @@ public DSAKeyValue(Document doc, Key key) throws IllegalArgumentException {
}
/** {@inheritDoc} */
+ @Override
public PublicKey getPublicKey() throws XMLSecurityException {
try {
DSAPublicKeySpec pkspec =
@@ -123,6 +124,7 @@ public PublicKey getPublicKey() throws XMLSecurityException {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_DSAKEYVALUE;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/ECKeyValue.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/ECKeyValue.java
index 0517aa4f711ea..839d9e4285da3 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/ECKeyValue.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/ECKeyValue.java
@@ -40,16 +40,15 @@
import javax.xml.crypto.MarshalException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
import com.sun.org.apache.xml.internal.security.utils.Constants;
import com.sun.org.apache.xml.internal.security.utils.I18n;
import com.sun.org.apache.xml.internal.security.utils.Signature11ElementProxy;
import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
public class ECKeyValue extends Signature11ElementProxy implements KeyValueContent {
@@ -161,6 +160,7 @@ public ECKeyValue(Document doc, Key key) throws IllegalArgumentException {
}
/** {@inheritDoc} */
+ @Override
public PublicKey getPublicKey() throws XMLSecurityException {
try {
ECParameterSpec ecParams = null;
@@ -210,6 +210,7 @@ public PublicKey getPublicKey() throws XMLSecurityException {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_ECKEYVALUE;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/RSAKeyValue.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/RSAKeyValue.java
index 5025dcd345f24..b691091e51867 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/RSAKeyValue.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/RSAKeyValue.java
@@ -93,6 +93,7 @@ public RSAKeyValue(Document doc, Key key) throws IllegalArgumentException {
}
/** {@inheritDoc} */
+ @Override
public PublicKey getPublicKey() throws XMLSecurityException {
try {
KeyFactory rsaFactory = KeyFactory.getInstance("RSA");
@@ -115,6 +116,7 @@ public PublicKey getPublicKey() throws XMLSecurityException {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_RSAKEYVALUE;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509CRL.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509CRL.java
index 5b50fa966cda6..2d0a13a85bb62 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509CRL.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509CRL.java
@@ -64,6 +64,7 @@ public byte[] getCRLBytes() throws XMLSecurityException {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_X509CRL;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Certificate.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Certificate.java
index 56844e472ff39..c50458f2bdc80 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Certificate.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Certificate.java
@@ -127,6 +127,7 @@ public PublicKey getPublicKey() throws XMLSecurityException, IOException {
}
/** {@inheritDoc} */
+ @Override
public boolean equals(Object obj) {
if (!(obj instanceof XMLX509Certificate)) {
return false;
@@ -139,12 +140,13 @@ public boolean equals(Object obj) {
}
}
+ @Override
public int hashCode() {
int result = 17;
try {
byte[] bytes = getCertificateBytes();
- for (int i = 0; i < bytes.length; i++) {
- result = 31 * result + bytes[i];
+ for (byte element : bytes) {
+ result = 31 * result + element;
}
} catch (XMLSecurityException e) {
LOG.debug(e.getMessage(), e);
@@ -153,6 +155,7 @@ public int hashCode() {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_X509CERTIFICATE;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Digest.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Digest.java
index 502a9a4dc82bd..7011016cfb699 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Digest.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Digest.java
@@ -132,6 +132,7 @@ public static byte[] getDigestBytesFromCert(X509Certificate cert, String algorit
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_X509DIGEST;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509IssuerSerial.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509IssuerSerial.java
index 0a186da2d9254..6e90ae6592cac 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509IssuerSerial.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509IssuerSerial.java
@@ -132,6 +132,7 @@ public String getIssuerName() {
}
/** {@inheritDoc} */
+ @Override
public boolean equals(Object obj) {
if (!(obj instanceof XMLX509IssuerSerial)) {
return false;
@@ -143,6 +144,7 @@ public boolean equals(Object obj) {
&& this.getIssuerName().equals(other.getIssuerName());
}
+ @Override
public int hashCode() {
int result = 17;
result = 31 * result + getSerialNumber().hashCode();
@@ -151,6 +153,7 @@ public int hashCode() {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_X509ISSUERSERIAL;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java
index 197d417c00eba..451f955ea3c20 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java
@@ -145,6 +145,7 @@ public static byte[] getSKIBytesFromCert(X509Certificate cert)
}
/** {@inheritDoc} */
+ @Override
public boolean equals(Object obj) {
if (!(obj instanceof XMLX509SKI)) {
return false;
@@ -159,12 +160,13 @@ public boolean equals(Object obj) {
}
}
+ @Override
public int hashCode() {
int result = 17;
try {
byte[] bytes = getSKIBytes();
- for (int i = 0; i < bytes.length; i++) {
- result = 31 * result + bytes[i];
+ for (byte element : bytes) {
+ result = 31 * result + element;
}
} catch (XMLSecurityException e) {
LOG.debug(e.getMessage(), e);
@@ -174,6 +176,7 @@ public int hashCode() {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_X509SKI;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SubjectName.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SubjectName.java
index 564c45e437adc..7b8008fef1225 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SubjectName.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SubjectName.java
@@ -80,6 +80,7 @@ public String getSubjectName() {
}
/** {@inheritDoc} */
+ @Override
public boolean equals(Object obj) {
if (!(obj instanceof XMLX509SubjectName)) {
return false;
@@ -92,6 +93,7 @@ public boolean equals(Object obj) {
return thisSubject.equals(otherSubject);
}
+ @Override
public int hashCode() {
int result = 17;
result = 31 * result + this.getSubjectName().hashCode();
@@ -99,6 +101,7 @@ public int hashCode() {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_X509SUBJECTNAME;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.java
index 7445013e9cbcc..f0e0785efe6d5 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.java
@@ -31,9 +31,6 @@
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
import com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.DEREncodedKeyValueResolver;
import com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.DSAKeyValueResolver;
import com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.ECKeyValueResolver;
@@ -47,6 +44,8 @@
import com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SubjectNameResolver;
import com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver;
import com.sun.org.apache.xml.internal.security.utils.JavaUtils;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
/**
* KeyResolver is factory class for subclass of KeyResolverSpi that
@@ -295,10 +294,12 @@ public ResolverIterator(List list) {
it = res.iterator();
}
+ @Override
public boolean hasNext() {
return it.hasNext();
}
+ @Override
public KeyResolverSpi next() {
KeyResolverSpi resolver = it.next();
if (resolver == null) {
@@ -308,6 +309,7 @@ public KeyResolverSpi next() {
return resolver;
}
+ @Override
public void remove() {
throw new UnsupportedOperationException("Can't remove resolvers using the iterator");
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/PrivateKeyResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/PrivateKeyResolver.java
index 20ecdbee0a5e9..a891104143fdd 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/PrivateKeyResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/PrivateKeyResolver.java
@@ -32,7 +32,9 @@
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Enumeration;
+
import javax.crypto.SecretKey;
+
import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
import com.sun.org.apache.xml.internal.security.keys.content.X509Data;
import com.sun.org.apache.xml.internal.security.keys.content.x509.XMLX509Certificate;
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RSAKeyValueResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RSAKeyValueResolver.java
index 6c21cf0130ec9..3c44833379879 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RSAKeyValueResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RSAKeyValueResolver.java
@@ -26,7 +26,6 @@
import java.security.PublicKey;
import java.security.cert.X509Certificate;
-
import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
import com.sun.org.apache.xml.internal.security.keys.content.keyvalues.RSAKeyValue;
import com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi;
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/SecretKeyResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/SecretKeyResolver.java
index f8b6040234992..761ac9fd01215 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/SecretKeyResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/SecretKeyResolver.java
@@ -27,7 +27,9 @@
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.cert.X509Certificate;
+
import javax.crypto.SecretKey;
+
import com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverException;
import com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi;
import com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver;
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/SingleKeyResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/SingleKeyResolver.java
index 6d543808354f3..4e6223fad06b3 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/SingleKeyResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/SingleKeyResolver.java
@@ -25,7 +25,9 @@
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.cert.X509Certificate;
+
import javax.crypto.SecretKey;
+
import com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverException;
import com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverSpi;
import com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver;
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509CertificateResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509CertificateResolver.java
index 0be1e5bf4f53e..7977a5538f29b 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509CertificateResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509CertificateResolver.java
@@ -86,8 +86,8 @@ protected X509Certificate engineResolveX509Certificate(
}
// populate Object array
- for (int i = 0; i < els.length; i++) {
- XMLX509Certificate xmlCert = new XMLX509Certificate(els[i], baseURI);
+ for (Element el : els) {
+ XMLX509Certificate xmlCert = new XMLX509Certificate(el, baseURI);
X509Certificate cert = xmlCert.getX509Certificate();
if (cert != null) {
return cert;
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509DigestResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509DigestResolver.java
index 9826ea3b9c8d7..047e7acbf5deb 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509DigestResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509DigestResolver.java
@@ -134,8 +134,7 @@ private X509Certificate resolveCertificate(Element element, String baseURI, Stor
while (storageIterator.hasNext()) {
X509Certificate cert = (X509Certificate) storageIterator.next();
- for (int i = 0; i < x509Digests.length; i++) {
- XMLX509Digest keyInfoDigest = x509Digests[i];
+ for (XMLX509Digest keyInfoDigest : x509Digests) {
byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm());
if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) {
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SKIResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SKIResolver.java
index c2d8f9cef608f..09150a548f129 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SKIResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SKIResolver.java
@@ -28,7 +28,6 @@
import java.security.cert.X509Certificate;
import java.util.Iterator;
-
import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
import com.sun.org.apache.xml.internal.security.keys.content.x509.XMLX509SKI;
import com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverException;
@@ -95,20 +94,18 @@ protected X509Certificate engineResolveX509Certificate(
}
XMLX509SKI[] x509childObject = new XMLX509SKI[x509childNodes.length];
-
for (int i = 0; i < x509childNodes.length; i++) {
x509childObject[i] = new XMLX509SKI(x509childNodes[i], baseURI);
}
Iterator storageIterator = storage.getIterator();
while (storageIterator.hasNext()) {
- X509Certificate cert = (X509Certificate)storageIterator.next();
+ X509Certificate cert = (X509Certificate) storageIterator.next();
XMLX509SKI certSKI = new XMLX509SKI(element.getOwnerDocument(), cert);
- for (int i = 0; i < x509childObject.length; i++) {
- if (certSKI.equals(x509childObject[i])) {
+ for (XMLX509SKI childNodeSKI : x509childObject) {
+ if (certSKI.equals(childNodeSKI)) {
LOG.debug("Return PublicKey from {}", cert.getSubjectX500Principal().getName());
-
return cert;
}
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SubjectNameResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SubjectNameResolver.java
index f90ff89671143..b2bd0770b1546 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SubjectNameResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SubjectNameResolver.java
@@ -28,7 +28,6 @@
import java.security.cert.X509Certificate;
import java.util.Iterator;
-
import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
import com.sun.org.apache.xml.internal.security.keys.content.x509.XMLX509SubjectName;
import com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverException;
@@ -101,18 +100,15 @@ protected X509Certificate engineResolveX509Certificate(
Iterator storageIterator = storage.getIterator();
while (storageIterator.hasNext()) {
- X509Certificate cert = (X509Certificate)storageIterator.next();
- XMLX509SubjectName certSN =
- new XMLX509SubjectName(element.getOwnerDocument(), cert);
-
+ X509Certificate cert = (X509Certificate) storageIterator.next();
+ XMLX509SubjectName certSN = new XMLX509SubjectName(element.getOwnerDocument(), cert);
LOG.debug("Found Certificate SN: {}", certSN.getSubjectName());
- for (int i = 0; i < x509childObject.length; i++) {
- LOG.debug("Found Element SN: {}", x509childObject[i].getSubjectName());
+ for (XMLX509SubjectName childSubject : x509childObject) {
+ LOG.debug("Found Element SN: {}", childSubject.getSubjectName());
- if (certSN.equals(x509childObject[i])) {
+ if (certSN.equals(childSubject)) {
LOG.debug("match !!! ");
-
return cert;
}
LOG.debug("no match...");
@@ -122,7 +118,6 @@ protected X509Certificate engineResolveX509Certificate(
return null;
} catch (XMLSecurityException ex) {
LOG.debug("XMLSecurityException", ex);
-
throw new KeyResolverException(ex);
}
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolver.java
index 2da744cad8c44..2b90e7901fdbe 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolver.java
@@ -133,6 +133,7 @@ public StorageResolverIterator(Iterator resolvers) {
}
/** {@inheritDoc} */
+ @Override
public boolean hasNext() {
if (currentResolver == null) {
return false;
@@ -147,6 +148,7 @@ public boolean hasNext() {
}
/** {@inheritDoc} */
+ @Override
public Certificate next() {
if (hasNext()) {
return currentResolver.next();
@@ -158,6 +160,7 @@ public Certificate next() {
/**
* Method remove
*/
+ @Override
public void remove() {
throw new UnsupportedOperationException("Can't remove keys from KeyStore");
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/KeyStoreResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/KeyStoreResolver.java
index 6f7ff7deb92e4..cfe9c6e98a59a 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/KeyStoreResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/KeyStoreResolver.java
@@ -64,6 +64,7 @@ public KeyStoreResolver(KeyStore keyStore) throws StorageResolverException {
}
/** {@inheritDoc} */
+ @Override
public Iterator getIterator() {
return new KeyStoreIterator(this.keyStore);
}
@@ -103,11 +104,13 @@ public KeyStoreIterator(KeyStore keyStore) {
}
/** {@inheritDoc} */
+ @Override
public boolean hasNext() {
return this.i < this.certs.size();
}
/** {@inheritDoc} */
+ @Override
public Certificate next() {
if (hasNext()) {
return this.certs.get(this.i++);
@@ -119,6 +122,7 @@ public Certificate next() {
/**
* Method remove
*/
+ @Override
public void remove() {
throw new UnsupportedOperationException("Can't remove keys from KeyStore");
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/SingleCertificateResolver.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/SingleCertificateResolver.java
index 2b57b3c4e2cba..9476cfdffe52b 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/SingleCertificateResolver.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/SingleCertificateResolver.java
@@ -46,6 +46,7 @@ public SingleCertificateResolver(X509Certificate x509cert) {
}
/** {@inheritDoc} */
+ @Override
public Iterator getIterator() {
return new InternalIterator(this.certificate);
}
@@ -71,11 +72,13 @@ public InternalIterator(X509Certificate x509cert) {
}
/** {@inheritDoc} */
+ @Override
public boolean hasNext() {
return !this.alreadyReturned;
}
/** {@inheritDoc} */
+ @Override
public Certificate next() {
if (this.alreadyReturned) {
throw new NoSuchElementException();
@@ -87,6 +90,7 @@ public Certificate next() {
/**
* Method remove
*/
+ @Override
public void remove() {
throw new UnsupportedOperationException("Can't remove keys from KeyStore");
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/parser/XMLParser.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/parser/XMLParser.java
index 0942b6b296f7c..24acfe33aa93b 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/parser/XMLParser.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/parser/XMLParser.java
@@ -31,6 +31,15 @@
*/
public interface XMLParser {
+ /**
+ * Parses a document from the input stream.
+ * Caller is responsible for closing the stream.
+ *
+ * @param inputStream
+ * @param disallowDocTypeDeclarations
+ * @return {@link Document}
+ * @throws XMLParserException
+ */
Document parse(InputStream inputStream, boolean disallowDocTypeDeclarations) throws XMLParserException;
}
\ No newline at end of file
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/parser/XMLParserImpl.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/parser/XMLParserImpl.java
index be28d2861a26e..91f4054dc896e 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/parser/XMLParserImpl.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/parser/XMLParserImpl.java
@@ -51,10 +51,10 @@ public class XMLParserImpl implements XMLParser {
(PrivilegedAction) () -> Integer.getInteger("com.sun.org.apache.xml.internal.security.parser.pool-size", 20));
private static final Map> DOCUMENT_BUILDERS =
- Collections.synchronizedMap(new WeakHashMap>());
+ Collections.synchronizedMap(new WeakHashMap<>());
private static final Map> DOCUMENT_BUILDERS_DISALLOW_DOCTYPE =
- Collections.synchronizedMap(new WeakHashMap>());
+ Collections.synchronizedMap(new WeakHashMap<>());
@Override
public Document parse(InputStream inputStream, boolean disallowDocTypeDeclarations) throws XMLParserException {
@@ -119,6 +119,7 @@ private static ClassLoader getContextClassLoader() {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
return AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
}
@@ -132,6 +133,7 @@ private static ClassLoader getClassLoader(final Class> clazz) {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
return AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
public ClassLoader run() {
return clazz.getClassLoader();
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/Manifest.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/Manifest.java
index 9d0ac02d75ec1..f63ac107fd09d 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/Manifest.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/Manifest.java
@@ -575,6 +575,7 @@ public int getSignedContentLength() {
*
* {@inheritDoc}
*/
+ @Override
public String getBaseLocalName() {
return Constants._TAG_MANIFEST;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/ObjectContainer.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/ObjectContainer.java
index 5ab6c36164379..d1f049b5bc9e2 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/ObjectContainer.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/ObjectContainer.java
@@ -130,6 +130,7 @@ public Node appendChild(Node node) {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_OBJECT;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/Reference.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/Reference.java
index 384436b7b4e1b..9636031b9a5f8 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/Reference.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/Reference.java
@@ -193,10 +193,12 @@ protected Reference(
// Create DigestMethod Element without actually instantiating a MessageDigest Object
Algorithm digestAlgorithm = new Algorithm(getDocument(), messageDigestAlgorithm) {
+ @Override
public String getBaseNamespace() {
return Constants.SignatureSpecNS;
}
+ @Override
public String getBaseLocalName() {
return Constants._TAG_DIGESTMETHOD;
}
@@ -612,6 +614,7 @@ private void cacheDereferencedElement(XMLSignatureInput input) {
try {
final Set s = input.getNodeSet();
referenceData = new ReferenceNodeSetData() {
+ @Override
public Iterator iterator() {
return new Iterator() {
@@ -808,6 +811,7 @@ public boolean verify()
* Method getBaseLocalName
* {@inheritDoc}
*/
+ @Override
public String getBaseLocalName() {
return Constants._TAG_REFERENCE;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperties.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperties.java
index e409c99250010..8434b291c94d0 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperties.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperties.java
@@ -139,6 +139,7 @@ public void addSignatureProperty(SignatureProperty sp) {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_SIGNATUREPROPERTIES;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperty.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperty.java
index 1929f126a1434..bc9a7003c46a7 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperty.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperty.java
@@ -126,6 +126,7 @@ public Node appendChild(Node node) {
}
/** {@inheritDoc} */
+ @Override
public String getBaseLocalName() {
return Constants._TAG_SIGNATUREPROPERTY;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignedInfo.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignedInfo.java
index 6d4e4adf740df..90511f10fbc54 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignedInfo.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/SignedInfo.java
@@ -27,6 +27,7 @@
import java.io.OutputStream;
import java.security.Provider;
import java.security.spec.AlgorithmParameterSpec;
+
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
@@ -38,7 +39,6 @@
import com.sun.org.apache.xml.internal.security.transforms.params.InclusiveNamespaces;
import com.sun.org.apache.xml.internal.security.utils.Constants;
import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
-
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -401,6 +401,7 @@ public SignatureAlgorithm getSignatureAlgorithm() {
* {@inheritDoc}
*
*/
+ @Override
public String getBaseLocalName() {
return Constants._TAG_SIGNEDINFO;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java
index dff41c30e5180..cfa545e5826c6 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java
@@ -1031,6 +1031,7 @@ public void setFollowNestedManifests(boolean followManifests) {
*
* @return Constants._TAG_SIGNATURE
*/
+ @Override
public String getBaseLocalName() {
return Constants._TAG_SIGNATURE;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.java
index 165bc98721fb5..1f192e0553374 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.java
@@ -391,6 +391,7 @@ public void setSourceURI(String sourceURI) {
* Method toString
* {@inheritDoc}
*/
+ @Override
public String toString() {
if (isNodeSet()) {
return "XMLSignatureInput/NodeSet/" + inputNodeSet.size()
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/reference/ReferenceSubTreeData.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/reference/ReferenceSubTreeData.java
index 215206015f871..14050f0715e3d 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/reference/ReferenceSubTreeData.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/reference/ReferenceSubTreeData.java
@@ -30,6 +30,7 @@
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
+
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -51,6 +52,7 @@ public ReferenceSubTreeData(Node root, boolean excludeComments) {
this.excludeComments = excludeComments;
}
+ @Override
public Iterator iterator() {
return new DelayedNodeIterator(root, excludeComments);
}
@@ -78,6 +80,7 @@ static class DelayedNodeIterator implements Iterator {
this.withComments = !excludeComments;
}
+ @Override
public boolean hasNext() {
if (nodeSet == null) {
nodeSet = dereferenceSameDocumentURI(root);
@@ -86,6 +89,7 @@ public boolean hasNext() {
return li.hasNext();
}
+ @Override
public Node next() {
if (nodeSet == null) {
nodeSet = dereferenceSameDocumentURI(root);
@@ -98,6 +102,7 @@ public Node next() {
}
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java
index 0534fff3844b9..2d5c019654996 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java
@@ -108,7 +108,7 @@ private Base64() {
* @param bitlen {@code int} the desired length in bits of the representation
* @return a byte array with {@code bitlen} bits of {@code big}
*/
- static final byte[] getBytes(BigInteger big, int bitlen) {
+ static byte[] getBytes(BigInteger big, int bitlen) {
//round bitlen
bitlen = ((bitlen + 7) >> 3) << 3;
@@ -148,7 +148,7 @@ static final byte[] getBytes(BigInteger big, int bitlen) {
* @param big
* @return String with Base64 encoding
*/
- public static final String encode(BigInteger big) {
+ public static String encode(BigInteger big) {
byte[] bytes = XMLUtils.getBytes(big, big.bitLength());
return XMLUtils.encodeToString(bytes);
}
@@ -164,7 +164,7 @@ public static final String encode(BigInteger big) {
* @param bitlen {@code int} the desired length in bits of the representation
* @return a byte array with {@code bitlen} bits of {@code big}
*/
- public static final byte[] encode(BigInteger big, int bitlen) {
+ public static byte[] encode(BigInteger big, int bitlen) {
//round bitlen
bitlen = ((bitlen + 7) >> 3) << 3;
@@ -205,7 +205,7 @@ public static final byte[] encode(BigInteger big, int bitlen) {
* @return the biginteger obtained from the node
* @throws Base64DecodingException
*/
- public static final BigInteger decodeBigIntegerFromElement(Element element)
+ public static BigInteger decodeBigIntegerFromElement(Element element)
throws Base64DecodingException {
return new BigInteger(1, Base64.decode(element));
}
@@ -216,7 +216,7 @@ public static final BigInteger decodeBigIntegerFromElement(Element element)
* @return a decoded BigInteger
* @throws Base64DecodingException
*/
- public static final BigInteger decodeBigIntegerFromText(Text text)
+ public static BigInteger decodeBigIntegerFromText(Text text)
throws Base64DecodingException {
return new BigInteger(1, Base64.decode(text.getData()));
}
@@ -228,7 +228,7 @@ public static final BigInteger decodeBigIntegerFromText(Text text)
* @param element
* @param biginteger
*/
- public static final void fillElementWithBigInteger(Element element, BigInteger biginteger) {
+ public static void fillElementWithBigInteger(Element element, BigInteger biginteger) {
String encodedInt = encode(biginteger);
@@ -253,7 +253,7 @@ public static final void fillElementWithBigInteger(Element element, BigInteger b
* $todo$ not tested yet
* @throws Base64DecodingException
*/
- public static final byte[] decode(Element element) throws Base64DecodingException {
+ public static byte[] decode(Element element) throws Base64DecodingException {
Node sibling = element.getFirstChild();
StringBuilder sb = new StringBuilder();
@@ -279,7 +279,7 @@ public static final byte[] decode(Element element) throws Base64DecodingExceptio
* @return an Element with the base64 encoded in the text.
*
*/
- public static final Element encodeToElement(Document doc, String localName, byte[] bytes) {
+ public static Element encodeToElement(Document doc, String localName, byte[] bytes) {
Element el = XMLUtils.createElementInSignatureSpace(doc, localName);
Text text = doc.createTextNode(encode(bytes));
@@ -296,7 +296,7 @@ public static final Element encodeToElement(Document doc, String localName, byte
* @throws Base64DecodingException
*
*/
- public static final byte[] decode(byte[] base64) throws Base64DecodingException {
+ public static byte[] decode(byte[] base64) throws Base64DecodingException {
return decodeInternal(base64, -1);
}
@@ -307,7 +307,7 @@ public static final byte[] decode(byte[] base64) throws Base64DecodingException
* @param binaryData {@code byte[]} to be base64 encoded
* @return the {@code String} with encoded data
*/
- public static final String encode(byte[] binaryData) {
+ public static String encode(byte[] binaryData) {
return XMLUtils.ignoreLineBreaks()
? encode(binaryData, Integer.MAX_VALUE)
: encode(binaryData, BASE64DEFAULTLENGTH);
@@ -323,7 +323,7 @@ public static final String encode(byte[] binaryData) {
* @throws IOException
* @throws Base64DecodingException
*/
- public static final byte[] decode(BufferedReader reader)
+ public static byte[] decode(BufferedReader reader)
throws IOException, Base64DecodingException {
byte[] retBytes = null;
@@ -342,11 +342,11 @@ public static final byte[] decode(BufferedReader reader)
return retBytes;
}
- protected static final boolean isWhiteSpace(byte octet) {
+ protected static boolean isWhiteSpace(byte octet) {
return octet == 0x20 || octet == 0xd || octet == 0xa || octet == 0x9;
}
- protected static final boolean isPad(byte octet) {
+ protected static boolean isPad(byte octet) {
return octet == PAD;
}
@@ -364,7 +364,7 @@ protected static final boolean isPad(byte octet) {
* @param length {@code int} length of wrapped lines; No wrapping if less than 4.
* @return a {@code String} with encoded data
*/
- public static final String encode(byte[] binaryData, int length) {
+ public static String encode(byte[] binaryData, int length) {
if (length < 4) {
length = Integer.MAX_VALUE;
}
@@ -474,7 +474,7 @@ public static final String encode(byte[] binaryData, int length) {
* @return byte array containing the decoded data
* @throws Base64DecodingException if there is a problem decoding the data
*/
- public static final byte[] decode(String encoded) throws Base64DecodingException {
+ public static byte[] decode(String encoded) throws Base64DecodingException {
if (encoded == null) {
return null;
}
@@ -483,7 +483,7 @@ public static final byte[] decode(String encoded) throws Base64DecodingException
return decodeInternal(bytes, len);
}
- protected static final int getBytesInternal(String s, byte[] result) {
+ protected static int getBytesInternal(String s, byte[] result) {
int length = s.length();
int newSize = 0;
@@ -496,7 +496,7 @@ protected static final int getBytesInternal(String s, byte[] result) {
return newSize;
}
- protected static final byte[] decodeInternal(byte[] base64Data, int len)
+ protected static byte[] decodeInternal(byte[] base64Data, int len)
throws Base64DecodingException {
// remove white spaces
if (len == -1) {
@@ -591,7 +591,7 @@ protected static final byte[] decodeInternal(byte[] base64Data, int len)
* @throws IOException
* @throws Base64DecodingException
*/
- public static final void decode(String base64Data, OutputStream os)
+ public static void decode(String base64Data, OutputStream os)
throws Base64DecodingException, IOException {
byte[] bytes = new byte[base64Data.length()];
int len = getBytesInternal(base64Data, bytes);
@@ -606,12 +606,12 @@ public static final void decode(String base64Data, OutputStream os)
* @throws IOException
* @throws Base64DecodingException
*/
- public static final void decode(byte[] base64Data, OutputStream os)
+ public static void decode(byte[] base64Data, OutputStream os)
throws Base64DecodingException, IOException {
decode(base64Data, os, -1);
}
- protected static final void decode(byte[] base64Data, OutputStream os, int len)
+ protected static void decode(byte[] base64Data, OutputStream os, int len)
throws Base64DecodingException, IOException {
// remove white spaces
if (len == -1) {
@@ -694,7 +694,7 @@ protected static final void decode(byte[] base64Data, OutputStream os, int len)
* @throws IOException
* @throws Base64DecodingException
*/
- public static final void decode(InputStream is, OutputStream os)
+ public static void decode(InputStream is, OutputStream os)
throws Base64DecodingException, IOException {
//byte[] decodedData = null;
byte b1 = 0, b2 = 0, b3 = 0, b4 = 0;
@@ -771,7 +771,7 @@ public static final void decode(InputStream is, OutputStream os)
* @param data the byte array of base64 data (with WS)
* @return the new length
*/
- protected static final int removeWhiteSpace(byte[] data) {
+ protected static int removeWhiteSpace(byte[] data) {
if (data == null) {
return 0;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/DOMNamespaceContext.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/DOMNamespaceContext.java
index 6a2f5d5af260e..0c2c5c8404398 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/DOMNamespaceContext.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/DOMNamespaceContext.java
@@ -84,6 +84,7 @@ public void setContext(Node context) {
this.context = context;
}
+ @Override
public String getNamespaceURI(String prefix) {
if (prefix == null) {
throw new IllegalArgumentException("prefix is null");
@@ -107,6 +108,7 @@ public String getNamespaceURI(String prefix) {
return NULL_NS_URI;
}
+ @Override
public String getPrefix(String namespaceURI) {
if (namespaceURI == null) {
throw new IllegalArgumentException("namespace URI is null");
@@ -140,6 +142,7 @@ public String getPrefix(String namespaceURI) {
/**
* Throws {@link UnsupportedOperationException}.
*/
+ @Override
public Iterator getPrefixes(String namespaceURI) {
throw new UnsupportedOperationException();
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/DigesterOutputStream.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/DigesterOutputStream.java
index 8f584c354f6cd..06840f74e41b8 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/DigesterOutputStream.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/DigesterOutputStream.java
@@ -43,16 +43,19 @@ public DigesterOutputStream(MessageDigestAlgorithm mda) {
}
/** {@inheritDoc} */
+ @Override
public void write(byte[] arg0) {
write(arg0, 0, arg0.length);
}
/** {@inheritDoc} */
- public void write(int arg0) {
+ @Override
+ public synchronized void write(int arg0) {
mda.update((byte)arg0);
}
/** {@inheritDoc} */
+ @Override
public void write(byte[] arg0, int arg1, int arg2) {
if (LOG.isDebugEnabled()) {
LOG.debug("Pre-digested input:");
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java
index c1d4c5d0367b8..6f061fc977244 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java
@@ -23,8 +23,8 @@
package com.sun.org.apache.xml.internal.security.utils;
import java.math.BigInteger;
-import java.util.concurrent.ConcurrentHashMap;
import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
import org.w3c.dom.Attr;
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/HelperNodeList.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/HelperNodeList.java
index 65f9b8f93f9ba..b198861d0419a 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/HelperNodeList.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/HelperNodeList.java
@@ -57,6 +57,7 @@ public HelperNodeList(boolean allNodesMustHaveSameParent) {
* @param index
* @return node with index i
*/
+ @Override
public Node item(int index) {
return nodes.get(index);
}
@@ -66,6 +67,7 @@ public Node item(int index) {
*
* @return length of the list
*/
+ @Override
public int getLength() {
return nodes.size();
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JDKXPathAPI.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JDKXPathAPI.java
index e6b65e07a005f..ea5524e3b8bea 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JDKXPathAPI.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JDKXPathAPI.java
@@ -57,6 +57,7 @@ class JDKXPathAPI implements XPathAPI {
*
* @throws TransformerException
*/
+ @Override
public NodeList selectNodeList(
Node contextNode, Node xpathnode, String str, Node namespaceNode
) throws TransformerException {
@@ -92,6 +93,7 @@ public NodeList selectNodeList(
* @param str The XPath expression
* @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces.
*/
+ @Override
public boolean evaluate(Node contextNode, Node xpathnode, String str, Node namespaceNode)
throws TransformerException {
if (!str.equals(xpathStr) || xpathExpression == null) {
@@ -122,6 +124,7 @@ public boolean evaluate(Node contextNode, Node xpathnode, String str, Node names
/**
* Clear any context information from this object
*/
+ @Override
public void clear() {
xpathStr = null;
xpathExpression = null;
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JDKXPathFactory.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JDKXPathFactory.java
index 98c1872898a61..2659fc0ecd0bc 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JDKXPathFactory.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JDKXPathFactory.java
@@ -31,6 +31,7 @@ public class JDKXPathFactory extends XPathFactory {
/**
* Get a new XPathAPI instance
*/
+ @Override
public XPathAPI newXPathAPI() {
return new JDKXPathAPI();
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JavaUtils.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JavaUtils.java
index 4f5cb7d68a99b..647675ae61cbe 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JavaUtils.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/JavaUtils.java
@@ -95,7 +95,7 @@ public static void writeBytesToFilename(String filename, byte[] bytes) {
/**
* This method reads all bytes from the given InputStream till EOF and
- * returns them as a byte array.
+ * returns them as a byte array. The method doesn't close the input stream.
*
* @param inputStream
* @return the bytes read from the stream
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Signature11ElementProxy.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Signature11ElementProxy.java
index 6a5981f61cb9f..086698cdad512 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Signature11ElementProxy.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Signature11ElementProxy.java
@@ -69,6 +69,7 @@ public Signature11ElementProxy(Element element, String baseURI) throws XMLSecuri
}
/** {@inheritDoc} */
+ @Override
public String getBaseNamespace() {
return Constants.SignatureSpec11NS;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/SignatureElementProxy.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/SignatureElementProxy.java
index e10f09fa7e564..847ed4ecefbcf 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/SignatureElementProxy.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/SignatureElementProxy.java
@@ -63,6 +63,7 @@ public SignatureElementProxy(Element element, String baseURI) throws XMLSecurity
}
/** {@inheritDoc} */
+ @Override
public String getBaseNamespace() {
return Constants.SignatureSpecNS;
}
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/SignerOutputStream.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/SignerOutputStream.java
index beb0604f2e63b..04c255504ef80 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/SignerOutputStream.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/SignerOutputStream.java
@@ -44,6 +44,7 @@ public SignerOutputStream(SignatureAlgorithm sa) {
}
/** {@inheritDoc} */
+ @Override
public void write(byte[] arg0) {
try {
sa.update(arg0);
@@ -53,6 +54,7 @@ public void write(byte[] arg0) {
}
/** {@inheritDoc} */
+ @Override
public void write(int arg0) {
try {
sa.update((byte)arg0);
@@ -62,6 +64,7 @@ public void write(int arg0) {
}
/** {@inheritDoc} */
+ @Override
public void write(byte[] arg0, int arg1, int arg2) {
if (LOG.isDebugEnabled()) {
LOG.debug("Canonicalized SignedInfo:");
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java
index a0358ffbf770d..f0dc1432d5a9d 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java
@@ -44,6 +44,7 @@ public UnsyncByteArrayOutputStream() {
buf = new byte[INITIAL_SIZE];
}
+ @Override
public void write(byte[] arg0) {
if ((VM_ARRAY_INDEX_MAX_VALUE - pos) < arg0.length) {
throw new OutOfMemoryError("Required length exceeds implementation limit");
@@ -56,6 +57,7 @@ public void write(byte[] arg0) {
pos = newPos;
}
+ @Override
public void write(byte[] arg0, int arg1, int arg2) {
if ((VM_ARRAY_INDEX_MAX_VALUE - pos) < arg2) {
throw new OutOfMemoryError("Required length exceeds implementation limit");
@@ -68,6 +70,7 @@ public void write(byte[] arg0, int arg1, int arg2) {
pos = newPos;
}
+ @Override
public void write(int arg0) {
if (VM_ARRAY_INDEX_MAX_VALUE - pos == 0) {
throw new OutOfMemoryError("Required length exceeds implementation limit");
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java
index 446d640194e09..ca1eea1da44cb 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java
@@ -22,11 +22,15 @@
*/
package com.sun.org.apache.xml.internal.security.utils;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.InvocationTargetException;
import java.math.BigInteger;
+import java.nio.file.Files;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
@@ -42,6 +46,8 @@
import com.sun.org.apache.xml.internal.security.parser.XMLParser;
import com.sun.org.apache.xml.internal.security.parser.XMLParserException;
import com.sun.org.apache.xml.internal.security.parser.XMLParserImpl;
+import com.sun.org.slf4j.internal.Logger;
+import com.sun.org.slf4j.internal.LoggerFactory;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -50,6 +56,8 @@
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
+import static java.nio.charset.StandardCharsets.UTF_8;
+
/**
* DOM and XML accessibility and comfort functions.
*
@@ -61,8 +69,7 @@ public final class XMLUtils {
AccessController.doPrivileged(
(PrivilegedAction) () -> Boolean.getBoolean("com.sun.org.apache.xml.internal.security.ignoreLineBreaks"));
- private static final com.sun.org.slf4j.internal.Logger LOG =
- com.sun.org.slf4j.internal.LoggerFactory.getLogger(XMLUtils.class);
+ private static final Logger LOG = LoggerFactory.getLogger(XMLUtils.class);
@SuppressWarnings("removal")
private static XMLParser xmlParserImpl =
@@ -74,7 +81,7 @@ public final class XMLUtils {
return (XMLParser) JavaUtils.newInstanceWithEmptyConstructor(
ClassLoaderUtils.loadClass(xmlParserClass, XMLUtils.class));
} catch (ClassNotFoundException | IllegalAccessException | InstantiationException | InvocationTargetException e) {
- LOG.error("Error instantiating XMLParser. Falling back to XMLParserImpl");
+ LOG.error("Error instantiating XMLParser. Falling back to XMLParserImpl", e);
}
}
return new XMLParserImpl();
@@ -149,18 +156,18 @@ public static Element getNextElement(Node el) {
* @param rootNode
* @param result
* @param exclude
- * @param com whether comments or not
+ * @param comments whether comments or not
*/
- public static void getSet(Node rootNode, Set result, Node exclude, boolean com) {
+ public static void getSet(Node rootNode, Set result, Node exclude, boolean comments) {
if (exclude != null && isDescendantOrSelf(exclude, rootNode)) {
return;
}
- getSetRec(rootNode, result, exclude, com);
+ getSetRec(rootNode, result, exclude, comments);
}
@SuppressWarnings("fallthrough")
private static void getSetRec(final Node rootNode, final Set result,
- final Node exclude, final boolean com) {
+ final Node exclude, final boolean comments) {
if (rootNode == exclude) {
return;
}
@@ -187,11 +194,11 @@ private static void getSetRec(final Node rootNode, final Set result,
return;
}
}
- getSetRec(r, result, exclude, com);
+ getSetRec(r, result, exclude, comments);
}
break;
case Node.COMMENT_NODE:
- if (com) {
+ if (comments) {
result.add(rootNode);
}
break;
@@ -202,6 +209,18 @@ private static void getSetRec(final Node rootNode, final Set result,
}
}
+ /**
+ * Outputs a DOM tree to a {@link File}.
+ *
+ * @param contextNode root node of the DOM tree
+ * @param outputFile the file to write to
+ * @throws IOException
+ */
+ public static void outputDOM(Node contextNode, File outputFile) throws IOException {
+ try (OutputStream os = new BufferedOutputStream(Files.newOutputStream(outputFile.toPath()), 8192)) {
+ outputDOM(contextNode, os, false);
+ }
+ }
/**
* Outputs a DOM tree to an {@link OutputStream}.
@@ -210,7 +229,7 @@ private static void getSetRec(final Node rootNode, final Set result,
* @param os the {@link OutputStream}
*/
public static void outputDOM(Node contextNode, OutputStream os) {
- XMLUtils.outputDOM(contextNode, os, false);
+ outputDOM(contextNode, os, false);
}
/**
@@ -225,13 +244,12 @@ public static void outputDOM(Node contextNode, OutputStream os) {
public static void outputDOM(Node contextNode, OutputStream os, boolean addPreamble) {
try {
if (addPreamble) {
- os.write("\n".getBytes(java.nio.charset.StandardCharsets.UTF_8));
+ os.write("\n".getBytes(UTF_8));
}
-
Canonicalizer.getInstance(
Canonicalizer.ALGO_ID_C14N_PHYSICAL).canonicalizeSubtree(contextNode, os);
} catch (IOException | InvalidCanonicalizerException | CanonicalizationException ex) {
- LOG.debug(ex.getMessage(), ex);
+ LOG.error(ex.getMessage(), ex);
}
}
@@ -253,7 +271,7 @@ public static void outputDOMc14nWithComments(Node contextNode, OutputStream os)
Canonicalizer.getInstance(
Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS).canonicalizeSubtree(contextNode, os);
} catch (InvalidCanonicalizerException | CanonicalizationException ex) {
- LOG.debug(ex.getMessage(), ex);
+ LOG.error(ex.getMessage(), ex);
// throw new RuntimeException(ex.getMessage());
}
}
@@ -862,7 +880,7 @@ public static boolean protectAgainstWrappingAttack(Node startNode, String value)
// Continue searching to find duplicates
foundElement = attr.getOwnerElement();
} else {
- LOG.debug("Multiple elements with the same 'Id' attribute value!");
+ LOG.warn("Multiple elements with the same 'Id' attribute value!");
return false;
}
}
@@ -921,8 +939,8 @@ public static boolean protectAgainstWrappingAttack(
int length = attributes.getLength();
for (int i = 0; i < length; i++) {
Attr attr = (Attr)attributes.item(i);
- if (attr.isId() && id.equals(attr.getValue()) && se != knownElement) {
- LOG.debug("Multiple elements with the same 'Id' attribute value!");
+ if (attr.isId() && id.equals(attr.getValue()) && !knownElement.isSameNode(se)) {
+ LOG.warn("Multiple elements with the same 'Id' attribute value!");
return false;
}
}
@@ -952,6 +970,49 @@ public static boolean protectAgainstWrappingAttack(
return true;
}
+ /**
+ * Reads a document from the input stream.
+ *
+ * @param file
+ * @param disallowDocTypeDeclarations
+ * @return {@link Document}
+ * @throws XMLParserException
+ * @throws IOException
+ */
+ public static Document read(File file, boolean disallowDocTypeDeclarations) throws XMLParserException, IOException {
+ try (InputStream inputStream = new BufferedInputStream(Files.newInputStream(file.toPath()), 8192)) {
+ return read(inputStream, disallowDocTypeDeclarations);
+ }
+ }
+
+ /**
+ * Reads a document from the input stream and closes it.
+ *
+ * @param name - resource name to be opened by the class loader
+ * @param loader
+ * @param disallowDocTypeDeclarations
+ * @return {@link Document}
+ * @throws XMLParserException
+ * @throws IOException inputStream.close() failed.
+ */
+ public static Document readResource(String name, ClassLoader loader, boolean disallowDocTypeDeclarations)
+ throws XMLParserException, IOException {
+ // Delegate to XMLParser implementation
+ try (InputStream inputStream = loader.getResourceAsStream(name)) {
+ return read(inputStream, disallowDocTypeDeclarations);
+ }
+
+ }
+
+ /**
+ * Reads a document from the input stream.
+ * Caller is responsible for closing the stream.
+ *
+ * @param inputStream
+ * @param disallowDocTypeDeclarations
+ * @return {@link Document}
+ * @throws XMLParserException
+ */
public static Document read(InputStream inputStream, boolean disallowDocTypeDeclarations) throws XMLParserException {
// Delegate to XMLParser implementation
return xmlParserImpl.parse(inputStream, disallowDocTypeDeclarations);
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java
index c1f9e199fb2c8..deda69e98b960 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java
@@ -27,8 +27,8 @@
import java.io.InputStream;
import java.net.InetSocketAddress;
import java.net.Proxy;
-import java.net.URISyntaxException;
import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.StandardCharsets;
@@ -205,6 +205,7 @@ private URLConnection openConnection(URL url, ResourceResolverContext context) t
* @param context
* @return true if can be resolved
*/
+ @Override
public boolean engineCanResolveURI(ResourceResolverContext context) {
if (context.uriToResolve == null) {
LOG.debug("quick fail, uri == null");
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverFragment.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverFragment.java
index 9af7ee1feff2f..4526a8a1d51a5 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverFragment.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverFragment.java
@@ -110,6 +110,7 @@ public XMLSignatureInput engineResolveURI(ResourceResolverContext context)
* {@inheritDoc}
* @param context
*/
+ @Override
public boolean engineCanResolveURI(ResourceResolverContext context) {
if (context.uriToResolve == null) {
LOG.debug("Quick fail for null uri");
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverLocalFilesystem.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverLocalFilesystem.java
index 9d7e00bdbd6bd..d3970a3ea6940 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverLocalFilesystem.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverLocalFilesystem.java
@@ -66,6 +66,7 @@ public XMLSignatureInput engineResolveURI(ResourceResolverContext context)
/**
* {@inheritDoc}
*/
+ @Override
public boolean engineCanResolveURI(ResourceResolverContext context) {
if (context.uriToResolve == null) {
return false;
diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverXPointer.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverXPointer.java
index c3608800ece17..fc0447ec21b6c 100644
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverXPointer.java
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverXPointer.java
@@ -104,6 +104,7 @@ public XMLSignatureInput engineResolveURI(ResourceResolverContext context)
/**
* {@inheritDoc}
*/
+ @Override
public boolean engineCanResolveURI(ResourceResolverContext context) {
return isXPointerSlash(context.uriToResolve) || isXPointerId(context.uriToResolve);
}
diff --git a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/SignatureMethod.java b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/SignatureMethod.java
index 6bb1b2d2da090..bf7bb59c9e161 100644
--- a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/SignatureMethod.java
+++ b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/SignatureMethod.java
@@ -275,6 +275,43 @@ public interface SignatureMethod extends XMLStructure, AlgorithmMethod {
*/
String ED448 = "http://www.w3.org/2021/04/xmldsig-more#eddsa-ed448";
+ /**
+ * The
+ * SHA3-224-RSA-MGF1 (PKCS #1) signature method algorithm URI.
+ *
+ * @since 22
+ */
+ String SHA3_224_RSA_MGF1 =
+ "http://www.w3.org/2007/05/xmldsig-more#sha3-224-rsa-MGF1";
+
+ /**
+ * The
+ * SHA3-256-RSA-MGF1 (PKCS #1) signature method algorithm URI.
+ *
+ * @since 22
+ */
+ String SHA3_256_RSA_MGF1 =
+ "http://www.w3.org/2007/05/xmldsig-more#sha3-256-rsa-MGF1";
+
+ /**
+ * The
+ * SHA3-384-RSA-MGF1 (PKCS #1) signature method algorithm URI.
+ *
+ * @since 22
+ */
+ String SHA3_384_RSA_MGF1 =
+ "http://www.w3.org/2007/05/xmldsig-more#sha3-384-rsa-MGF1";
+
+ /**
+ * The
+ * SHA3-512-RSA-MGF1 (PKCS #1) signature method algorithm URI.
+ *
+ * @since 22
+ */
+ String SHA3_512_RSA_MGF1 =
+ "http://www.w3.org/2007/05/xmldsig-more#sha3-512-rsa-MGF1";
+
+
/**
* Returns the algorithm-specific input parameters of this
* SignatureMethod
.
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/DigesterOutputStream.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/DigesterOutputStream.java
index 774eb36206521..3b03dc8024bb1 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/DigesterOutputStream.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/DigesterOutputStream.java
@@ -71,6 +71,7 @@ public DigesterOutputStream(MessageDigest md, boolean buffer) {
}
}
+ @Override
public void write(int input) {
if (buffer) {
bos.write(input);
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/MacOutputStream.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/MacOutputStream.java
index be554308928ad..727b3b966a03f 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/MacOutputStream.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/MacOutputStream.java
@@ -23,6 +23,7 @@
package org.jcp.xml.dsig.internal;
import java.io.ByteArrayOutputStream;
+
import javax.crypto.Mac;
/**
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/AbstractDOMSignatureMethod.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/AbstractDOMSignatureMethod.java
index 4bc0a543117b5..75b21c16a02f4 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/AbstractDOMSignatureMethod.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/AbstractDOMSignatureMethod.java
@@ -23,20 +23,22 @@
package org.jcp.xml.dsig.internal.dom;
-import java.security.Key;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
+import java.security.Key;
import java.security.SignatureException;
import java.security.spec.AlgorithmParameterSpec;
+
import javax.xml.crypto.MarshalException;
import javax.xml.crypto.dom.DOMCryptoContext;
import javax.xml.crypto.dsig.SignatureMethod;
import javax.xml.crypto.dsig.SignedInfo;
+import javax.xml.crypto.dsig.XMLSignContext;
import javax.xml.crypto.dsig.XMLSignature;
import javax.xml.crypto.dsig.XMLSignatureException;
-import javax.xml.crypto.dsig.XMLSignContext;
import javax.xml.crypto.dsig.XMLValidateContext;
import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec;
+
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java
index 7655866ad7402..5dff44e3ec0d3 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java
@@ -28,11 +28,16 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
-import java.security.spec.AlgorithmParameterSpec;
import java.security.InvalidAlgorithmParameterException;
+import java.security.spec.AlgorithmParameterSpec;
import java.util.Set;
-import javax.xml.crypto.*;
+import javax.xml.crypto.Data;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.NodeSetData;
+import javax.xml.crypto.OctetStreamData;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.XMLStructure;
import javax.xml.crypto.dom.DOMCryptoContext;
import javax.xml.crypto.dsig.TransformException;
import javax.xml.crypto.dsig.TransformService;
@@ -61,11 +66,13 @@ public abstract class ApacheCanonicalizer extends TransformService {
protected Document ownerDoc;
protected Element transformElem;
+ @Override
public final AlgorithmParameterSpec getParameterSpec()
{
return params;
}
+ @Override
public void init(XMLStructure parent, XMLCryptoContext context)
throws InvalidAlgorithmParameterException
{
@@ -84,6 +91,7 @@ public void init(XMLStructure parent, XMLCryptoContext context)
ownerDoc = DOMUtils.getOwnerDocument(transformElem);
}
+ @Override
public void marshalParams(XMLStructure parent, XMLCryptoContext context)
throws MarshalException
{
@@ -182,6 +190,7 @@ private byte[] getC14nBytes(OutputStream outputStream, boolean isByteArrayOutput
return null;
}
+ @Override
public Data transform(Data data, XMLCryptoContext xc, OutputStream os)
throws TransformException
{
@@ -249,6 +258,7 @@ public Data transform(Data data, XMLCryptoContext xc, OutputStream os)
}
}
+ @Override
public final boolean isFeatureSupported(String feature) {
if (feature == null) {
throw new NullPointerException();
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheData.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheData.java
index 109309d008601..0515066bbd5b6 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheData.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheData.java
@@ -26,6 +26,7 @@
package org.jcp.xml.dsig.internal.dom;
import javax.xml.crypto.Data;
+
import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
/**
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheNodeSetData.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheNodeSetData.java
index b15c8784d5c90..a59e41cce308c 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheNodeSetData.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheNodeSetData.java
@@ -30,13 +30,14 @@
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
+
import javax.xml.crypto.NodeSetData;
-import com.sun.org.apache.xml.internal.security.transforms.TransformationException;
-import org.w3c.dom.Node;
import com.sun.org.apache.xml.internal.security.signature.NodeFilter;
import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.TransformationException;
import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
+import org.w3c.dom.Node;
public class ApacheNodeSetData implements ApacheData, NodeSetData {
@@ -46,6 +47,7 @@ public ApacheNodeSetData(XMLSignatureInput xi) {
this.xi = xi;
}
+ @Override
public Iterator iterator() {
// If nodefilters are set, must execute them first to create node-set
try {
@@ -61,6 +63,7 @@ public Iterator iterator() {
}
}
+ @Override
public XMLSignatureInput getXMLSignatureInput() {
return xi;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.java
index f00bb802cfcb8..9b919fcd9099a 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.java
@@ -26,7 +26,9 @@
package org.jcp.xml.dsig.internal.dom;
import java.io.IOException;
+
import javax.xml.crypto.OctetStreamData;
+
import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
public class ApacheOctetStreamData extends OctetStreamData
@@ -41,6 +43,7 @@ public ApacheOctetStreamData(XMLSignatureInput xi)
this.xi = xi;
}
+ @Override
public XMLSignatureInput getXMLSignatureInput() {
return xi;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheTransform.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheTransform.java
index 25211920f6853..2efbcb8b54086 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheTransform.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/ApacheTransform.java
@@ -30,17 +30,26 @@
import java.security.spec.AlgorithmParameterSpec;
import java.util.Set;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
-import com.sun.org.apache.xml.internal.security.transforms.Transform;
-import javax.xml.crypto.*;
+import javax.xml.crypto.Data;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.NodeSetData;
+import javax.xml.crypto.OctetStreamData;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.XMLStructure;
import javax.xml.crypto.dom.DOMCryptoContext;
-import javax.xml.crypto.dsig.*;
+import javax.xml.crypto.dsig.TransformException;
+import javax.xml.crypto.dsig.TransformService;
import javax.xml.crypto.dsig.spec.TransformParameterSpec;
+import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.transforms.Transform;
+import com.sun.org.apache.xml.internal.security.transforms.Transforms;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
/**
* This is a wrapper/glue class which invokes the Apache XML-Security
* Transform.
@@ -64,6 +73,7 @@ public final AlgorithmParameterSpec getParameterSpec() {
return params;
}
+ @Override
public void init(XMLStructure parent, XMLCryptoContext context)
throws InvalidAlgorithmParameterException
{
@@ -82,6 +92,7 @@ public void init(XMLStructure parent, XMLCryptoContext context)
ownerDoc = DOMUtils.getOwnerDocument(transformElem);
}
+ @Override
public void marshalParams(XMLStructure parent, XMLCryptoContext context)
throws MarshalException
{
@@ -100,6 +111,7 @@ public void marshalParams(XMLStructure parent, XMLCryptoContext context)
ownerDoc = DOMUtils.getOwnerDocument(transformElem);
}
+ @Override
public Data transform(Data data, XMLCryptoContext xc)
throws TransformException
{
@@ -109,6 +121,7 @@ public Data transform(Data data, XMLCryptoContext xc)
return transformIt(data, xc, null);
}
+ @Override
public Data transform(Data data, XMLCryptoContext xc, OutputStream os)
throws TransformException
{
@@ -197,6 +210,7 @@ private Data transformIt(Data data, XMLCryptoContext xc, OutputStream os)
}
}
+ @Override
public final boolean isFeatureSupported(String feature) {
if (feature == null) {
throw new NullPointerException();
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14N11Method.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14N11Method.java
index 1c6c192e634a3..4ea74c62cc9b4 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14N11Method.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14N11Method.java
@@ -25,12 +25,13 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dsig.*;
-import javax.xml.crypto.dsig.spec.TransformParameterSpec;
-
import java.security.InvalidAlgorithmParameterException;
+import javax.xml.crypto.Data;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.dsig.TransformException;
+import javax.xml.crypto.dsig.spec.TransformParameterSpec;
+
import com.sun.org.apache.xml.internal.security.c14n.Canonicalizer;
import com.sun.org.apache.xml.internal.security.c14n.InvalidCanonicalizerException;
@@ -45,6 +46,7 @@ public final class DOMCanonicalXMLC14N11Method extends ApacheCanonicalizer {
public static final String C14N_11_WITH_COMMENTS
= "http://www.w3.org/2006/12/xml-c14n11#WithComments";
+ @Override
public void init(TransformParameterSpec params)
throws InvalidAlgorithmParameterException {
if (params != null) {
@@ -53,6 +55,7 @@ public void init(TransformParameterSpec params)
}
}
+ @Override
public Data transform(Data data, XMLCryptoContext xc)
throws TransformException {
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMethod.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMethod.java
index e2d524b3450d8..4b60015766426 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMethod.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMethod.java
@@ -25,12 +25,14 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dsig.*;
-import javax.xml.crypto.dsig.spec.TransformParameterSpec;
-
import java.security.InvalidAlgorithmParameterException;
+import javax.xml.crypto.Data;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.dsig.CanonicalizationMethod;
+import javax.xml.crypto.dsig.TransformException;
+import javax.xml.crypto.dsig.spec.TransformParameterSpec;
+
import com.sun.org.apache.xml.internal.security.c14n.Canonicalizer;
import com.sun.org.apache.xml.internal.security.c14n.InvalidCanonicalizerException;
@@ -41,6 +43,7 @@
*/
public final class DOMCanonicalXMLC14NMethod extends ApacheCanonicalizer {
+ @Override
public void init(TransformParameterSpec params)
throws InvalidAlgorithmParameterException {
if (params != null) {
@@ -49,6 +52,7 @@ public void init(TransformParameterSpec params)
}
}
+ @Override
public Data transform(Data data, XMLCryptoContext xc)
throws TransformException {
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java
index ecef17f35aed0..c182a2253630b 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java
@@ -33,10 +33,14 @@
import java.util.HashSet;
import java.util.Set;
-import org.w3c.dom.Element;
+import javax.xml.crypto.Data;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.dsig.CanonicalizationMethod;
+import javax.xml.crypto.dsig.TransformException;
+import javax.xml.crypto.dsig.TransformService;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dsig.*;
+import org.w3c.dom.Element;
/**
* DOM-based abstract implementation of CanonicalizationMethod.
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java
index 9a81a215d220b..1b1248104510b 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java
@@ -26,7 +26,8 @@
package org.jcp.xml.dsig.internal.dom;
import java.math.BigInteger;
-import javax.xml.crypto.*;
+
+import javax.xml.crypto.MarshalException;
import javax.xml.crypto.dom.DOMCryptoContext;
import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java
index a4d5fea4ab60a..259c7a988fcad 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java
@@ -25,13 +25,15 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.spec.AlgorithmParameterSpec;
+
+import javax.xml.crypto.MarshalException;
import javax.xml.crypto.dom.DOMCryptoContext;
-import javax.xml.crypto.dsig.*;
+import javax.xml.crypto.dsig.DigestMethod;
+import javax.xml.crypto.dsig.XMLSignature;
import javax.xml.crypto.dsig.spec.DigestMethodParameterSpec;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.spec.AlgorithmParameterSpec;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -147,6 +149,7 @@ void checkParams(DigestMethodParameterSpec params)
}
}
+ @Override
public final AlgorithmParameterSpec getParameterSpec() {
return params;
}
@@ -251,9 +254,11 @@ static final class SHA1 extends DOMDigestMethod {
SHA1(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return DigestMethod.SHA1;
}
+ @Override
String getMessageDigestAlgorithm() {
return "SHA-1";
}
@@ -285,9 +290,11 @@ static final class SHA256 extends DOMDigestMethod {
SHA256(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return DigestMethod.SHA256;
}
+ @Override
String getMessageDigestAlgorithm() {
return "SHA-256";
}
@@ -301,9 +308,11 @@ static final class SHA384 extends DOMDigestMethod {
SHA384(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return SHA384;
}
+ @Override
String getMessageDigestAlgorithm() {
return "SHA-384";
}
@@ -317,9 +326,11 @@ static final class SHA512 extends DOMDigestMethod {
SHA512(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return DigestMethod.SHA512;
}
+ @Override
String getMessageDigestAlgorithm() {
return "SHA-512";
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.java
index a43cb81567c8e..9a0ba0b2cae66 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.java
@@ -26,6 +26,7 @@
package org.jcp.xml.dsig.internal.dom;
import java.security.InvalidAlgorithmParameterException;
+
import javax.xml.crypto.dsig.spec.TransformParameterSpec;
/**
@@ -35,6 +36,7 @@
*/
public final class DOMEnvelopedTransform extends ApacheTransform {
+ @Override
public void init(TransformParameterSpec params)
throws InvalidAlgorithmParameterException {
if (params != null) {
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java
index a8cd434874cf9..0490e78153735 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java
@@ -25,19 +25,24 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dsig.*;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.crypto.Data;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.XMLStructure;
+import javax.xml.crypto.dsig.CanonicalizationMethod;
+import javax.xml.crypto.dsig.TransformException;
import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec;
import javax.xml.crypto.dsig.spec.ExcC14NParameterSpec;
import javax.xml.crypto.dsig.spec.TransformParameterSpec;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.spec.AlgorithmParameterSpec;
-import java.util.*;
-
-import org.w3c.dom.Element;
import com.sun.org.apache.xml.internal.security.c14n.Canonicalizer;
import com.sun.org.apache.xml.internal.security.c14n.InvalidCanonicalizerException;
+import org.w3c.dom.Element;
/**
* DOM-based implementation of CanonicalizationMethod for Exclusive
@@ -47,6 +52,7 @@
*/
public final class DOMExcC14NMethod extends ApacheCanonicalizer {
+ @Override
public void init(TransformParameterSpec params)
throws InvalidAlgorithmParameterException
{
@@ -59,6 +65,7 @@ public void init(TransformParameterSpec params)
}
}
+ @Override
public void init(XMLStructure parent, XMLCryptoContext context)
throws InvalidAlgorithmParameterException
{
@@ -137,6 +144,7 @@ public String getParamsNSURI() {
return CanonicalizationMethod.EXCLUSIVE;
}
+ @Override
public Data transform(Data data, XMLCryptoContext xc)
throws TransformException
{
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java
index 40bb99c3145c1..0a9ef187573ce 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java
@@ -25,11 +25,6 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dsig.*;
-import javax.xml.crypto.dsig.spec.HMACParameterSpec;
-import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec;
-
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
@@ -38,12 +33,22 @@
import java.security.Provider;
import java.security.SignatureException;
import java.security.spec.AlgorithmParameterSpec;
+
import javax.crypto.Mac;
import javax.crypto.SecretKey;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.dsig.SignatureMethod;
+import javax.xml.crypto.dsig.SignedInfo;
+import javax.xml.crypto.dsig.XMLSignContext;
+import javax.xml.crypto.dsig.XMLSignature;
+import javax.xml.crypto.dsig.XMLSignatureException;
+import javax.xml.crypto.dsig.XMLValidateContext;
+import javax.xml.crypto.dsig.spec.HMACParameterSpec;
+import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec;
import org.jcp.xml.dsig.internal.MacOutputStream;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
/**
* DOM-based implementation of HMAC SignatureMethod.
@@ -118,10 +123,12 @@ void checkParams(SignatureMethodParameterSpec params)
}
}
+ @Override
public final AlgorithmParameterSpec getParameterSpec() {
return params;
}
+ @Override
SignatureMethodParameterSpec unmarshalParams(Element paramsElem)
throws MarshalException
{
@@ -135,6 +142,7 @@ SignatureMethodParameterSpec unmarshalParams(Element paramsElem)
return new HMACParameterSpec(outputLength);
}
+ @Override
void marshalParams(Element parent, String prefix)
throws MarshalException
{
@@ -147,6 +155,7 @@ void marshalParams(Element parent, String prefix)
parent.appendChild(hmacElem);
}
+ @Override
boolean verify(Key key, SignedInfo si, byte[] sig,
XMLValidateContext context)
throws InvalidKeyException, SignatureException, XMLSignatureException
@@ -178,6 +187,7 @@ boolean verify(Key key, SignedInfo si, byte[] sig,
return MessageDigest.isEqual(sig, result);
}
+ @Override
byte[] sign(Key key, SignedInfo si, XMLSignContext context)
throws InvalidKeyException, XMLSignatureException
{
@@ -206,6 +216,7 @@ byte[] sign(Key key, SignedInfo si, XMLSignContext context)
return hmac.doFinal();
}
+ @Override
boolean paramsEqual(AlgorithmParameterSpec spec) {
if (getParameterSpec() == spec) {
return true;
@@ -218,6 +229,7 @@ boolean paramsEqual(AlgorithmParameterSpec spec) {
return outputLength == ospec.getOutputLength();
}
+ @Override
Type getAlgorithmType() {
return Type.HMAC;
}
@@ -235,12 +247,15 @@ static final class SHA1 extends DOMHMACSignatureMethod {
SHA1(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return SignatureMethod.HMAC_SHA1;
}
+ @Override
String getJCAAlgorithm() {
return "HmacSHA1";
}
+ @Override
int getDigestLength() {
return 160;
}
@@ -276,12 +291,15 @@ static final class SHA256 extends DOMHMACSignatureMethod {
SHA256(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return HMAC_SHA256;
}
+ @Override
String getJCAAlgorithm() {
return "HmacSHA256";
}
+ @Override
int getDigestLength() {
return 256;
}
@@ -295,12 +313,15 @@ static final class SHA384 extends DOMHMACSignatureMethod {
SHA384(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return HMAC_SHA384;
}
+ @Override
String getJCAAlgorithm() {
return "HmacSHA384";
}
+ @Override
int getDigestLength() {
return 384;
}
@@ -314,12 +335,15 @@ static final class SHA512 extends DOMHMACSignatureMethod {
SHA512(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return HMAC_SHA512;
}
+ @Override
String getJCAAlgorithm() {
return "HmacSHA512";
}
+ @Override
int getDigestLength() {
return 512;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.java
index 19cedafd9fc09..d13b47ccdcfb0 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.java
@@ -141,14 +141,17 @@ public DOMKeyInfo(Element kiElem, XMLCryptoContext context,
keyInfoTypes = Collections.unmodifiableList(content);
}
+ @Override
public String getId() {
return id;
}
+ @Override
public List getContent() {
return keyInfoTypes;
}
+ @Override
public void marshal(XMLStructure parent, XMLCryptoContext context)
throws MarshalException
{
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java
index 99ca1dce72204..cec1224affade 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java
@@ -28,8 +28,8 @@
import java.math.BigInteger;
import java.security.KeyException;
import java.security.PublicKey;
-import java.security.interfaces.ECPublicKey;
import java.security.interfaces.DSAPublicKey;
+import java.security.interfaces.ECPublicKey;
import java.security.interfaces.RSAPublicKey;
import java.util.List;
@@ -59,20 +59,24 @@ public final class DOMKeyInfoFactory extends KeyInfoFactory {
public DOMKeyInfoFactory() { }
+ @Override
@SuppressWarnings("rawtypes")
public KeyInfo newKeyInfo(List content) {
return newKeyInfo(content, null);
}
+ @Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public KeyInfo newKeyInfo(List content, String id) {
return new DOMKeyInfo(content, id);
}
+ @Override
public KeyName newKeyName(String name) {
return new DOMKeyName(name);
}
+ @Override
public KeyValue newKeyValue(PublicKey key) throws KeyException {
String algorithm = key.getAlgorithm();
if ("DSA".equals(algorithm)) {
@@ -86,24 +90,29 @@ public KeyValue newKeyValue(PublicKey key) throws KeyException {
}
}
+ @Override
public PGPData newPGPData(byte[] keyId) {
return newPGPData(keyId, null, null);
}
+ @Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public PGPData newPGPData(byte[] keyId, byte[] keyPacket, List other) {
return new DOMPGPData(keyId, keyPacket, other);
}
+ @Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public PGPData newPGPData(byte[] keyPacket, List other) {
return new DOMPGPData(keyPacket, other);
}
+ @Override
public RetrievalMethod newRetrievalMethod(String uri) {
return newRetrievalMethod(uri, null, null);
}
+ @Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public RetrievalMethod newRetrievalMethod(String uri, String type,
List transforms) {
@@ -113,6 +122,7 @@ public RetrievalMethod newRetrievalMethod(String uri, String type,
return new DOMRetrievalMethod(uri, type, transforms);
}
+ @Override
@SuppressWarnings({ "rawtypes" })
public X509Data newX509Data(List content) {
return new DOMX509Data(content);
@@ -124,6 +134,7 @@ public X509IssuerSerial newX509IssuerSerial(String issuerName,
return new DOMX509IssuerSerial(issuerName, serialNumber);
}
+ @Override
public boolean isFeatureSupported(String feature) {
if (feature == null) {
throw new NullPointerException();
@@ -132,6 +143,7 @@ public boolean isFeatureSupported(String feature) {
}
}
+ @Override
public URIDereferencer getURIDereferencer() {
return DOMURIDereferencer.INSTANCE;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyName.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyName.java
index 888a9c760247a..3c83e48880bc2 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyName.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyName.java
@@ -64,6 +64,7 @@ public DOMKeyName(Element knElem) {
name = knElem.getFirstChild().getNodeValue();
}
+ @Override
public String getName() {
return name;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java
index 307d0ae45ce20..0933c21bfd3d4 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java
@@ -101,6 +101,7 @@ static KeyValue unmarshal(Element kvElem) throws MarshalException {
}
}
+ @Override
public PublicKey getPublicKey() throws KeyException {
if (publicKey == null) {
throw new KeyException("can't convert KeyValue to PublicKey");
@@ -198,6 +199,7 @@ static final class RSA extends DOMKeyValue {
super(elem);
}
+ @Override
void marshalPublicKey(Node parent, Document doc, String dsPrefix,
DOMCryptoContext context) throws MarshalException {
Element rsaElem = DOMUtils.createElement(doc, "RSAKeyValue",
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMManifest.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMManifest.java
index be65eb8fb1f35..6ed7ee8025dcb 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMManifest.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMManifest.java
@@ -25,12 +25,17 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dom.DOMCryptoContext;
-import javax.xml.crypto.dsig.*;
-
import java.security.Provider;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.dom.DOMCryptoContext;
+import javax.xml.crypto.dsig.Manifest;
+import javax.xml.crypto.dsig.Reference;
+import javax.xml.crypto.dsig.XMLSignature;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -114,6 +119,7 @@ public DOMManifest(Element manElem, XMLCryptoContext context,
this.references = Collections.unmodifiableList(refs);
}
+ @Override
public String getId() {
return id;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java
index f9802c4698d10..df591ce00ef64 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java
@@ -25,19 +25,21 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
-import javax.xml.crypto.*;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.XMLStructure;
import javax.xml.crypto.dom.DOMCryptoContext;
import javax.xml.crypto.dsig.XMLSignature;
import javax.xml.crypto.dsig.keyinfo.PGPData;
+import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
-
/**
* DOM-based implementation of PGPData.
*
@@ -171,14 +173,17 @@ public DOMPGPData(Element pdElem) throws MarshalException {
this.externalElements = Collections.unmodifiableList(other);
}
+ @Override
public byte[] getKeyId() {
return keyId == null ? null : keyId.clone();
}
+ @Override
public byte[] getKeyPacket() {
return keyPacket == null ? null : keyPacket.clone();
}
+ @Override
public List getExternalElements() {
return externalElements;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java
index 8e4c2424eb7fb..c131ab689d735 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRSAPSSSignatureMethod.java
@@ -25,25 +25,33 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dsig.*;
-import javax.xml.crypto.dsig.spec.RSAPSSParameterSpec;
-import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec;
-
import java.io.IOException;
-import java.security.*;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivateKey;
+import java.security.Provider;
+import java.security.PublicKey;
+import java.security.Signature;
+import java.security.SignatureException;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.MGF1ParameterSpec;
import java.security.spec.PSSParameterSpec;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Text;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.dsig.*;
+import javax.xml.crypto.dsig.spec.RSAPSSParameterSpec;
+import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec;
+
import org.jcp.xml.dsig.internal.SignerOutputStream;
import com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA.SignatureRSASSAPSS.DigestAlgorithm;
import com.sun.org.apache.xml.internal.security.utils.Constants;
import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
/**
* DOM-based abstract implementation of SignatureMethod for RSA-PSS.
@@ -125,10 +133,12 @@ void checkParams(SignatureMethodParameterSpec params)
LOG.debug("Setting RSAPSSParameterSpec to: {}", params.toString());
}
+ @Override
public final AlgorithmParameterSpec getParameterSpec() {
return params;
}
+ @Override
void marshalParams(Element parent, String prefix)
throws MarshalException
{
@@ -203,6 +213,7 @@ private static DigestAlgorithm validateDigestAlgorithm(String input)
}
}
+ @Override
SignatureMethodParameterSpec unmarshalParams(Element paramsElem)
throws MarshalException
{
@@ -250,6 +261,7 @@ SignatureMethodParameterSpec unmarshalParams(Element paramsElem)
return DEFAULT_PSS_SPEC;
}
+ @Override
boolean verify(Key key, SignedInfo si, byte[] sig,
XMLValidateContext context)
throws InvalidKeyException, SignatureException, XMLSignatureException
@@ -291,6 +303,7 @@ boolean verify(Key key, SignedInfo si, byte[] sig,
}
}
+ @Override
byte[] sign(Key key, SignedInfo si, XMLSignContext context)
throws InvalidKeyException, XMLSignatureException
{
@@ -318,7 +331,6 @@ byte[] sign(Key key, SignedInfo si, XMLSignContext context)
throw new XMLSignatureException(e);
}
LOG.debug("Signature provider: {}", signature.getProvider());
- LOG.debug("Signing with key: {}", key);
LOG.debug("JCA Algorithm: {}", getJCAAlgorithm());
try (SignerOutputStream outputStream = new SignerOutputStream(signature)) {
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java
index d278808ea0572..69215340089b8 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java
@@ -32,28 +32,52 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dsig.*;
-import javax.xml.crypto.dom.DOMCryptoContext;
-import javax.xml.crypto.dom.DOMURIReference;
-
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
-import java.security.*;
-import java.util.*;
+import java.security.AccessController;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivilegedAction;
+import java.security.Provider;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.crypto.Data;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.NodeSetData;
+import javax.xml.crypto.OctetStreamData;
+import javax.xml.crypto.URIDereferencer;
+import javax.xml.crypto.URIReferenceException;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.dom.DOMCryptoContext;
+import javax.xml.crypto.dom.DOMURIReference;
+import javax.xml.crypto.dsig.CanonicalizationMethod;
+import javax.xml.crypto.dsig.DigestMethod;
+import javax.xml.crypto.dsig.Reference;
+import javax.xml.crypto.dsig.Transform;
+import javax.xml.crypto.dsig.TransformException;
+import javax.xml.crypto.dsig.TransformService;
+import javax.xml.crypto.dsig.XMLSignContext;
+import javax.xml.crypto.dsig.XMLSignature;
+import javax.xml.crypto.dsig.XMLSignatureException;
+import javax.xml.crypto.dsig.XMLValidateContext;
+import org.jcp.xml.dsig.internal.DigesterOutputStream;
+import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream;
+import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
-
-import org.jcp.xml.dsig.internal.DigesterOutputStream;
-import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
-import com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream;
-
/**
* DOM-based implementation of Reference.
*
@@ -270,30 +294,37 @@ public DOMReference(Element refElem, XMLCryptoContext context,
this.provider = provider;
}
+ @Override
public DigestMethod getDigestMethod() {
return digestMethod;
}
+ @Override
public String getId() {
return id;
}
+ @Override
public String getURI() {
return uri;
}
+ @Override
public String getType() {
return type;
}
+ @Override
public List getTransforms() {
return Collections.unmodifiableList(allTransforms);
}
+ @Override
public byte[] getDigestValue() {
return digestValue == null ? null : digestValue.clone();
}
+ @Override
public byte[] getCalculatedDigestValue() {
return calcDigestValue == null ? null
: calcDigestValue.clone();
@@ -372,6 +403,7 @@ public void digest(XMLSignContext signContext)
LOG.debug("Reference digesting completed");
}
+ @Override
public boolean validate(XMLValidateContext validateContext)
throws XMLSignatureException
{
@@ -394,10 +426,12 @@ public boolean validate(XMLValidateContext validateContext)
return validationStatus;
}
+ @Override
public Data getDereferencedData() {
return derefData;
}
+ @Override
public InputStream getDigestInputStream() {
return dis;
}
@@ -568,6 +602,7 @@ private byte[] transform(Data dereferencedData,
}
}
+ @Override
public Node getHere() {
return here;
}
@@ -631,6 +666,7 @@ private static Data copyDerefData(Data dereferencedData) {
try {
final Set s = xsi.getNodeSet();
return new NodeSetData() {
+ @Override
public Iterator iterator() { return s.iterator(); }
};
} catch (Exception e) {
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java
index 33343808fadc4..e5c92e8c5352c 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java
@@ -176,14 +176,17 @@ public DOMRetrievalMethod(Element rmElem, XMLCryptoContext context,
}
}
+ @Override
public String getURI() {
return uri;
}
+ @Override
public String getType() {
return type;
}
+ @Override
public List getTransforms() {
return transforms;
}
@@ -219,10 +222,12 @@ public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
here = rmElem.getAttributeNodeNS(null, "URI");
}
+ @Override
public Node getHere() {
return here;
}
+ @Override
public Data dereference(XMLCryptoContext context)
throws URIReferenceException
{
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java
index 267e29d901d69..5e44ccaeae8b0 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java
@@ -25,23 +25,36 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dsig.*;
-import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec;
-
import java.io.IOException;
-import java.security.*;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivateKey;
+import java.security.Provider;
+import java.security.PublicKey;
+import java.security.Signature;
+import java.security.SignatureException;
import java.security.interfaces.DSAKey;
import java.security.interfaces.ECPrivateKey;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.MGF1ParameterSpec;
import java.security.spec.PSSParameterSpec;
-import org.w3c.dom.Element;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.dsig.SignatureMethod;
+import javax.xml.crypto.dsig.SignedInfo;
+import javax.xml.crypto.dsig.XMLSignContext;
+import javax.xml.crypto.dsig.XMLSignatureException;
+import javax.xml.crypto.dsig.XMLValidateContext;
+import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec;
+import org.jcp.xml.dsig.internal.SignerOutputStream;
import com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureECDSA;
import com.sun.org.apache.xml.internal.security.utils.JavaUtils;
-import org.jcp.xml.dsig.internal.SignerOutputStream;
+import org.w3c.dom.Element;
+
import sun.security.util.KeyUtil;
/**
@@ -103,6 +116,14 @@ public abstract class DOMSignatureMethod extends AbstractDOMSignatureMethod {
"http://www.w3.org/2007/05/xmldsig-more#sha512-rsa-MGF1";
static final String RSA_RIPEMD160_MGF1 =
"http://www.w3.org/2007/05/xmldsig-more#ripemd160-rsa-MGF1";
+ static final String RSA_SHA3_224_MGF1 =
+ "http://www.w3.org/2007/05/xmldsig-more#sha3-224-rsa-MGF1";
+ static final String RSA_SHA3_256_MGF1 =
+ "http://www.w3.org/2007/05/xmldsig-more#sha3-256-rsa-MGF1";
+ static final String RSA_SHA3_384_MGF1 =
+ "http://www.w3.org/2007/05/xmldsig-more#sha3-384-rsa-MGF1";
+ static final String RSA_SHA3_512_MGF1 =
+ "http://www.w3.org/2007/05/xmldsig-more#sha3-512-rsa-MGF1";
/**
* Creates a {@code DOMSignatureMethod}.
@@ -194,6 +215,14 @@ static SignatureMethod unmarshal(Element smElem) throws MarshalException {
return new SHA384withRSAandMGF1(smElem);
} else if (alg.equals(RSA_SHA512_MGF1)) {
return new SHA512withRSAandMGF1(smElem);
+ } else if (alg.equals(RSA_SHA3_224_MGF1)) {
+ return new SHA3_224withRSAandMGF1(smElem);
+ } else if (alg.equals(RSA_SHA3_256_MGF1)) {
+ return new SHA3_256withRSAandMGF1(smElem);
+ } else if (alg.equals(RSA_SHA3_384_MGF1)) {
+ return new SHA3_384withRSAandMGF1(smElem);
+ } else if (alg.equals(RSA_SHA3_512_MGF1)) {
+ return new SHA3_512withRSAandMGF1(smElem);
} else if (alg.equals(DOMRSAPSSSignatureMethod.RSA_PSS)) {
return new DOMRSAPSSSignatureMethod.RSAPSS(smElem);
} else if (alg.equals(RSA_RIPEMD160_MGF1)) {
@@ -236,6 +265,7 @@ static SignatureMethod unmarshal(Element smElem) throws MarshalException {
}
}
+ @Override
public final AlgorithmParameterSpec getParameterSpec() {
return params;
}
@@ -257,6 +287,7 @@ Signature getSignature(Provider p)
: Signature.getInstance(getJCAAlgorithm(), p);
}
+ @Override
boolean verify(Key key, SignedInfo si, byte[] sig,
XMLValidateContext context)
throws InvalidKeyException, SignatureException, XMLSignatureException
@@ -323,6 +354,7 @@ private static void checkKeySize(XMLCryptoContext context, Key key)
}
}
+ @Override
byte[] sign(Key key, SignedInfo si, XMLSignContext context)
throws InvalidKeyException, XMLSignatureException
{
@@ -344,7 +376,6 @@ byte[] sign(Key key, SignedInfo si, XMLSignContext context)
}
signature.initSign((PrivateKey)key);
LOG.debug("Signature provider: {}", signature.getProvider());
- LOG.debug("Signing with key: {}", key);
LOG.debug("JCA Algorithm: {}", getJCAAlgorithm());
try (SignerOutputStream outputStream = new SignerOutputStream(signature)) {
@@ -383,6 +414,11 @@ byte[] postSignFormat(Key key, byte[] sig) {
byte[] preVerifyFormat(Key key, byte[] sig) {
return sig;
}
+
+ @Override
+ Type getAlgorithmType() {
+ return Type.RSA;
+ }
}
abstract static class AbstractRSAPSSSignatureMethod
@@ -397,7 +433,7 @@ abstract static class AbstractRSAPSSSignatureMethod
super(dmElem);
}
- abstract public PSSParameterSpec getPSSParameterSpec();
+ public abstract PSSParameterSpec getPSSParameterSpec();
@Override
Signature getSignature(Provider p)
@@ -413,9 +449,7 @@ Signature getSignature(Provider p)
}
return s;
} catch (NoSuchAlgorithmException nsae) {
- return (p == null)
- ? Signature.getInstance(getJCAAlgorithm())
- : Signature.getInstance(getJCAAlgorithm(), p);
+ return super.getSignature(p);
}
}
}
@@ -509,6 +543,11 @@ byte[] preVerifyFormat(Key key, byte[] sig) throws IOException {
return sig;
}
}
+
+ @Override
+ Type getAlgorithmType() {
+ return Type.DSA;
+ }
}
abstract static class AbstractECDSASignatureMethod
@@ -550,6 +589,11 @@ byte[] preVerifyFormat(Key key, byte[] sig) throws IOException {
return sig;
}
}
+
+ @Override
+ Type getAlgorithmType() {
+ return Type.ECDSA;
+ }
}
abstract static class AbstractEDDSASignatureMethod
@@ -583,6 +627,10 @@ byte[] preVerifyFormat(Key key, byte[] sig) {
return sig;
}
+ @Override
+ Type getAlgorithmType() {
+ return Type.EDDSA;
+ }
}
static final class SHA1withRSA extends AbstractRSASignatureMethod {
@@ -601,10 +649,6 @@ public String getAlgorithm() {
String getJCAAlgorithm() {
return "SHA1withRSA";
}
- @Override
- Type getAlgorithmType() {
- return Type.RSA;
- }
}
static final class SHA224withRSA extends AbstractRSASignatureMethod {
@@ -615,15 +659,14 @@ static final class SHA224withRSA extends AbstractRSASignatureMethod {
SHA224withRSA(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return RSA_SHA224;
}
+ @Override
String getJCAAlgorithm() {
return "SHA224withRSA";
}
- Type getAlgorithmType() {
- return Type.RSA;
- }
}
static final class SHA256withRSA extends AbstractRSASignatureMethod {
@@ -634,15 +677,14 @@ static final class SHA256withRSA extends AbstractRSASignatureMethod {
SHA256withRSA(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return RSA_SHA256;
}
+ @Override
String getJCAAlgorithm() {
return "SHA256withRSA";
}
- Type getAlgorithmType() {
- return Type.RSA;
- }
}
static final class SHA384withRSA extends AbstractRSASignatureMethod {
@@ -653,15 +695,14 @@ static final class SHA384withRSA extends AbstractRSASignatureMethod {
SHA384withRSA(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return RSA_SHA384;
}
+ @Override
String getJCAAlgorithm() {
return "SHA384withRSA";
}
- Type getAlgorithmType() {
- return Type.RSA;
- }
}
static final class SHA512withRSA extends AbstractRSASignatureMethod {
@@ -672,15 +713,14 @@ static final class SHA512withRSA extends AbstractRSASignatureMethod {
SHA512withRSA(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return RSA_SHA512;
}
+ @Override
String getJCAAlgorithm() {
return "SHA512withRSA";
}
- Type getAlgorithmType() {
- return Type.RSA;
- }
}
static final class RIPEMD160withRSA extends AbstractRSASignatureMethod {
@@ -699,15 +739,11 @@ public String getAlgorithm() {
String getJCAAlgorithm() {
return "RIPEMD160withRSA";
}
- @Override
- Type getAlgorithmType() {
- return Type.RSA;
- }
}
static final class SHA1withRSAandMGF1 extends AbstractRSAPSSSignatureMethod {
- private static PSSParameterSpec spec
+ private static final PSSParameterSpec SHA1_MGF1_PARAMS
= new PSSParameterSpec("SHA-1", "MGF1", MGF1ParameterSpec.SHA1,
20, PSSParameterSpec.TRAILER_FIELD_BC);
@@ -724,21 +760,17 @@ public String getAlgorithm() {
}
@Override
public PSSParameterSpec getPSSParameterSpec() {
- return spec;
+ return SHA1_MGF1_PARAMS;
}
@Override
String getJCAAlgorithm() {
return "SHA1withRSAandMGF1";
}
- @Override
- Type getAlgorithmType() {
- return Type.RSA;
- }
}
static final class SHA224withRSAandMGF1 extends AbstractRSAPSSSignatureMethod {
- private static PSSParameterSpec spec
+ private static final PSSParameterSpec SHA224_MGF1_PARAMS
= new PSSParameterSpec("SHA-224", "MGF1", MGF1ParameterSpec.SHA224,
28, PSSParameterSpec.TRAILER_FIELD_BC);
@@ -755,21 +787,17 @@ public String getAlgorithm() {
}
@Override
public PSSParameterSpec getPSSParameterSpec() {
- return spec;
+ return SHA224_MGF1_PARAMS;
}
@Override
String getJCAAlgorithm() {
return "SHA224withRSAandMGF1";
}
- @Override
- Type getAlgorithmType() {
- return Type.RSA;
- }
}
static final class SHA256withRSAandMGF1 extends AbstractRSAPSSSignatureMethod {
- private static PSSParameterSpec spec
+ private static final PSSParameterSpec SHA256_MGF1_PARAMS
= new PSSParameterSpec("SHA-256", "MGF1", MGF1ParameterSpec.SHA256,
32, PSSParameterSpec.TRAILER_FIELD_BC);
@@ -786,21 +814,17 @@ public String getAlgorithm() {
}
@Override
public PSSParameterSpec getPSSParameterSpec() {
- return spec;
+ return SHA256_MGF1_PARAMS;
}
@Override
String getJCAAlgorithm() {
return "SHA256withRSAandMGF1";
}
- @Override
- Type getAlgorithmType() {
- return Type.RSA;
- }
}
static final class SHA384withRSAandMGF1 extends AbstractRSAPSSSignatureMethod {
- private static PSSParameterSpec spec
+ private static final PSSParameterSpec SHA384_MGF1_PARAMS
= new PSSParameterSpec("SHA-384", "MGF1", MGF1ParameterSpec.SHA384,
48, PSSParameterSpec.TRAILER_FIELD_BC);
@@ -817,21 +841,17 @@ public String getAlgorithm() {
}
@Override
public PSSParameterSpec getPSSParameterSpec() {
- return spec;
+ return SHA384_MGF1_PARAMS;
}
@Override
String getJCAAlgorithm() {
return "SHA384withRSAandMGF1";
}
- @Override
- Type getAlgorithmType() {
- return Type.RSA;
- }
}
static final class SHA512withRSAandMGF1 extends AbstractRSAPSSSignatureMethod {
- private static PSSParameterSpec spec
+ private static final PSSParameterSpec SHA512_MGF1_PARAMS
= new PSSParameterSpec("SHA-512", "MGF1", MGF1ParameterSpec.SHA512,
64, PSSParameterSpec.TRAILER_FIELD_BC);
@@ -848,15 +868,123 @@ public String getAlgorithm() {
}
@Override
public PSSParameterSpec getPSSParameterSpec() {
- return spec;
+ return SHA512_MGF1_PARAMS;
}
@Override
String getJCAAlgorithm() {
return "SHA512withRSAandMGF1";
}
+ }
+
+ static final class SHA3_224withRSAandMGF1 extends AbstractRSAPSSSignatureMethod {
+
+ private static final PSSParameterSpec SHA3_224_MGF1_PARAMS
+ = new PSSParameterSpec("SHA3-224", "MGF1",
+ new MGF1ParameterSpec("SHA3-224"), 28,
+ PSSParameterSpec.TRAILER_FIELD_BC);
+
+ SHA3_224withRSAandMGF1(AlgorithmParameterSpec params)
+ throws InvalidAlgorithmParameterException {
+ super(params);
+ }
+ SHA3_224withRSAandMGF1(Element dmElem) throws MarshalException {
+ super(dmElem);
+ }
@Override
- Type getAlgorithmType() {
- return Type.RSA;
+ public String getAlgorithm() {
+ return RSA_SHA3_224_MGF1;
+ }
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA3_224_MGF1_PARAMS;
+ }
+ @Override
+ String getJCAAlgorithm() {
+ return "SHA3-224withRSAandMGF1";
+ }
+ }
+
+ static final class SHA3_256withRSAandMGF1 extends AbstractRSAPSSSignatureMethod {
+
+ private static final PSSParameterSpec SHA3_256_MGF1_PARAMS
+ = new PSSParameterSpec("SHA3-256", "MGF1",
+ new MGF1ParameterSpec("SHA3-256"), 32,
+ PSSParameterSpec.TRAILER_FIELD_BC);
+
+ SHA3_256withRSAandMGF1(AlgorithmParameterSpec params)
+ throws InvalidAlgorithmParameterException {
+ super(params);
+ }
+ SHA3_256withRSAandMGF1(Element dmElem) throws MarshalException {
+ super(dmElem);
+ }
+ @Override
+ public String getAlgorithm() {
+ return RSA_SHA3_256_MGF1;
+ }
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA3_256_MGF1_PARAMS;
+ }
+ @Override
+ String getJCAAlgorithm() {
+ return "SHA3-256withRSAandMGF1";
+ }
+ }
+
+ static final class SHA3_384withRSAandMGF1 extends AbstractRSAPSSSignatureMethod {
+
+ private static final PSSParameterSpec SHA3_384_MGF1_PARAMS
+ = new PSSParameterSpec("SHA3-384", "MGF1",
+ new MGF1ParameterSpec("SHA3-384"), 48,
+ PSSParameterSpec.TRAILER_FIELD_BC);
+
+ SHA3_384withRSAandMGF1(AlgorithmParameterSpec params)
+ throws InvalidAlgorithmParameterException {
+ super(params);
+ }
+ SHA3_384withRSAandMGF1(Element dmElem) throws MarshalException {
+ super(dmElem);
+ }
+ @Override
+ public String getAlgorithm() {
+ return RSA_SHA3_384_MGF1;
+ }
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA3_384_MGF1_PARAMS;
+ }
+ @Override
+ String getJCAAlgorithm() {
+ return "SHA3-384withRSAandMGF1";
+ }
+ }
+
+ static final class SHA3_512withRSAandMGF1 extends AbstractRSAPSSSignatureMethod {
+
+ private static final PSSParameterSpec SHA3_512_MGF1_PARAMS
+ = new PSSParameterSpec("SHA3-512", "MGF1",
+ new MGF1ParameterSpec("SHA3-512"), 64,
+ PSSParameterSpec.TRAILER_FIELD_BC);
+
+ SHA3_512withRSAandMGF1(AlgorithmParameterSpec params)
+ throws InvalidAlgorithmParameterException {
+ super(params);
+ }
+ SHA3_512withRSAandMGF1(Element dmElem) throws MarshalException {
+ super(dmElem);
+ }
+ @Override
+ public String getAlgorithm() {
+ return RSA_SHA3_512_MGF1;
+ }
+ @Override
+ public PSSParameterSpec getPSSParameterSpec() {
+ return SHA3_512_MGF1_PARAMS;
+ }
+ @Override
+ String getJCAAlgorithm() {
+ return "SHA3-512withRSAandMGF1";
}
}
@@ -876,10 +1004,6 @@ public String getAlgorithm() {
String getJCAAlgorithm() {
return "RIPEMD160withRSAandMGF1";
}
- @Override
- Type getAlgorithmType() {
- return Type.RSA;
- }
}
static final class SHA1withDSA extends AbstractDSASignatureMethod {
@@ -890,18 +1014,18 @@ static final class SHA1withDSA extends AbstractDSASignatureMethod {
SHA1withDSA(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return SignatureMethod.DSA_SHA1;
}
+ @Override
String getJCAAlgorithm() {
return "SHA1withDSAinP1363Format";
}
+ @Override
String getJCAFallbackAlgorithm() {
return "SHA1withDSA";
}
- Type getAlgorithmType() {
- return Type.DSA;
- }
}
static final class SHA256withDSA extends AbstractDSASignatureMethod {
@@ -912,18 +1036,18 @@ static final class SHA256withDSA extends AbstractDSASignatureMethod {
SHA256withDSA(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return DSA_SHA256;
}
+ @Override
String getJCAAlgorithm() {
return "SHA256withDSAinP1363Format";
}
+ @Override
String getJCAFallbackAlgorithm() {
return "SHA256withDSA";
}
- Type getAlgorithmType() {
- return Type.DSA;
- }
}
static final class SHA1withECDSA extends AbstractECDSASignatureMethod {
@@ -934,18 +1058,18 @@ static final class SHA1withECDSA extends AbstractECDSASignatureMethod {
SHA1withECDSA(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return ECDSA_SHA1;
}
+ @Override
String getJCAAlgorithm() {
return "SHA1withECDSAinP1363Format";
}
+ @Override
String getJCAFallbackAlgorithm() {
return "SHA1withECDSA";
}
- Type getAlgorithmType() {
- return Type.ECDSA;
- }
}
static final class SHA224withECDSA extends AbstractECDSASignatureMethod {
@@ -964,13 +1088,10 @@ public String getAlgorithm() {
String getJCAAlgorithm() {
return "SHA224withECDSAinP1363Format";
}
+ @Override
String getJCAFallbackAlgorithm() {
return "SHA224withECDSA";
}
- @Override
- Type getAlgorithmType() {
- return Type.ECDSA;
- }
}
static final class SHA256withECDSA extends AbstractECDSASignatureMethod {
@@ -981,18 +1102,18 @@ static final class SHA256withECDSA extends AbstractECDSASignatureMethod {
SHA256withECDSA(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return ECDSA_SHA256;
}
+ @Override
String getJCAAlgorithm() {
return "SHA256withECDSAinP1363Format";
}
+ @Override
String getJCAFallbackAlgorithm() {
return "SHA256withECDSA";
}
- Type getAlgorithmType() {
- return Type.ECDSA;
- }
}
static final class SHA384withECDSA extends AbstractECDSASignatureMethod {
@@ -1003,18 +1124,18 @@ static final class SHA384withECDSA extends AbstractECDSASignatureMethod {
SHA384withECDSA(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return ECDSA_SHA384;
}
+ @Override
String getJCAAlgorithm() {
return "SHA384withECDSAinP1363Format";
}
+ @Override
String getJCAFallbackAlgorithm() {
return "SHA384withECDSA";
}
- Type getAlgorithmType() {
- return Type.ECDSA;
- }
}
static final class SHA512withECDSA extends AbstractECDSASignatureMethod {
@@ -1025,18 +1146,18 @@ static final class SHA512withECDSA extends AbstractECDSASignatureMethod {
SHA512withECDSA(Element dmElem) throws MarshalException {
super(dmElem);
}
+ @Override
public String getAlgorithm() {
return ECDSA_SHA512;
}
+ @Override
String getJCAAlgorithm() {
return "SHA512withECDSAinP1363Format";
}
+ @Override
String getJCAFallbackAlgorithm() {
return "SHA512withECDSA";
}
- Type getAlgorithmType() {
- return Type.ECDSA;
- }
}
static final class RIPEMD160withECDSA extends AbstractECDSASignatureMethod {
@@ -1055,13 +1176,10 @@ public String getAlgorithm() {
String getJCAAlgorithm() {
return "RIPEMD160withECDSAinP1363Format"; // Is this real?
}
+ @Override
String getJCAFallbackAlgorithm() {
return "RIPEMD160withECDSA";
}
- @Override
- Type getAlgorithmType() {
- return Type.ECDSA;
- }
}
static final class EDDSA_ED25519 extends AbstractEDDSASignatureMethod {
@@ -1084,11 +1202,6 @@ public String getAlgorithm() {
String getJCAAlgorithm() {
return "Ed25519";
}
-
- @Override
- Type getAlgorithmType() {
- return Type.EDDSA;
- }
}
static final class EDDSA_ED448 extends AbstractEDDSASignatureMethod {
@@ -1110,10 +1223,5 @@ public String getAlgorithm() {
String getJCAAlgorithm() {
return "Ed448";
}
-
- @Override
- Type getAlgorithmType() {
- return Type.EDDSA;
- }
}
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java
index efa9d3fc80ab3..ba72b2725ea1d 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java
@@ -25,11 +25,15 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dom.DOMCryptoContext;
-import javax.xml.crypto.dsig.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
-import java.util.*;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.dom.DOMCryptoContext;
+import javax.xml.crypto.dsig.SignatureProperties;
+import javax.xml.crypto.dsig.SignatureProperty;
+import javax.xml.crypto.dsig.XMLSignature;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
@@ -117,10 +121,12 @@ public DOMSignatureProperties(Element propsElem)
}
}
+ @Override
public List getProperties() {
return properties;
}
+ @Override
public String getId() {
return id;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java
index 136847b491f0b..61994cd85f815 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java
@@ -25,11 +25,15 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dom.DOMCryptoContext;
-import javax.xml.crypto.dsig.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
-import java.util.*;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.XMLStructure;
+import javax.xml.crypto.dom.DOMCryptoContext;
+import javax.xml.crypto.dsig.SignatureProperty;
+import javax.xml.crypto.dsig.XMLSignature;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
@@ -117,14 +121,17 @@ public DOMSignatureProperty(Element propElem)
}
}
+ @Override
public List getContent() {
return content;
}
+ @Override
public String getId() {
return id;
}
+ @Override
public String getTarget() {
return target;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.java
index f4f8bfd438667..170b179564b99 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.java
@@ -25,28 +25,38 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dom.DOMCryptoContext;
-import javax.xml.crypto.dsig.*;
-import javax.xml.crypto.dsig.spec.RSAPSSParameterSpec;
-
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.io.IOException;
import java.security.Provider;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.MGF1ParameterSpec;
import java.security.spec.PSSParameterSpec;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.dom.DOMCryptoContext;
+import javax.xml.crypto.dsig.CanonicalizationMethod;
+import javax.xml.crypto.dsig.Reference;
+import javax.xml.crypto.dsig.SignatureMethod;
+import javax.xml.crypto.dsig.SignedInfo;
+import javax.xml.crypto.dsig.TransformException;
+import javax.xml.crypto.dsig.XMLSignature;
+import javax.xml.crypto.dsig.XMLSignatureException;
+import javax.xml.crypto.dsig.spec.RSAPSSParameterSpec;
import com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA;
+import com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream;
+import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream;
-import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
+
/**
* DOM-based implementation of SignedInfo.
@@ -57,9 +67,9 @@ public final class DOMSignedInfo extends DOMStructure implements SignedInfo {
private static final com.sun.org.slf4j.internal.Logger LOG =
com.sun.org.slf4j.internal.LoggerFactory.getLogger(DOMSignedInfo.class);
- private List references;
- private CanonicalizationMethod canonicalizationMethod;
- private SignatureMethod signatureMethod;
+ private final List references;
+ private final CanonicalizationMethod canonicalizationMethod;
+ private final SignatureMethod signatureMethod;
private String id;
private Document ownerDoc;
private Element localSiElem;
@@ -86,17 +96,13 @@ public DOMSignedInfo(CanonicalizationMethod cm, SignatureMethod sm,
}
this.canonicalizationMethod = cm;
this.signatureMethod = sm;
- this.references = Collections.unmodifiableList(
- new ArrayList<>(references));
+ this.references = Collections.unmodifiableList(new ArrayList<>(references));
if (this.references.isEmpty()) {
- throw new IllegalArgumentException("list of references must " +
- "contain at least one entry");
+ throw new IllegalArgumentException("list of references must contain at least one entry");
}
- for (int i = 0, size = this.references.size(); i < size; i++) {
- Object obj = this.references.get(i);
+ for (Object obj : this.references) {
if (!(obj instanceof Reference)) {
- throw new ClassCastException("list of references contains " +
- "an illegal type");
+ throw new ClassCastException("list of references contains an illegal " + obj.getClass());
}
}
}
@@ -210,22 +216,27 @@ public DOMSignedInfo(Element siElem, XMLCryptoContext context, Provider provider
references = Collections.unmodifiableList(refList);
}
+ @Override
public CanonicalizationMethod getCanonicalizationMethod() {
return canonicalizationMethod;
}
+ @Override
public SignatureMethod getSignatureMethod() {
return signatureMethod;
}
+ @Override
public String getId() {
return id;
}
+ @Override
public List getReferences() {
return references;
}
+ @Override
public InputStream getCanonicalizedData() {
return canonData;
}
@@ -249,8 +260,8 @@ public void canonicalize(XMLCryptoContext context, ByteArrayOutputStream bos)
if (LOG.isDebugEnabled()) {
LOG.debug("Canonicalized SignedInfo:");
StringBuilder sb = new StringBuilder(signedInfoBytes.length);
- for (int i = 0; i < signedInfoBytes.length; i++) {
- sb.append((char)signedInfoBytes[i]);
+ for (byte signedInfoByte : signedInfoBytes) {
+ sb.append((char) signedInfoByte);
}
LOG.debug(sb.toString());
LOG.debug("Data to be signed/verified:" + XMLUtils.encodeToString(signedInfoBytes));
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMStructure.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMStructure.java
index e7ddd0050dfc0..77818ea27c27b 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMStructure.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMStructure.java
@@ -25,12 +25,13 @@
*/
package org.jcp.xml.dsig.internal.dom;
+import java.util.List;
+
import javax.xml.crypto.MarshalException;
import javax.xml.crypto.XMLStructure;
import javax.xml.crypto.dom.DOMCryptoContext;
-import org.w3c.dom.Node;
-import java.util.List;
+import org.w3c.dom.Node;
/**
* DOM-based abstract implementation of XMLStructure.
@@ -38,6 +39,7 @@
*/
public abstract class DOMStructure implements XMLStructure {
+ @Override
public final boolean isFeatureSupported(String feature) {
if (feature == null) {
throw new NullPointerException();
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.java
index 404942e72bf4b..dab41a917e05f 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.java
@@ -25,12 +25,14 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.NodeSetData;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
+
+import javax.xml.crypto.NodeSetData;
+
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -79,6 +81,7 @@ static class DelayedNodeIterator implements Iterator {
this.withComments = !excludeComments;
}
+ @Override
public boolean hasNext() {
if (nodeSet == null) {
nodeSet = dereferenceSameDocumentURI(root);
@@ -87,6 +90,7 @@ public boolean hasNext() {
return li.hasNext();
}
+ @Override
public Node next() {
if (nodeSet == null) {
nodeSet = dereferenceSameDocumentURI(root);
@@ -99,6 +103,7 @@ public Node next() {
}
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMTransform.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMTransform.java
index fd6a89229c49d..0e6fce6e60129 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMTransform.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMTransform.java
@@ -98,10 +98,12 @@ public DOMTransform(Element transElem, XMLCryptoContext context,
}
}
+ @Override
public final AlgorithmParameterSpec getParameterSpec() {
return spi.getParameterSpec();
}
+ @Override
public final String getAlgorithm() {
return spi.getAlgorithm();
}
@@ -145,6 +147,7 @@ public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
* @throws XMLSignatureException if an unexpected error occurs while
* executing the transform
*/
+ @Override
public Data transform(Data data, XMLCryptoContext xc)
throws TransformException
{
@@ -164,6 +167,7 @@ public Data transform(Data data, XMLCryptoContext xc)
* @throws XMLSignatureException if an unexpected error occurs while
* executing the transform
*/
+ @Override
public Data transform(Data data, XMLCryptoContext xc, OutputStream os)
throws TransformException
{
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.java
index e72642bbff355..212ffc9676ddd 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.java
@@ -25,18 +25,23 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
+import javax.xml.crypto.Data;
+import javax.xml.crypto.URIDereferencer;
+import javax.xml.crypto.URIReference;
+import javax.xml.crypto.URIReferenceException;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.dom.DOMCryptoContext;
+import javax.xml.crypto.dom.DOMURIReference;
import com.sun.org.apache.xml.internal.security.Init;
+import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
import com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver;
import com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverContext;
-import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dom.*;
import java.net.URI;
/**
@@ -53,6 +58,7 @@ private DOMURIDereferencer() {
Init.init();
}
+ @Override
public Data dereference(URIReference uriRef, XMLCryptoContext context)
throws URIReferenceException {
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java
index bf8de888bb5b3..2da7628d266b5 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java
@@ -46,12 +46,11 @@
import javax.xml.crypto.dsig.keyinfo.X509Data;
import javax.xml.crypto.dsig.keyinfo.X509IssuerSerial;
+import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
-
/**
* DOM-based implementation of X509Data.
*
@@ -134,6 +133,7 @@ public DOMX509Data(Element xdElem) throws MarshalException {
this.content = Collections.unmodifiableList(newContent);
}
+ @Override
public List getContent() {
return content;
}
@@ -147,8 +147,7 @@ public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
XMLSignature.XMLNS, dsPrefix);
// append children and preserve order
- for (int i = 0, size = content.size(); i < size; i++) {
- Object object = content.get(i);
+ for (Object object : content) {
if (object instanceof X509Certificate) {
marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
} else if (object instanceof XMLStructure) {
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.java
index 959b78636b959..c20088479bc3c 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.java
@@ -25,14 +25,14 @@
*/
package org.jcp.xml.dsig.internal.dom;
+import java.math.BigInteger;
+
+import javax.security.auth.x500.X500Principal;
import javax.xml.crypto.MarshalException;
import javax.xml.crypto.dom.DOMCryptoContext;
import javax.xml.crypto.dsig.XMLSignature;
import javax.xml.crypto.dsig.keyinfo.X509IssuerSerial;
-import java.math.BigInteger;
-
-import javax.security.auth.x500.X500Principal;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -88,10 +88,12 @@ public DOMX509IssuerSerial(Element isElem) throws MarshalException {
serialNumber = new BigInteger(sNElem.getFirstChild().getNodeValue());
}
+ @Override
public String getIssuerName() {
return issuerName;
}
+ @Override
public BigInteger getSerialNumber() {
return serialNumber;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java
index 925a6b81baf2d..bf36537e30828 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java
@@ -25,12 +25,17 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dom.DOMCryptoContext;
-import javax.xml.crypto.dsig.*;
-
import java.security.Provider;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.XMLStructure;
+import javax.xml.crypto.dom.DOMCryptoContext;
+import javax.xml.crypto.dsig.XMLObject;
+import javax.xml.crypto.dsig.XMLSignature;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
@@ -145,18 +150,22 @@ public DOMXMLObject(Element objElem, XMLCryptoContext context,
this.objectElem = objElem;
}
+ @Override
public List getContent() {
return content;
}
+ @Override
public String getId() {
return id;
}
+ @Override
public String getMimeType() {
return mimeType;
}
+ @Override
public String getEncoding() {
return encoding;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java
index 746a1e57cabea..30b35b45bc9c4 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java
@@ -32,29 +32,42 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dom.*;
-import javax.xml.crypto.dsig.*;
-import javax.xml.crypto.dsig.dom.DOMSignContext;
-import javax.xml.crypto.dsig.dom.DOMValidateContext;
-import javax.xml.crypto.dsig.keyinfo.KeyInfo;
-
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.Provider;
-import java.util.Collections;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import javax.xml.crypto.KeySelector;
+import javax.xml.crypto.KeySelectorException;
+import javax.xml.crypto.KeySelectorResult;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.XMLStructure;
+import javax.xml.crypto.dom.DOMCryptoContext;
+import javax.xml.crypto.dsig.Manifest;
+import javax.xml.crypto.dsig.Reference;
+import javax.xml.crypto.dsig.SignatureMethod;
+import javax.xml.crypto.dsig.SignedInfo;
+import javax.xml.crypto.dsig.Transform;
+import javax.xml.crypto.dsig.XMLObject;
+import javax.xml.crypto.dsig.XMLSignContext;
+import javax.xml.crypto.dsig.XMLSignature;
+import javax.xml.crypto.dsig.XMLSignatureException;
+import javax.xml.crypto.dsig.XMLValidateContext;
+import javax.xml.crypto.dsig.dom.DOMSignContext;
+import javax.xml.crypto.dsig.dom.DOMValidateContext;
+import javax.xml.crypto.dsig.keyinfo.KeyInfo;
+
+import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
-
/**
* DOM-based implementation of XMLSignature.
*
@@ -64,11 +77,11 @@ public final class DOMXMLSignature extends DOMStructure
private static final com.sun.org.slf4j.internal.Logger LOG =
com.sun.org.slf4j.internal.LoggerFactory.getLogger(DOMXMLSignature.class);
- private String id;
- private SignatureValue sv;
+ private final String id;
+ private final SignatureValue sv;
private KeyInfo ki;
private List objects;
- private SignedInfo si;
+ private final SignedInfo si;
private Document ownerDoc = null;
private Element localSigElem = null;
private Element sigElem = null;
@@ -174,26 +187,32 @@ public DOMXMLSignature(Element sigElem, XMLCryptoContext context,
}
}
+ @Override
public String getId() {
return id;
}
+ @Override
public KeyInfo getKeyInfo() {
return ki;
}
+ @Override
public SignedInfo getSignedInfo() {
return si;
}
+ @Override
public List getObjects() {
return objects;
}
+ @Override
public SignatureValue getSignatureValue() {
return sv;
}
+ @Override
public KeySelectorResult getKeySelectorResult() {
return ksr;
}
@@ -234,8 +253,8 @@ public void marshal(Node parent, Node nextSibling, String dsPrefix,
}
// create and append Object elements if necessary
- for (int i = 0, size = objects.size(); i < size; i++) {
- ((DOMXMLObject)objects.get(i)).marshal(sigElem, dsPrefix, context);
+ for (XMLObject object : objects) {
+ ((DOMXMLObject)object).marshal(sigElem, dsPrefix, context);
}
// append Id attribute
@@ -460,13 +479,12 @@ private void digestReference(DOMReference ref, XMLSignContext signContext)
if (parsedId != null && signatureIdMap.containsKey(parsedId)) {
XMLStructure xs = signatureIdMap.get(parsedId);
if (xs instanceof DOMReference) {
- digestReference((DOMReference)xs, signContext);
+ digestReference((DOMReference) xs, signContext);
} else if (xs instanceof Manifest) {
- Manifest man = (Manifest)xs;
+ Manifest man = (Manifest) xs;
List manRefs = DOMManifest.getManifestReferences(man);
- for (int i = 0, size = manRefs.size(); i < size; i++) {
- digestReference((DOMReference)manRefs.get(i),
- signContext);
+ for (Reference manRef : manRefs) {
+ digestReference((DOMReference) manRef, signContext);
}
}
}
@@ -518,10 +536,12 @@ public class DOMSignatureValue extends DOMStructure
this.sigValueElem = sigValueElem;
}
+ @Override
public String getId() {
return id;
}
+ @Override
public byte[] getValue() {
return (value == null) ? null : value.clone();
}
@@ -605,6 +625,7 @@ public int hashCode() {
return result;
}
+ @Override
public void marshal(Node parent, String dsPrefix,
DOMCryptoContext context)
throws MarshalException
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java
index 5ee0f78a05362..119bf16bc3236 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java
@@ -25,17 +25,37 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import javax.xml.crypto.*;
-import javax.xml.crypto.dom.DOMCryptoContext;
-import javax.xml.crypto.dsig.*;
-import javax.xml.crypto.dsig.dom.DOMValidateContext;
-import javax.xml.crypto.dsig.keyinfo.*;
-import javax.xml.crypto.dsig.spec.*;
-
import java.security.InvalidAlgorithmParameterException;
import java.security.NoSuchAlgorithmException;
import java.util.List;
+import javax.xml.crypto.Data;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.URIDereferencer;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.XMLStructure;
+import javax.xml.crypto.dom.DOMCryptoContext;
+import javax.xml.crypto.dsig.CanonicalizationMethod;
+import javax.xml.crypto.dsig.DigestMethod;
+import javax.xml.crypto.dsig.Manifest;
+import javax.xml.crypto.dsig.Reference;
+import javax.xml.crypto.dsig.SignatureMethod;
+import javax.xml.crypto.dsig.SignatureProperties;
+import javax.xml.crypto.dsig.SignatureProperty;
+import javax.xml.crypto.dsig.SignedInfo;
+import javax.xml.crypto.dsig.Transform;
+import javax.xml.crypto.dsig.TransformService;
+import javax.xml.crypto.dsig.XMLObject;
+import javax.xml.crypto.dsig.XMLSignature;
+import javax.xml.crypto.dsig.XMLSignatureFactory;
+import javax.xml.crypto.dsig.XMLValidateContext;
+import javax.xml.crypto.dsig.dom.DOMValidateContext;
+import javax.xml.crypto.dsig.keyinfo.KeyInfo;
+import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec;
+import javax.xml.crypto.dsig.spec.DigestMethodParameterSpec;
+import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec;
+import javax.xml.crypto.dsig.spec.TransformParameterSpec;
+
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -51,20 +71,24 @@ public final class DOMXMLSignatureFactory extends XMLSignatureFactory {
*/
public DOMXMLSignatureFactory() {}
+ @Override
public XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki) {
return new DOMXMLSignature(si, ki, null, null, null);
}
+ @Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki,
List objects, String id, String signatureValueId) {
return new DOMXMLSignature(si, ki, objects, id, signatureValueId);
}
+ @Override
public Reference newReference(String uri, DigestMethod dm) {
return newReference(uri, dm, null, null, null);
}
+ @Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public Reference newReference(String uri, DigestMethod dm, List transforms,
String type, String id) {
@@ -89,6 +113,7 @@ public Reference newReference(String uri, DigestMethod dm,
(uri, type, dm, appliedTransforms, result, transforms, id, getProvider());
}
+ @Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public Reference newReference(String uri, DigestMethod dm, List transforms,
String type, String id, byte[] digestValue) {
@@ -99,12 +124,14 @@ public Reference newReference(String uri, DigestMethod dm, List transforms,
(uri, type, dm, null, null, transforms, id, digestValue, getProvider());
}
+ @Override
@SuppressWarnings({ "rawtypes" })
public SignedInfo newSignedInfo(CanonicalizationMethod cm,
SignatureMethod sm, List references) {
return newSignedInfo(cm, sm, references, null);
}
+ @Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public SignedInfo newSignedInfo(CanonicalizationMethod cm,
SignatureMethod sm, List references, String id) {
@@ -112,33 +139,39 @@ public SignedInfo newSignedInfo(CanonicalizationMethod cm,
}
// Object factory methods
+ @Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public XMLObject newXMLObject(List content, String id, String mimeType,
String encoding) {
return new DOMXMLObject(content, id, mimeType, encoding);
}
+ @Override
@SuppressWarnings({ "rawtypes" })
public Manifest newManifest(List references) {
return newManifest(references, null);
}
+ @Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public Manifest newManifest(List references, String id) {
return new DOMManifest(references, id);
}
+ @Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public SignatureProperties newSignatureProperties(List props, String id) {
return new DOMSignatureProperties(props, id);
}
+ @Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public SignatureProperty newSignatureProperty
(List info, String target, String id) {
return new DOMSignatureProperty(info, target, id);
}
+ @Override
public XMLSignature unmarshalXMLSignature(XMLValidateContext context)
throws MarshalException {
@@ -148,6 +181,7 @@ public XMLSignature unmarshalXMLSignature(XMLValidateContext context)
return unmarshal(((DOMValidateContext) context).getNode(), context);
}
+ @Override
public XMLSignature unmarshalXMLSignature(XMLStructure xmlStructure)
throws MarshalException {
@@ -201,6 +235,7 @@ private XMLSignature unmarshal(Node node, XMLCryptoContext context)
}
}
+ @Override
public boolean isFeatureSupported(String feature) {
if (feature == null) {
throw new NullPointerException();
@@ -209,6 +244,7 @@ public boolean isFeatureSupported(String feature) {
}
}
+ @Override
public DigestMethod newDigestMethod(String algorithm,
DigestMethodParameterSpec params) throws NoSuchAlgorithmException,
InvalidAlgorithmParameterException {
@@ -242,6 +278,7 @@ public DigestMethod newDigestMethod(String algorithm,
}
}
+ @Override
public SignatureMethod newSignatureMethod(String algorithm,
SignatureMethodParameterSpec params) throws NoSuchAlgorithmException,
InvalidAlgorithmParameterException {
@@ -270,6 +307,14 @@ public SignatureMethod newSignatureMethod(String algorithm,
return new DOMSignatureMethod.SHA384withRSAandMGF1(params);
} else if (algorithm.equals(DOMSignatureMethod.RSA_SHA512_MGF1)) {
return new DOMSignatureMethod.SHA512withRSAandMGF1(params);
+ } else if (algorithm.equals(DOMSignatureMethod.RSA_SHA3_224_MGF1)) {
+ return new DOMSignatureMethod.SHA3_224withRSAandMGF1(params);
+ } else if (algorithm.equals(DOMSignatureMethod.RSA_SHA3_256_MGF1)) {
+ return new DOMSignatureMethod.SHA3_256withRSAandMGF1(params);
+ } else if (algorithm.equals(DOMSignatureMethod.RSA_SHA3_384_MGF1)) {
+ return new DOMSignatureMethod.SHA3_384withRSAandMGF1(params);
+ } else if (algorithm.equals(DOMSignatureMethod.RSA_SHA3_512_MGF1)) {
+ return new DOMSignatureMethod.SHA3_512withRSAandMGF1(params);
} else if (algorithm.equals(DOMRSAPSSSignatureMethod.RSA_PSS)) {
return new DOMRSAPSSSignatureMethod.RSAPSS(params);
} else if (algorithm.equals(DOMSignatureMethod.RSA_RIPEMD160_MGF1)) {
@@ -311,6 +356,7 @@ public SignatureMethod newSignatureMethod(String algorithm,
}
}
+ @Override
public Transform newTransform(String algorithm,
TransformParameterSpec params) throws NoSuchAlgorithmException,
InvalidAlgorithmParameterException {
@@ -330,6 +376,7 @@ public Transform newTransform(String algorithm,
return new DOMTransform(spi);
}
+ @Override
public Transform newTransform(String algorithm,
XMLStructure params) throws NoSuchAlgorithmException,
InvalidAlgorithmParameterException {
@@ -352,6 +399,7 @@ public Transform newTransform(String algorithm,
return new DOMTransform(spi);
}
+ @Override
public CanonicalizationMethod newCanonicalizationMethod(String algorithm,
C14NMethodParameterSpec params) throws NoSuchAlgorithmException,
InvalidAlgorithmParameterException {
@@ -370,6 +418,7 @@ public CanonicalizationMethod newCanonicalizationMethod(String algorithm,
return new DOMCanonicalizationMethod(spi);
}
+ @Override
public CanonicalizationMethod newCanonicalizationMethod(String algorithm,
XMLStructure params) throws NoSuchAlgorithmException,
InvalidAlgorithmParameterException {
@@ -392,6 +441,7 @@ public CanonicalizationMethod newCanonicalizationMethod(String algorithm,
return new DOMCanonicalizationMethod(spi);
}
+ @Override
public URIDereferencer getURIDereferencer() {
return DOMURIDereferencer.INSTANCE;
}
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java
index 1d538aa3eddd5..bb7fee9f1cea5 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java
@@ -58,6 +58,7 @@
*/
public final class DOMXPathFilter2Transform extends ApacheTransform {
+ @Override
public void init(TransformParameterSpec params)
throws InvalidAlgorithmParameterException
{
@@ -70,6 +71,7 @@ public void init(TransformParameterSpec params)
this.params = params;
}
+ @Override
public void init(XMLStructure parent, XMLCryptoContext context)
throws InvalidAlgorithmParameterException
{
@@ -125,6 +127,7 @@ private void unmarshalParams(Element curXPathElem) throws MarshalException
this.params = new XPathFilter2ParameterSpec(list);
}
+ @Override
public void marshalParams(XMLStructure parent, XMLCryptoContext context)
throws MarshalException
{
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathTransform.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathTransform.java
index 9888e63d74a2f..b427f7be4be05 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathTransform.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathTransform.java
@@ -61,6 +61,7 @@ public void init(TransformParameterSpec params)
this.params = params;
}
+ @Override
public void init(XMLStructure parent, XMLCryptoContext context)
throws InvalidAlgorithmParameterException
{
@@ -89,6 +90,7 @@ private void unmarshalParams(Element paramsElem) {
}
}
+ @Override
public void marshalParams(XMLStructure parent, XMLCryptoContext context)
throws MarshalException
{
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXSLTTransform.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXSLTTransform.java
index 2551f949ae135..467157f4e6faf 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXSLTTransform.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXSLTTransform.java
@@ -26,13 +26,16 @@
package org.jcp.xml.dsig.internal.dom;
import java.security.InvalidAlgorithmParameterException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import javax.xml.crypto.*;
+import javax.xml.crypto.MarshalException;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.XMLStructure;
import javax.xml.crypto.dsig.spec.TransformParameterSpec;
import javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
/**
* DOM-based implementation of XSLT Transform.
* (Uses Apache XML-Sec Transform implementation)
@@ -52,6 +55,7 @@ public void init(TransformParameterSpec params)
this.params = params;
}
+ @Override
public void init(XMLStructure parent, XMLCryptoContext context)
throws InvalidAlgorithmParameterException {
@@ -64,6 +68,7 @@ private void unmarshalParams(Element sheet) {
(new javax.xml.crypto.dom.DOMStructure(sheet));
}
+ @Override
public void marshalParams(XMLStructure parent, XMLCryptoContext context)
throws MarshalException {
super.marshalParams(parent, context);
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/Utils.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/Utils.java
index 0e2a832e14503..70fb50e3c31d0 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/Utils.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/Utils.java
@@ -30,8 +30,12 @@
import java.io.IOException;
import java.security.AccessController;
import java.security.PrivilegedAction;
-import java.util.*;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
import javax.xml.crypto.XMLCryptoContext;
+
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java
index f169a44391c38..2982291c8e253 100644
--- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java
+++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java
@@ -32,10 +32,18 @@
*/
package org.jcp.xml.dsig.internal.dom;
-import java.util.*;
-import java.security.*;
-
-import javax.xml.crypto.dsig.*;
+import java.security.AccessController;
+import java.security.InvalidParameterException;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivilegedAction;
+import java.security.Provider;
+import java.security.ProviderException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.crypto.dsig.CanonicalizationMethod;
+import javax.xml.crypto.dsig.Transform;
/**
* The XMLDSig RI Provider.
@@ -134,7 +142,7 @@ public Object newInstance(Object ctrParamObj)
@SuppressWarnings("removal")
public XMLDSigRI() {
// This is the JDK XMLDSig provider, synced from
- // Apache Santuario XML Security for Java, version 3.0.2
+ // Apache Santuario XML Security for Java, version 3.0.3
super("XMLDSig", VER, INFO);
final Provider p = this;
diff --git a/src/java.xml.crypto/share/legal/santuario.md b/src/java.xml.crypto/share/legal/santuario.md
index bee55d85a83f8..768f0c7b144a4 100644
--- a/src/java.xml.crypto/share/legal/santuario.md
+++ b/src/java.xml.crypto/share/legal/santuario.md
@@ -1,4 +1,4 @@
-## Apache Santuario v3.0.2
+## Apache Santuario v3.0.3
### Apache 2.0 License
```
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java
index e9d64a6ad728b..de37229f68f29 100644
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java
@@ -130,6 +130,7 @@ protected Lint(Context context) {
values.add(LintCategory.PREVIEW);
}
values.add(LintCategory.SYNCHRONIZATION);
+ values.add(LintCategory.INCUBATING);
}
// Look for specific overrides
@@ -215,6 +216,11 @@ public enum LintCategory {
*/
FINALLY("finally"),
+ /**
+ * Warn about use of incubating modules.
+ */
+ INCUBATING("incubating"),
+
/**
* Warn about compiler possible lossy conversions.
*/
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java
index 6c4729c217a40..6dd4a368f44ed 100644
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java
@@ -117,6 +117,7 @@
import static com.sun.tools.javac.code.Kinds.Kind.ERR;
import static com.sun.tools.javac.code.Kinds.Kind.MDL;
import static com.sun.tools.javac.code.Kinds.Kind.MTH;
+import com.sun.tools.javac.code.Lint;
import com.sun.tools.javac.code.Symbol.ModuleResolutionFlags;
@@ -134,6 +135,7 @@ public class Modules extends JCTree.Visitor {
private static final String ALL_SYSTEM = "ALL-SYSTEM";
private static final String ALL_MODULE_PATH = "ALL-MODULE-PATH";
+ private final Lint lint;
private final Log log;
private final Names names;
private final Symtab syms;
@@ -185,6 +187,7 @@ public static Modules instance(Context context) {
protected Modules(Context context) {
context.put(Modules.class, this);
log = Log.instance(context);
+ lint = Lint.instance(context);
names = Names.instance(context);
syms = Symtab.instance(context);
attr = Attr.instance(context);
@@ -1351,13 +1354,15 @@ private void setupAllModules() {
.forEach(result::add);
}
- String incubatingModules = filterAlreadyWarnedIncubatorModules(result.stream()
- .filter(msym -> msym.resolutionFlags.contains(ModuleResolutionFlags.WARN_INCUBATING))
- .map(msym -> msym.name.toString()))
- .collect(Collectors.joining(","));
+ if (lint.isEnabled(LintCategory.INCUBATING)) {
+ String incubatingModules = filterAlreadyWarnedIncubatorModules(result.stream()
+ .filter(msym -> msym.resolutionFlags.contains(ModuleResolutionFlags.WARN_INCUBATING))
+ .map(msym -> msym.name.toString()))
+ .collect(Collectors.joining(","));
- if (!incubatingModules.isEmpty()) {
- log.warning(Warnings.IncubatingModules(incubatingModules));
+ if (!incubatingModules.isEmpty()) {
+ log.warning(Warnings.IncubatingModules(incubatingModules));
+ }
}
allModules = result;
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties
index d9bd05ba62a5f..7893d328afa1e 100644
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties
@@ -213,6 +213,9 @@ javac.opt.Xlint.desc.fallthrough=\
javac.opt.Xlint.desc.finally=\
Warn about finally clauses that do not terminate normally.
+javac.opt.Xlint.desc.incubating=\
+ Warn about use of incubating modules.
+
javac.opt.Xlint.desc.lossy-conversions=\
Warn about possible lossy conversions in compound assignment.
diff --git a/src/jdk.compiler/share/classes/module-info.java b/src/jdk.compiler/share/classes/module-info.java
index c8716233c0f71..9826b3f576b5e 100644
--- a/src/jdk.compiler/share/classes/module-info.java
+++ b/src/jdk.compiler/share/classes/module-info.java
@@ -162,6 +162,7 @@
* {@code fallthrough} falling through from one case of a {@code switch} statement to
* the next
* {@code finally} {@code finally} clauses that do not terminate normally
+ * {@code incubating} use of incubating modules
* {@code lossy-conversions} possible lossy conversions in compound assignment
* {@code missing-explicit-ctor} missing explicit constructors in public and protected classes
* in exported packages
diff --git a/src/jdk.compiler/share/man/javac.1 b/src/jdk.compiler/share/man/javac.1
index 30b260ac64834..b8a7fe60af5ee 100644
--- a/src/jdk.compiler/share/man/javac.1
+++ b/src/jdk.compiler/share/man/javac.1
@@ -725,6 +725,8 @@ a switch statement to the next.
\f[V]finally\f[R]: Warns about \f[V]finally\f[R] clauses that do not
terminate normally.
.IP \[bu] 2
+\f[V]incubating\f[R]: Warns about the use of incubating modules.
+.IP \[bu] 2
\f[V]lossy-conversions\f[R]: Warns about possible lossy conversions in
compound assignment.
.IP \[bu] 2
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java
index 7f67e37840d4d..4534f707c38b7 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java
@@ -114,7 +114,7 @@ public void addInheritedSummaryLabel(TypeElement typeElement, Content content) {
? resources.getText("doclet.Nested_Classes_Interfaces_Inherited_From_Interface")
: resources.getText("doclet.Nested_Classes_Interfaces_Inherited_From_Class"));
}
- var labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, label);
+ var labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING, label);
labelHeading.setId(htmlIds.forInheritedClasses(typeElement));
labelHeading.add(Entity.NO_BREAK_SPACE);
labelHeading.add(classLink);
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java
index 7a11aedbb57b1..2935cbf8616ff 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java
@@ -319,6 +319,11 @@ private Comment getGeneratedBy(boolean timestamp, ZonedDateTime buildDate) {
}
private void addStylesheets(HtmlTree head) {
+ if (index) {
+ // Add JQuery-UI stylesheet first so its rules can be overridden.
+ addStylesheet(head, DocPaths.RESOURCE_FILES.resolve(DocPaths.JQUERY_UI_CSS));
+ }
+
if (mainStylesheet == null) {
mainStylesheet = DocPaths.STYLESHEET;
}
@@ -332,10 +337,6 @@ private void addStylesheets(HtmlTree head) {
// Local stylesheets are contained in doc-files, so omit resource-files prefix
addStylesheet(head, path);
}
-
- if (index) {
- addStylesheet(head, DocPaths.RESOURCE_FILES.resolve(DocPaths.JQUERY_UI_CSS));
- }
}
private void addStylesheet(HtmlTree head, DocPath stylesheet) {
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/stylesheet.css b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/stylesheet.css
index a55e6d53c0bfb..46c39a0918bcb 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/stylesheet.css
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/stylesheet.css
@@ -692,11 +692,14 @@ nav {
/*
* Styles for javadoc search.
*/
-.ui-state-active {
+.ui-menu .ui-state-active {
/* Overrides the color of selection used in jQuery UI */
background: var(--selected-background-color);
- border: 1px solid var(--selected-background-color);
color: var(--selected-text-color);
+ /* Workaround for browser bug, see JDK-8275889 */
+ margin: -1px 0;
+ border-top: 1px solid var(--selected-background-color);
+ border-bottom: 1px solid var(--selected-background-color);
}
.ui-autocomplete-category {
font-weight:bold;
@@ -704,15 +707,16 @@ nav {
padding:7px 0 7px 3px;
background-color:var(--navbar-background-color);
color:var(--navbar-text-color);
+ box-sizing: border-box;
}
.ui-autocomplete {
max-height:85%;
max-width:65%;
overflow-y:auto;
overflow-x:auto;
- scrollbar-width: thin;
white-space:nowrap;
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
+ overscroll-behavior: contain;
}
ul.ui-autocomplete {
position:fixed;
@@ -723,6 +727,7 @@ ul.ui-autocomplete li {
float:left;
clear:both;
min-width:100%;
+ box-sizing: border-box;
}
ul.ui-autocomplete li.ui-static-link {
position:sticky;
@@ -747,6 +752,10 @@ li.ui-static-link a, li.ui-static-link a:visited {
.ui-autocomplete .result-highlight {
font-weight:bold;
}
+.ui-menu .ui-menu-item-wrapper {
+ padding-top: 0.4em;
+ padding-bottom: 0.4em;
+}
#search-input, #page-search-input {
background-image:url('glass.png');
background-size:13px;
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java
index f3749677b9eb7..db8b855eb721b 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java
@@ -73,7 +73,7 @@
import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberCache;
import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable;
import jdk.javadoc.internal.doclint.DocLint;
-import jdk.javadoc.internal.doclint.Env;
+import jdk.javadoc.internal.tool.AccessLevel;
/**
* Configure the output based on the options. Doclets should subclass
@@ -654,10 +654,10 @@ public boolean isDocLintSyntaxGroupEnabled() {
private boolean isDocLintGroupEnabled(jdk.javadoc.internal.doclint.Messages.Group group) {
// Use AccessKind.PUBLIC as a stand-in, since it is not common to
- // set DocLint options per access kind (as is common with javac.)
- // A more sophisticated solution might be to derive the access kind from the
+ // set DocLint options per access level (as is common with javac.)
+ // A more sophisticated solution might be to derive the access level from the
// element owning the comment, and its enclosing elements.
- return doclint != null && doclint.isGroupEnabled(group, Env.AccessKind.PUBLIC);
+ return doclint != null && doclint.isGroupEnabled(group, AccessLevel.PUBLIC);
}
//
}
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/DocLint.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/DocLint.java
index 0139f95b74b4c..9767eff0dd6b4 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/DocLint.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/DocLint.java
@@ -64,6 +64,7 @@
import com.sun.tools.javac.util.DefinedBy;
import com.sun.tools.javac.util.DefinedBy.Api;
import com.sun.tools.javac.util.StringUtils.DamerauLevenshteinDistance;
+import jdk.javadoc.internal.tool.AccessLevel;
/**
* Multi-function entry point for the doc check utility.
@@ -410,8 +411,8 @@ public boolean isValidOption(String opt) {
return false;
}
- public boolean isGroupEnabled(Messages.Group group, Env.AccessKind accessKind) {
- return env.messages.isEnabled(group, accessKind);
+ public boolean isGroupEnabled(Messages.Group group, AccessLevel accessLevel) {
+ return env.messages.isEnabled(group, accessLevel);
}
private String localize(String code, Object... args) {
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Env.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Env.java
index aa88ccd981c3b..f576da1d4851d 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Env.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Env.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,38 +62,13 @@
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.util.MatchingUtils;
import com.sun.tools.javac.util.StringUtils;
+import jdk.javadoc.internal.tool.AccessLevel;
/**
* Utility container for current execution environment,
* providing the current declaration and its doc comment.
*/
public class Env {
- /**
- * Access kinds for declarations.
- */
- public enum AccessKind {
- PRIVATE,
- PACKAGE,
- PROTECTED,
- PUBLIC;
-
- static boolean accepts(String opt) {
- for (AccessKind g: values())
- if (opt.equals(StringUtils.toLowerCase(g.name()))) return true;
- return false;
- }
-
- static AccessKind of(Set mods) {
- if (mods.contains(Modifier.PUBLIC))
- return AccessKind.PUBLIC;
- else if (mods.contains(Modifier.PROTECTED))
- return AccessKind.PROTECTED;
- else if (mods.contains(Modifier.PRIVATE))
- return AccessKind.PRIVATE;
- else
- return AccessKind.PACKAGE;
- }
- }
/** Message handler. */
final Messages messages;
@@ -136,12 +111,12 @@ else if (mods.contains(Modifier.PRIVATE))
/** The comment current being analyzed. */
DocCommentTree currDocComment;
/**
- * The access kind of the declaration containing the comment currently being analyzed.
- * This is the minimum (most restrictive) access kind of the declaration itself
+ * The access level of the declaration containing the comment currently being analyzed.
+ * This is the most limiting access level of the declaration itself
* and that of its containers. For example, a public method in a private class is
* noted as private.
*/
- AccessKind currAccess;
+ AccessLevel currAccess;
/** The set of methods, if any, that the current declaration overrides. */
Set extends ExecutableElement> currOverriddenMethods;
@@ -219,18 +194,18 @@ void setCurrent(TreePath path, DocCommentTree comment) {
currElement = trees.getElement(currPath);
currOverriddenMethods = ((JavacTypes) types).getOverriddenMethods(currElement);
- AccessKind ak = AccessKind.PUBLIC;
+ // It's convenient to use AccessLevel to model effects that nesting has
+ // on access. While very similar, those are not the same concept.
+ var mostLimitingSoFar = AccessLevel.PUBLIC;
for (TreePath p = path; p != null; p = p.getParentPath()) {
Element e = trees.getElement(p);
if (e != null && e.getKind() != ElementKind.PACKAGE && e.getKind() != ElementKind.MODULE) {
- ak = min(ak, AccessKind.of(e.getModifiers()));
+ var level = AccessLevel.of(e.getModifiers());
+ mostLimitingSoFar = mostLimitingSoFar.compareTo(level) <= 0
+ ? mostLimitingSoFar : level;
}
}
- currAccess = ak;
- }
-
- AccessKind getAccessKind() {
- return currAccess;
+ currAccess = mostLimitingSoFar;
}
long getPos(TreePath p) {
@@ -359,11 +334,4 @@ private List getSuppressWarningsValue(Element e) {
}
return List.of();
}
-
-
- private > T min(T item1, T item2) {
- return (item1 == null) ? item2
- : (item2 == null) ? item1
- : item1.compareTo(item2) <= 0 ? item1 : item2;
- }
}
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Messages.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Messages.java
index 7d38e511d037f..2e6bc6f339b1a 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Messages.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Messages.java
@@ -43,7 +43,7 @@
import com.sun.source.tree.Tree;
import com.sun.tools.javac.api.JavacTrees;
import com.sun.tools.javac.util.StringUtils;
-import jdk.javadoc.internal.doclint.Env.AccessKind;
+import jdk.javadoc.internal.tool.AccessLevel;
/**
* Message reporting for DocLint.
@@ -109,8 +109,8 @@ void setStatsEnabled(boolean b) {
stats.setEnabled(b);
}
- boolean isEnabled(Group group, Env.AccessKind ak) {
- return options.isEnabled(group, ak);
+ boolean isEnabled(Group group, AccessLevel al) {
+ return options.isEnabled(group, al);
}
void reportStats(PrintWriter out) {
@@ -176,7 +176,7 @@ String localize(String code, Object... args) {
* Handler for (sub)options specific to message handling.
*/
static class Options {
- Map map = new HashMap<>();
+ private final Map map = new HashMap<>();
private final Stats stats;
static boolean isValidOptions(String opts) {
@@ -195,7 +195,13 @@ private static boolean isValidOption(String opt) {
int sep = opt.indexOf("/");
String grp = opt.substring(begin, (sep != -1) ? sep : opt.length());
return ((begin == 0 && grp.equals("all")) || Group.accepts(grp))
- && ((sep == -1) || AccessKind.accepts(opt.substring(sep + 1)));
+ && ((sep == -1) || accepts(opt.substring(sep + 1)));
+ }
+
+ static boolean accepts(String opt) {
+ for (var level: AccessLevel.values())
+ if (opt.equals(StringUtils.toLowerCase(level.name()))) return true;
+ return false;
}
Options(Stats stats) {
@@ -203,19 +209,18 @@ private static boolean isValidOption(String opt) {
}
/** Determine if a message group is enabled for a particular access level. */
- boolean isEnabled(Group g, Env.AccessKind access) {
+ boolean isEnabled(Group g, AccessLevel access) {
if (map.isEmpty())
- map.put("all", Env.AccessKind.PROTECTED);
+ map.put(ALL, AccessLevel.PROTECTED);
- Env.AccessKind ak = map.get(g.optName());
- if (ak != null && access.compareTo(ak) >= 0)
+ AccessLevel al = map.get(g.optName());
+ if (al != null && access.compareTo(al) >= 0)
return true;
- ak = map.get(ALL);
- if (ak != null && access.compareTo(ak) >= 0) {
- ak = map.get(g.notOptName());
- if (ak == null || access.compareTo(ak) > 0) // note >, not >=
- return true;
+ al = map.get(ALL);
+ if (al != null && access.compareTo(al) >= 0) {
+ al = map.get(g.notOptName());
+ return al == null || access.compareTo(al) > 0; // note >, not >=
}
return false;
@@ -223,7 +228,7 @@ boolean isEnabled(Group g, Env.AccessKind access) {
void setOptions(String opts) {
if (opts == null)
- setOption(ALL, Env.AccessKind.PRIVATE);
+ setOption(ALL, AccessLevel.PRIVATE);
else {
for (String opt: opts.split(","))
setOption(StringUtils.toLowerCase(opt.trim()));
@@ -238,16 +243,16 @@ private void setOption(String arg) throws IllegalArgumentException {
int sep = arg.indexOf("/");
if (sep > 0) {
- Env.AccessKind ak = Env.AccessKind.valueOf(StringUtils.toUpperCase(arg.substring(sep + 1)));
- setOption(arg.substring(0, sep), ak);
+ var al = AccessLevel.valueOf(StringUtils.toUpperCase(arg.substring(sep + 1)));
+ setOption(arg.substring(0, sep), al);
} else {
setOption(arg, null);
}
}
- private void setOption(String opt, Env.AccessKind ak) {
- map.put(opt, (ak != null) ? ak
- : opt.startsWith("-") ? Env.AccessKind.PUBLIC : Env.AccessKind.PRIVATE);
+ private void setOption(String opt, AccessLevel al) {
+ map.put(opt, (al != null) ? al
+ : opt.startsWith("-") ? AccessLevel.PUBLIC : AccessLevel.PRIVATE);
}
private static final String ALL = "all";
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/AccessLevel.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/AccessLevel.java
new file mode 100644
index 0000000000000..97481fa2f0845
--- /dev/null
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/AccessLevel.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.javadoc.internal.tool;
+
+import java.util.Set;
+import javax.lang.model.element.Modifier;
+
+/**
+ * The access levels.
+ *
+ * These constants are ordered by their access limiting power. The bigger the
+ * {@link #ordinal() ordinal} of a constant, the more limiting power that
+ * constant has.
+ *
+ * That has a few useful implications. For example, the levels can be compared
+ * by {@link #compareTo}. It also means that {@code AccessLevel.values()[0]} and
+ * {@code AccessLevel.values()[values.length() - 1] and the constants with the
+ * smallest and the biggest limiting powers respectively.
+ */
+public enum AccessLevel implements Comparable {
+
+ /** Does not limit access */
+ PRIVATE,
+ /** Limits access to entities that are public, protected, or declared with package access */
+ PACKAGE,
+ /** Limits access to public and protected entities */
+ PROTECTED,
+ /** Limits access to public entities */
+ PUBLIC;
+
+ public static AccessLevel of(Set mods) {
+ if (mods.contains(Modifier.PUBLIC))
+ return AccessLevel.PUBLIC;
+ else if (mods.contains(Modifier.PROTECTED))
+ return AccessLevel.PROTECTED;
+ else if (mods.contains(Modifier.PRIVATE))
+ return AccessLevel.PRIVATE;
+ else
+ return AccessLevel.PACKAGE;
+ }
+}
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ElementsTable.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ElementsTable.java
index e915fc5f34c70..7f4f31844f5af 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ElementsTable.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ElementsTable.java
@@ -192,7 +192,7 @@ public class ElementsTable {
private final ModifierFilter accessFilter;
- private final AccessKind expandRequires;
+ private final AccessLevel expandRequires;
final boolean xclasses;
@@ -605,8 +605,8 @@ private void computeSpecifiedModules() throws ToolException {
return;
}
- final boolean expandAll = expandRequires.equals(AccessKind.PRIVATE)
- || expandRequires.equals(AccessKind.PACKAGE);
+ final boolean expandAll = expandRequires.equals(AccessLevel.PRIVATE)
+ || expandRequires.equals(AccessLevel.PACKAGE);
Set result = new LinkedHashSet<>();
ListBuffer queue = new ListBuffer<>();
@@ -657,13 +657,13 @@ private Set getAllModulePackages(ModuleElement mdle) throws Tool
}
private Set computeModulePackages() throws ToolException {
- AccessKind accessValue = accessFilter.getAccessValue(ElementKind.PACKAGE);
- final boolean documentAllModulePackages = (accessValue == AccessKind.PACKAGE ||
- accessValue == AccessKind.PRIVATE);
+ AccessLevel accessValue = accessFilter.getAccessValue(ElementKind.PACKAGE);
+ final boolean documentAllModulePackages = (accessValue == AccessLevel.PACKAGE ||
+ accessValue == AccessLevel.PRIVATE);
accessValue = accessFilter.getAccessValue(ElementKind.MODULE);
- final boolean moduleDetailedMode = (accessValue == AccessKind.PACKAGE ||
- accessValue == AccessKind.PRIVATE);
+ final boolean moduleDetailedMode = (accessValue == AccessLevel.PACKAGE ||
+ accessValue == AccessLevel.PRIVATE);
Set expandedModulePackages = new LinkedHashSet<>();
for (ModuleElement mdle : specifiedModuleElements) {
@@ -1185,12 +1185,8 @@ static class ModifierFilter {
ElementKind.PACKAGE,
ElementKind.MODULE);
- // all possible access levels allowed for each element
- private final EnumMap> filterMap =
- new EnumMap<>(ElementKind.class);
-
- // the specified access level for each element
- private final EnumMap accessMap =
+ // the allowed access level for each element kind
+ private final EnumMap allowedAccess =
new EnumMap<>(ElementKind.class);
/**
@@ -1199,35 +1195,23 @@ static class ModifierFilter {
* @param options the tool options
*/
ModifierFilter(ToolOptions options) {
-
- AccessKind accessValue = null;
for (ElementKind kind : ALLOWED_KINDS) {
- accessValue = switch (kind) {
+ var accessValue = switch (kind) {
case METHOD -> options.showMembersAccess();
case CLASS -> options.showTypesAccess();
case PACKAGE -> options.showPackagesAccess();
case MODULE -> options.showModuleContents();
default -> throw new AssertionError("unknown element: " + kind);
};
- accessMap.put(kind, accessValue);
- filterMap.put(kind, getFilterSet(accessValue));
+ allowedAccess.put(kind, accessValue);
}
}
- static EnumSet getFilterSet(AccessKind accessValue) {
- return switch (accessValue) {
- case PUBLIC -> EnumSet.of(AccessKind.PUBLIC);
- case PROTECTED -> EnumSet.of(AccessKind.PUBLIC, AccessKind.PROTECTED);
- case PACKAGE -> EnumSet.of(AccessKind.PUBLIC, AccessKind.PROTECTED, AccessKind.PACKAGE);
- case PRIVATE -> EnumSet.allOf(AccessKind.class);
- };
- }
-
- public AccessKind getAccessValue(ElementKind kind) {
+ public AccessLevel getAccessValue(ElementKind kind) {
if (!ALLOWED_KINDS.contains(kind)) {
throw new IllegalArgumentException("not allowed: " + kind);
}
- return accessMap.getOrDefault(kind, AccessKind.PROTECTED);
+ return allowedAccess.getOrDefault(kind, AccessLevel.PROTECTED);
}
/**
@@ -1237,21 +1221,13 @@ public AccessKind getAccessValue(ElementKind kind) {
* @return whether the modifiers pass this filter
*/
public boolean checkModifier(Element e) {
- Set modifiers = e.getModifiers();
- AccessKind fflag = AccessKind.PACKAGE;
- if (modifiers.contains(Modifier.PUBLIC)) {
- fflag = AccessKind.PUBLIC;
- } else if (modifiers.contains(Modifier.PROTECTED)) {
- fflag = AccessKind.PROTECTED;
- } else if (modifiers.contains(Modifier.PRIVATE)) {
- fflag = AccessKind.PRIVATE;
- }
- EnumSet filterSet = filterMap.get(getAllowedKind(e.getKind()));
- return filterSet.contains(fflag);
+ var access = AccessLevel.of(e.getModifiers());
+ return allowedAccess.get(toTrackedKind(e.getKind())).compareTo(access) <= 0;
}
- // convert a requested element kind to an allowed access kind
- private ElementKind getAllowedKind(ElementKind kind) {
+ // convert the requested element kind to a tracked access kind
+ // (access is tracked for certain kinds only)
+ private ElementKind toTrackedKind(ElementKind kind) {
return switch (kind) {
case CLASS, METHOD, MODULE, PACKAGE -> kind;
case RECORD, ANNOTATION_TYPE, ENUM, INTERFACE -> ElementKind.CLASS;
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOptions.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOptions.java
index 07f53f7092447..d478e878a5cef 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOptions.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOptions.java
@@ -85,7 +85,7 @@ public class ToolOptions {
/**
* Argument for command-line option {@code --expand-requires}.
*/
- private AccessKind expandRequires;
+ private AccessLevel expandRequires;
/**
* Argument for command-line option {@code --ignore-source-errors}.
@@ -106,22 +106,22 @@ public class ToolOptions {
/**
* Argument for command-line option {@code --show-members}.
*/
- private AccessKind showMembersAccess;
+ private AccessLevel showMembersAccess;
/**
* Argument for command-line option {@code --show-types}.
*/
- private AccessKind showTypesAccess;
+ private AccessLevel showTypesAccess;
/**
* Argument for command-line option {@code --show-packages}.
*/
- private AccessKind showPackagesAccess;
+ private AccessLevel showPackagesAccess;
/**
* Argument for command-line option {@code --show-module-contents}.
*/
- private AccessKind showModuleContents;
+ private AccessLevel showModuleContents;
/**
* Argument for command-line option {@code -quiet}.
@@ -717,7 +717,7 @@ List excludes() {
/**
* Argument for command-line option {@code --expand-requires}.
*/
- AccessKind expandRequires() {
+ AccessLevel expandRequires() {
return expandRequires;
}
@@ -746,28 +746,28 @@ boolean rejectWarnings() {
/**
* Argument for command-line option {@code --show-members}.
*/
- AccessKind showMembersAccess() {
+ AccessLevel showMembersAccess() {
return showMembersAccess;
}
/**
* Argument for command-line option {@code --show-types}.
*/
- AccessKind showTypesAccess() {
+ AccessLevel showTypesAccess() {
return showTypesAccess;
}
/**
* Argument for command-line option {@code --show-packages}.
*/
- AccessKind showPackagesAccess() {
+ AccessLevel showPackagesAccess() {
return showPackagesAccess;
}
/**
* Argument for command-line option {@code --show-module-contents}.
*/
- AccessKind showModuleContents() {
+ AccessLevel showModuleContents() {
return showModuleContents;
}
@@ -885,40 +885,25 @@ public boolean handleFileManagerOption(com.sun.tools.javac.main.Option option, S
private void setExpandRequires(String arg) throws OptionException {
switch (arg) {
- case "transitive":
- expandRequires = AccessKind.PUBLIC;
- break;
- case "all":
- expandRequires = AccessKind.PRIVATE;
- break;
- default:
- throw illegalOptionValue(arg);
+ case "transitive" -> expandRequires = AccessLevel.PUBLIC;
+ case "all" -> expandRequires = AccessLevel.PRIVATE;
+ default -> throw illegalOptionValue(arg);
}
}
private void setShowModuleContents(String arg) throws OptionException {
switch (arg) {
- case "api":
- showModuleContents = AccessKind.PUBLIC;
- break;
- case "all":
- showModuleContents = AccessKind.PRIVATE;
- break;
- default:
- throw illegalOptionValue(arg);
+ case "api" -> showModuleContents = AccessLevel.PUBLIC;
+ case "all" -> showModuleContents = AccessLevel.PRIVATE;
+ default -> throw illegalOptionValue(arg);
}
}
private void setShowPackageAccess(String arg) throws OptionException {
switch (arg) {
- case "exported":
- showPackagesAccess = AccessKind.PUBLIC;
- break;
- case "all":
- showPackagesAccess = AccessKind.PRIVATE;
- break;
- default:
- throw illegalOptionValue(arg);
+ case "exported" -> showPackagesAccess = AccessLevel.PUBLIC;
+ case "all" -> showPackagesAccess = AccessLevel.PRIVATE;
+ default -> throw illegalOptionValue(arg);
}
}
@@ -948,53 +933,37 @@ private void setSimpleAccessOption(String arg) throws OptionException {
* -private, so on, in addition to the new ones such as
* --show-types:public and so on.
*/
- private AccessKind getAccessValue(String arg) throws OptionException {
+ private AccessLevel getAccessValue(String arg) throws OptionException {
int colon = arg.indexOf(':');
- String value = (colon > 0)
- ? arg.substring(colon + 1)
- : arg;
- switch (value) {
- case "public":
- return AccessKind.PUBLIC;
- case "protected":
- return AccessKind.PROTECTED;
- case "package":
- return AccessKind.PACKAGE;
- case "private":
- return AccessKind.PRIVATE;
- default:
- throw illegalOptionValue(value);
- }
+ String value = (colon > 0) ? arg.substring(colon + 1) : arg;
+ return switch (value) {
+ case "public" -> AccessLevel.PUBLIC;
+ case "protected" -> AccessLevel.PROTECTED;
+ case "package" -> AccessLevel.PACKAGE;
+ case "private" -> AccessLevel.PRIVATE;
+ default -> throw illegalOptionValue(value);
+ };
}
/*
* Sets all access members to PROTECTED; this is the default.
*/
private void setAccessDefault() {
- setAccess(AccessKind.PROTECTED);
+ setAccess(AccessLevel.PROTECTED);
}
/*
- * This sets access to all the allowed kinds in the
+ * Sets access level to all the allowed kinds in the
* access members.
*/
- private void setAccess(AccessKind accessValue) {
+ private void setAccess(AccessLevel accessValue) {
for (ElementKind kind : ElementsTable.ModifierFilter.ALLOWED_KINDS) {
switch (kind) {
- case METHOD:
- showMembersAccess = accessValue;
- break;
- case CLASS:
- showTypesAccess = accessValue;
- break;
- case PACKAGE:
- showPackagesAccess = accessValue;
- break;
- case MODULE:
- showModuleContents = accessValue;
- break;
- default:
- throw new AssertionError("unknown element kind:" + kind);
+ case METHOD -> showMembersAccess = accessValue;
+ case CLASS -> showTypesAccess = accessValue;
+ case PACKAGE -> showPackagesAccess = accessValue;
+ case MODULE -> showModuleContents = accessValue;
+ default -> throw new AssertionError("unknown element kind:" + kind);
}
}
}
diff --git a/src/jdk.jdeps/share/classes/com/sun/tools/javap/JavapTask.java b/src/jdk.jdeps/share/classes/com/sun/tools/javap/JavapTask.java
index 134b4b424b793..01927b4e48595 100644
--- a/src/jdk.jdeps/share/classes/com/sun/tools/javap/JavapTask.java
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/javap/JavapTask.java
@@ -860,6 +860,19 @@ private JavaFileObject getClassFileObject(String className) throws IOException {
if (moduleLocation != null) {
fo = fileManager.getJavaFileForInput(moduleLocation, className, JavaFileObject.Kind.CLASS);
} else {
+ if (className.indexOf('.') > 0) {
+ //search for classes with a named package in the JDK modules specifed by --system option first
+ try {
+ for (Set locations: fileManager.listLocationsForModules(StandardLocation.SYSTEM_MODULES)) {
+ for (Location systemModule: locations) {
+ fo = fileManager.getJavaFileForInput(systemModule, className, JavaFileObject.Kind.CLASS);
+ if (fo != null) return fo;
+ }
+ }
+ } catch (UnsupportedOperationException e) {
+ //skip when listLocationsForModules is not supported
+ }
+ }
fo = fileManager.getJavaFileForInput(StandardLocation.PLATFORM_CLASS_PATH, className, JavaFileObject.Kind.CLASS);
if (fo == null)
fo = fileManager.getJavaFileForInput(StandardLocation.CLASS_PATH, className, JavaFileObject.Kind.CLASS);
diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt
index 47bc8e763f53c..01a47f51898d9 100644
--- a/test/hotspot/jtreg/ProblemList.txt
+++ b/test/hotspot/jtreg/ProblemList.txt
@@ -51,8 +51,6 @@ compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java 8190680 generic-all
compiler/runtime/Test8168712.java 8211769,8211771 generic-ppc64,generic-ppc64le,linux-s390x
compiler/loopopts/TestUnreachableInnerLoop.java 8288981 linux-s390x
-compiler/rangechecks/TestRangeCheckHoistingScaledIV.java 8315969 generic-all
-
compiler/rtm/locking/TestRTMAbortRatio.java 8183263 generic-x64,generic-i586
compiler/rtm/locking/TestRTMAbortThreshold.java 8183263 generic-x64,generic-i586
compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java 8183263 generic-x64,generic-i586
diff --git a/test/hotspot/jtreg/compiler/c2/TestReduceAllocationAndHeapDump.java b/test/hotspot/jtreg/compiler/c2/TestReduceAllocationAndHeapDump.java
new file mode 100644
index 0000000000000..9d1e97e253f06
--- /dev/null
+++ b/test/hotspot/jtreg/compiler/c2/TestReduceAllocationAndHeapDump.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 8319784
+ * @summary Check that the JVM is able to dump the heap even when there are ReduceAllocationMerge in the scope.
+ * @library /test/lib /
+ * @run main/othervm compiler.c2.TestReduceAllocationAndHeapDump
+ */
+
+package compiler.c2;
+
+import java.io.File;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+public class TestReduceAllocationAndHeapDump {
+ public static void main(String[] args) throws Exception {
+ File dumpDirectory = new File("dumps");
+
+ try {
+ if (!dumpDirectory.exists()) {
+ dumpDirectory.mkdir();
+ }
+
+ String[] dumperArgs = {
+ "-server",
+ "-XX:CompileThresholdScaling=0.01",
+ "-XX:+HeapDumpAfterFullGC",
+ "-XX:HeapDumpPath=" + dumpDirectory.getAbsolutePath(),
+ "-XX:CompileCommand=compileonly,compiler.c2.HeapDumper::testIt",
+ "-XX:CompileCommand=exclude,compiler.c2.HeapDumper::dummy",
+ HeapDumper.class.getName()
+ };
+
+ ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(dumperArgs);
+ Process p = pb.start();
+ OutputAnalyzer out = new OutputAnalyzer(p);
+
+ if (out.getExitValue() != 0) {
+ throw new IllegalStateException("Subprocess finished with non-zero exit code.");
+ }
+ } finally {
+ File[] files = dumpDirectory.listFiles((dir, name) -> name.endsWith(".hprof"));
+
+ for (File file : files) {
+ System.out.println("Deleting " + file.getAbsolutePath());
+ file.delete();
+ }
+ }
+ }
+}
+
+class HeapDumper {
+ public static Point p = new Point(0);
+
+ public static void main(String[] args) throws Exception {
+ for (int i = 0; i < 5000; i++) {
+ testIt(i);
+ }
+ }
+
+ public static void testIt(int i) throws Exception {
+ Point p = (i % 2 == 0) ? new Point(i) : new Point(i);
+
+ dummy(i);
+
+ if (i < 5000) {
+ dummy(i);
+ } else {
+ dummy(p.x + i);
+ }
+ }
+
+ public static void dummy(int x) {
+ if (x > 4900) {
+ System.gc();
+ }
+ }
+}
+
+// Helper class
+class Point {
+ public int x;
+
+ public Point(int xx) {
+ this.x = xx;
+ }
+}
diff --git a/test/hotspot/jtreg/compiler/ciReplay/TestIncrementalInlining.java b/test/hotspot/jtreg/compiler/ciReplay/TestIncrementalInlining.java
index 8bac1ea283c86..43daab7a9b029 100644
--- a/test/hotspot/jtreg/compiler/ciReplay/TestIncrementalInlining.java
+++ b/test/hotspot/jtreg/compiler/ciReplay/TestIncrementalInlining.java
@@ -68,6 +68,7 @@ public static void main(String[] args) {
commandLineNormal.add("-XX:+WhiteBoxAPI");
commandLineNormal.add("-XX:MaxInlineLevel=2");
commandLineNormal.add("-XX:-AlwaysIncrementalInline");
+ commandLineNormal.add("-XX:-StressIncrementalInlining");
runTest();
}
diff --git a/test/hotspot/jtreg/compiler/intrinsics/klass/CastNullCheckDroppingsTest.java b/test/hotspot/jtreg/compiler/intrinsics/klass/CastNullCheckDroppingsTest.java
index 79433ef355db1..2d2bf14d76fe5 100644
--- a/test/hotspot/jtreg/compiler/intrinsics/klass/CastNullCheckDroppingsTest.java
+++ b/test/hotspot/jtreg/compiler/intrinsics/klass/CastNullCheckDroppingsTest.java
@@ -37,7 +37,7 @@
* -Xmixed -XX:-BackgroundCompilation -XX:-TieredCompilation -XX:CompileThreshold=1000
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodTrapLimit=100 -XX:-StressReflectiveCode
* -XX:+UncommonNullCast -XX:-StressMethodHandleLinkerInlining -XX:TypeProfileLevel=0
- * -XX:-AlwaysIncrementalInline
+ * -XX:-AlwaysIncrementalInline -XX:-StressIncrementalInlining
* -XX:CompileCommand=exclude,compiler.intrinsics.klass.CastNullCheckDroppingsTest::runTest
* compiler.intrinsics.klass.CastNullCheckDroppingsTest
*/
diff --git a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java
index 443dc9187d8aa..5855440d0b275 100644
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@
* -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2
* -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse
* -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame3
- * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay
+ * -XX:+DoEscapeAnalysis
* -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true
* -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false
* compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest
@@ -63,7 +63,7 @@
* -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2
* -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse
* -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame3
- * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay
+ * -XX:+DoEscapeAnalysis
* -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false
* -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false
* compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest
@@ -75,7 +75,7 @@
* -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2
* -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse
* -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame3
- * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay
+ * -XX:+DoEscapeAnalysis
* -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true
* -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true
* compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest
@@ -87,7 +87,7 @@
* -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2
* -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse
* -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame3
- * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay
+ * -XX:+DoEscapeAnalysis
* -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false
* -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true
* compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest
diff --git a/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java b/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java
index e342adf595c61..b9a3028978f4b 100644
--- a/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java
+++ b/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Arm Limited. All rights reserved.
+ * Copyright (c) 2022, 2023, Arm Limited. All rights reserved.
* 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 8289996
* @summary Test range check hoisting for some scaled iv at array index
* @library /test/lib /
+ * @requires vm.flagless
* @requires vm.debug & vm.compiler2.enabled & (os.simpleArch == "x64" | os.arch == "aarch64")
* @modules jdk.incubator.vector
* @run main/othervm compiler.rangechecks.TestRangeCheckHoistingScaledIV
diff --git a/test/hotspot/jtreg/compiler/tiered/ConstantGettersTransitionsTest.java b/test/hotspot/jtreg/compiler/tiered/ConstantGettersTransitionsTest.java
index e5fb2825aa774..8f5032b9c9fdb 100644
--- a/test/hotspot/jtreg/compiler/tiered/ConstantGettersTransitionsTest.java
+++ b/test/hotspot/jtreg/compiler/tiered/ConstantGettersTransitionsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@
* compiler.tiered.ConstantGettersTransitionsTest
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
- * -XX:+WhiteBoxAPI -XX:+TieredCompilation -XX:-UseCounterDecay
+ * -XX:+WhiteBoxAPI -XX:+TieredCompilation
* -XX:CompileCommand=compileonly,compiler.tiered.ConstantGettersTransitionsTest$ConstantGettersTestCase$TrivialMethods::*
* compiler.tiered.ConstantGettersTransitionsTest
*/
diff --git a/test/hotspot/jtreg/compiler/tiered/Level2RecompilationTest.java b/test/hotspot/jtreg/compiler/tiered/Level2RecompilationTest.java
index 33a9a07b6cef0..9cdba8c7bea0f 100644
--- a/test/hotspot/jtreg/compiler/tiered/Level2RecompilationTest.java
+++ b/test/hotspot/jtreg/compiler/tiered/Level2RecompilationTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+TieredCompilation
- * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay
+ * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
* -XX:CompileCommand=print,compiler.whitebox.SimpleTestCaseHelper::*
* compiler.tiered.Level2RecompilationTest
diff --git a/test/hotspot/jtreg/compiler/tiered/LevelTransitionTest.java b/test/hotspot/jtreg/compiler/tiered/LevelTransitionTest.java
index b18b304a9bc13..b3a2c7ab5db6c 100644
--- a/test/hotspot/jtreg/compiler/tiered/LevelTransitionTest.java
+++ b/test/hotspot/jtreg/compiler/tiered/LevelTransitionTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@
* compiler.tiered.LevelTransitionTest
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
- * -XX:+WhiteBoxAPI -XX:+TieredCompilation -XX:-UseCounterDecay
+ * -XX:+WhiteBoxAPI -XX:+TieredCompilation
* -XX:-BackgroundCompilation
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
* -XX:CompileCommand=compileonly,compiler.tiered.LevelTransitionTest$ExtendedTestCase$CompileMethodHolder::*
diff --git a/test/hotspot/jtreg/compiler/tiered/NonTieredLevelsTest.java b/test/hotspot/jtreg/compiler/tiered/NonTieredLevelsTest.java
index 57098440fce26..d23b13a65e473 100644
--- a/test/hotspot/jtreg/compiler/tiered/NonTieredLevelsTest.java
+++ b/test/hotspot/jtreg/compiler/tiered/NonTieredLevelsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:-TieredCompilation
- * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay
+ * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
* compiler.tiered.NonTieredLevelsTest
*/
diff --git a/test/hotspot/jtreg/compiler/tiered/TieredLevelsTest.java b/test/hotspot/jtreg/compiler/tiered/TieredLevelsTest.java
index 4fe36dc7e86fe..98e112927c630 100644
--- a/test/hotspot/jtreg/compiler/tiered/TieredLevelsTest.java
+++ b/test/hotspot/jtreg/compiler/tiered/TieredLevelsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+TieredCompilation
- * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay
+ * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
* compiler.tiered.TieredLevelsTest
*/
diff --git a/test/hotspot/jtreg/compiler/uncommontrap/Decompile.java b/test/hotspot/jtreg/compiler/uncommontrap/Decompile.java
index 827eae7168b6b..678b2883b16d8 100644
--- a/test/hotspot/jtreg/compiler/uncommontrap/Decompile.java
+++ b/test/hotspot/jtreg/compiler/uncommontrap/Decompile.java
@@ -36,7 +36,7 @@
* -Xbatch -XX:-UseOnStackReplacement -XX:-TieredCompilation
* -XX:+UnlockExperimentalVMOptions -XX:PerMethodTrapLimit=100 -XX:PerBytecodeTrapLimit=4
* -XX:TypeProfileLevel=0
- * -XX:+IgnoreUnrecognizedVMOptions -XX:-AlwaysIncrementalInline
+ * -XX:+IgnoreUnrecognizedVMOptions -XX:-AlwaysIncrementalInline -XX:-StressIncrementalInlining
* -XX:CompileCommand=compileonly,compiler.uncommontrap.Decompile::uncommonTrap
* -XX:CompileCommand=inline,compiler.uncommontrap.Decompile*::foo
* compiler.uncommontrap.Decompile
diff --git a/test/hotspot/jtreg/compiler/whitebox/ClearMethodStateTest.java b/test/hotspot/jtreg/compiler/whitebox/ClearMethodStateTest.java
index ee62d9f229c66..33abc23c17aff 100644
--- a/test/hotspot/jtreg/compiler/whitebox/ClearMethodStateTest.java
+++ b/test/hotspot/jtreg/compiler/whitebox/ClearMethodStateTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
- * -XX:+WhiteBoxAPI -XX:+PrintCompilation -XX:-UseCounterDecay
+ * -XX:+WhiteBoxAPI -XX:+PrintCompilation
* compiler.whitebox.ClearMethodStateTest
*/
diff --git a/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java b/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java
index 407aac7868e70..f87292be019c0 100644
--- a/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java
+++ b/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,8 +62,6 @@ public abstract class CompilerWhiteBoxTest {
/** Value of {@code -XX:BackgroundCompilation} */
protected static final boolean BACKGROUND_COMPILATION
= Boolean.valueOf(getVMOption("BackgroundCompilation", "true"));
- protected static final boolean USE_COUNTER_DECAY
- = Boolean.valueOf(getVMOption("UseCounterDecay", "true"));
/** Value of {@code -XX:TieredCompilation} */
protected static final boolean TIERED_COMPILATION
= Boolean.valueOf(getVMOption("TieredCompilation", "false"));
@@ -367,9 +365,6 @@ protected final void printInfo() {
* @see #compile(int)
*/
protected final int compile() throws Exception {
- if (USE_COUNTER_DECAY) {
- throw new Exception("Tests using compile method must turn off counter decay for reliability");
- }
if (testCase.isOsr()) {
return compile(1);
} else {
diff --git a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeAllTest.java b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeAllTest.java
index a110603c0b3d4..33f350b136cc3 100644
--- a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeAllTest.java
+++ b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeAllTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
- * -XX:+WhiteBoxAPI -XX:-UseCounterDecay
+ * -XX:+WhiteBoxAPI
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
* compiler.whitebox.DeoptimizeAllTest
*/
diff --git a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java
index 0a3691eb4dfbc..1d9c8169d0433 100644
--- a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java
+++ b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* 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,12 +34,12 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
- * -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay
+ * -XX:+WhiteBoxAPI -Xmixed
* -XX:CompileCommand=compileonly,compiler.whitebox.DeoptimizeFramesTest$TestCaseImpl::method
* -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot
* compiler.whitebox.DeoptimizeFramesTest true
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
- * -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay
+ * -XX:+WhiteBoxAPI -Xmixed
* -XX:CompileCommand=compileonly,compiler.whitebox.DeoptimizeFramesTest$TestCaseImpl::method
* -XX:CompileCommand=dontinline,java.util.concurrent.Phaser::*
* -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot
diff --git a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeMethodTest.java b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeMethodTest.java
index 87c5d7f2cb055..a684c9f1e291d 100644
--- a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeMethodTest.java
+++ b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeMethodTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
- * -XX:+WhiteBoxAPI -XX:-UseCounterDecay
+ * -XX:+WhiteBoxAPI
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
* compiler.whitebox.DeoptimizeMethodTest
*/
diff --git a/test/hotspot/jtreg/compiler/whitebox/EnqueueMethodForCompilationTest.java b/test/hotspot/jtreg/compiler/whitebox/EnqueueMethodForCompilationTest.java
index 0ad267625086b..fc2c4e4db8162 100644
--- a/test/hotspot/jtreg/compiler/whitebox/EnqueueMethodForCompilationTest.java
+++ b/test/hotspot/jtreg/compiler/whitebox/EnqueueMethodForCompilationTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
- * -XX:+WhiteBoxAPI -XX:+PrintCompilation -XX:-UseCounterDecay
+ * -XX:+WhiteBoxAPI -XX:+PrintCompilation
* compiler.whitebox.EnqueueMethodForCompilationTest
*/
diff --git a/test/hotspot/jtreg/compiler/whitebox/ForceNMethodSweepTest.java b/test/hotspot/jtreg/compiler/whitebox/ForceNMethodSweepTest.java
index 9d6f1a074e714..e55bc33b6ee1f 100644
--- a/test/hotspot/jtreg/compiler/whitebox/ForceNMethodSweepTest.java
+++ b/test/hotspot/jtreg/compiler/whitebox/ForceNMethodSweepTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:-TieredCompilation -XX:+WhiteBoxAPI
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
- * -XX:-BackgroundCompilation -XX:-UseCounterDecay
+ * -XX:-BackgroundCompilation
* -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions -XX:+EagerJVMCI
* compiler.whitebox.ForceNMethodSweepTest
*/
diff --git a/test/hotspot/jtreg/compiler/whitebox/GetNMethodTest.java b/test/hotspot/jtreg/compiler/whitebox/GetNMethodTest.java
index 297b068e166ca..4968a9eb7ee25 100644
--- a/test/hotspot/jtreg/compiler/whitebox/GetNMethodTest.java
+++ b/test/hotspot/jtreg/compiler/whitebox/GetNMethodTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
- * -XX:+WhiteBoxAPI -XX:-UseCounterDecay
+ * -XX:+WhiteBoxAPI
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
* compiler.whitebox.GetNMethodTest
*/
diff --git a/test/hotspot/jtreg/compiler/whitebox/IsMethodCompilableTest.java b/test/hotspot/jtreg/compiler/whitebox/IsMethodCompilableTest.java
index b4e1ccedbcb75..19f577067e7c6 100644
--- a/test/hotspot/jtreg/compiler/whitebox/IsMethodCompilableTest.java
+++ b/test/hotspot/jtreg/compiler/whitebox/IsMethodCompilableTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm/timeout=2400 -XX:-TieredCompilation -Xmixed
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- * -XX:PerMethodRecompilationCutoff=3 -XX:-UseCounterDecay
+ * -XX:PerMethodRecompilationCutoff=3
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
* compiler.whitebox.IsMethodCompilableTest
*/
diff --git a/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java b/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java
index 4a45229c38091..2945f86a2e316 100644
--- a/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java
+++ b/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* 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 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
- * -XX:+WhiteBoxAPI -XX:-UseCounterDecay
+ * -XX:+WhiteBoxAPI
* -XX:CompileCommand=compileonly,*SimpleTestCaseHelper::method
* compiler.whitebox.LockCompilationTest
*/
diff --git a/test/hotspot/jtreg/compiler/whitebox/MakeMethodNotCompilableTest.java b/test/hotspot/jtreg/compiler/whitebox/MakeMethodNotCompilableTest.java
index eba0d342c64cd..2491c504b11c7 100644
--- a/test/hotspot/jtreg/compiler/whitebox/MakeMethodNotCompilableTest.java
+++ b/test/hotspot/jtreg/compiler/whitebox/MakeMethodNotCompilableTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
- * -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay
+ * -XX:+WhiteBoxAPI -Xmixed
* compiler.whitebox.MakeMethodNotCompilableTest
*/
diff --git a/test/hotspot/jtreg/testlibrary/ctw/Makefile b/test/hotspot/jtreg/testlibrary/ctw/Makefile
index 8998765fe2a5c..5ba3bbb659a42 100644
--- a/test/hotspot/jtreg/testlibrary/ctw/Makefile
+++ b/test/hotspot/jtreg/testlibrary/ctw/Makefile
@@ -77,7 +77,7 @@ $(DST_DIR):
@mkdir -p $@
$(DST_DIR)/ctw.sh: $(DST_DIR)
- echo '$${JAVA_HOME}/bin/java $${JAVA_OPTIONS} $(EXPORTS) -XX:-UseCounterDecay -Xbatch "-XX:CompileCommand=exclude,java/lang/invoke/MethodHandle.*" -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar $$@' > $@
+ echo '$${JAVA_HOME}/bin/java $${JAVA_OPTIONS} $(EXPORTS) -Xbatch "-XX:CompileCommand=exclude,java/lang/invoke/MethodHandle.*" -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar $$@' > $@
chmod a+x $@
$(DST_DIR)/ctwrunner.sh: $(DST_DIR)
diff --git a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java
index 478b74c27412c..d9c64b89138cb 100644
--- a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java
+++ b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java
@@ -270,7 +270,6 @@ private String[] cmd(long classStart, long classStop) {
ArrayList Args = new ArrayList(Arrays.asList(
"-Xbatch",
- "-XX:-UseCounterDecay",
"-XX:-ShowMessageBoxOnError",
"-XX:+UnlockDiagnosticVMOptions",
// redirect VM output to cerr so it won't collide w/ ctw output
diff --git a/test/jdk/ProblemList-generational-zgc.txt b/test/jdk/ProblemList-generational-zgc.txt
index 495c9c66f4042..d6a6f63c6a5e8 100644
--- a/test/jdk/ProblemList-generational-zgc.txt
+++ b/test/jdk/ProblemList-generational-zgc.txt
@@ -39,4 +39,3 @@ sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java 8307393 generic-all
com/sun/jdi/ThreadMemoryLeakTest.java 8307402 generic-all
java/util/concurrent/locks/Lock/OOMEInAQS.java 8309218 generic-all
-java/nio/channels/vthread/BlockingChannelOps.java#direct-register 8315544 windows-x64
diff --git a/test/jdk/java/awt/font/GlyphVector/LayoutCompatTest.java b/test/jdk/java/awt/font/GlyphVector/LayoutCompatTest.java
new file mode 100644
index 0000000000000..35aa90374d504
--- /dev/null
+++ b/test/jdk/java/awt/font/GlyphVector/LayoutCompatTest.java
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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
+ @summary verify JNI and FFM harfbuzz OpenType layout implementations are equivalent.
+*/
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.PrintStream;
+import java.util.Arrays;
+import java.util.List;
+import java.awt.Font;
+import java.awt.GraphicsEnvironment;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphVector;
+import java.awt.geom.AffineTransform;
+
+public class LayoutCompatTest {
+
+ static String jni = "jni.txt";
+ static String ffm = "ffm.txt";
+ static final AffineTransform tx = new AffineTransform();
+ static final FontRenderContext frc = new FontRenderContext(tx, false, false);
+
+ static final String englishText =
+ "OpenType font layout is a critical technology for proper rendering of many of the world's natural languages.";
+
+
+ static final String arabicText =
+ // " يعد تخطيط خطوط OpenType تقنية مهمة للعرض الصحيح للعديد من اللغات الطبيعية في العالم.יות";
+ "\u064a\u0639\u062f\u0020\u062a\u062e\u0637\u064a\u0637\u0020\u062e\u0637\u0648\u0637\u0020\u004f\u0070\u0065\u006e\u0054\u0079\u0070\u0065\u0020\u062a\u0642\u0646\u064a\u0629\u0020\u0645\u0647\u0645\u0629\u0020\u0644\u0644\u0639\u0631\u0636\u0020\u0627\u0644\u0635\u062d\u064a\u062d\u0020\u0644\u0644\u0639\u062f\u064a\u062f\u0020\u0645\u0646\u0020\u0627\u0644\u0644\u063a\u0627\u062a\u0020\u0627\u0644\u0637\u0628\u064a\u0639\u064a\u0629\u0020\u0641\u064a\u0020\u0627\u0644\u0639\u0627\u0644\u0645\u002e\u05d9\u05d5\u05ea";
+
+ static final String hebrewText =
+ // פריסת גופן OpenType היא טכנולוגיה קריטית לעיבוד נכון של רבות מהשפות הטבעיות בעולם.
+ "\u05e4\u05e8\u05d9\u05e1\u05ea\u0020\u05d2\u05d5\u05e4\u05df\u0020\u004f\u0070\u0065\u006e\u0054\u0079\u0070\u0065\u0020\u05d4\u05d9\u05d0\u0020\u05d8\u05db\u05e0\u05d5\u05dc\u05d5\u05d2\u05d9\u05d4\u0020\u05e7\u05e8\u05d9\u05d8\u05d9\u05ea\u0020\u05dc\u05e2\u05d9\u05d1\u05d5\u05d3\u0020\u05e0\u05db\u05d5\u05df\u0020\u05e9\u05dc\u0020\u05e8\u05d1\u05d5\u05ea\u0020\u05de\u05d4\u05e9\u05e4\u05d5\u05ea\u0020\u05d4\u05d8\u05d1\u05e2\u05d9\u05d5\u05ea\u0020\u05d1\u05e2\u05d5\u05dc\u05dd\u002e";
+
+ static final String thaiText =
+ // เค้าโครงแบบอักษร OpenType เป็นเทคโนโลยีที่สำคัญสำหรับการแสดงผลภาษาธรรมชาติจำนวนมากของโลกอย่างเหมาะสม
+ "\u0e40\u0e04\u0e49\u0e32\u0e42\u0e04\u0e23\u0e07\u0e41\u0e1a\u0e1a\u0e2d\u0e31\u0e01\u0e29\u0e23\u0020\u004f\u0070\u0065\u006e\u0054\u0079\u0070\u0065\u0020\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e17\u0e04\u0e42\u0e19\u0e42\u0e25\u0e22\u0e35\u0e17\u0e35\u0e48\u0e2a\u0e33\u0e04\u0e31\u0e0d\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25\u0e20\u0e32\u0e29\u0e32\u0e18\u0e23\u0e23\u0e21\u0e0a\u0e32\u0e15\u0e34\u0e08\u0e33\u0e19\u0e27\u0e19\u0e21\u0e32\u0e01\u0e02\u0e2d\u0e07\u0e42\u0e25\u0e01\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e2b\u0e21\u0e32\u0e30\u0e2a\u0e21";
+
+ static final String khmerText =
+ // ប្លង់ពុម្ពអក្សរ OpenType គឺជាបច្ចេកវិជ្ជាសំខាន់មួយសម្រាប់ការបង្ហាញត្រឹមត្រូវនៃភាសាធម្មជាតិជាច្រើនរបស់ពិភពលោក។
+ "\u1794\u17d2\u179b\u1784\u17cb\u1796\u17bb\u1798\u17d2\u1796\u17a2\u1780\u17d2\u179f\u179a\u0020\u004f\u0070\u0065\u006e\u0054\u0079\u0070\u0065\u0020\u1782\u17ba\u1787\u17b6\u1794\u1785\u17d2\u1785\u17c1\u1780\u179c\u17b7\u1787\u17d2\u1787\u17b6\u179f\u17c6\u1781\u17b6\u1793\u17cb\u1798\u17bd\u1799\u179f\u1798\u17d2\u179a\u17b6\u1794\u17cb\u1780\u17b6\u179a\u1794\u1784\u17d2\u17a0\u17b6\u1789\u178f\u17d2\u179a\u17b9\u1798\u178f\u17d2\u179a\u17bc\u179c\u1793\u17c3\u1797\u17b6\u179f\u17b6\u1792\u1798\u17d2\u1798\u1787\u17b6\u178f\u17b7\u1787\u17b6\u1785\u17d2\u179a\u17be\u1793\u179a\u1794\u179f\u17cb\u1796\u17b7\u1797\u1796\u179b\u17c4\u1780\u17d4";
+
+ static final String laoText =
+ // ຮູບແບບຕົວອັກສອນ OpenType ເປັນເທັກໂນໂລຍີສຳຄັນສຳລັບການສະແດງຜົນຂອງພາສາທຳມະຊາດຫຼາຍພາສາຂອງໂລກ.
+ "\u0eae\u0eb9\u0e9a\u0ec1\u0e9a\u0e9a\u0e95\u0ebb\u0ea7\u0ead\u0eb1\u0e81\u0eaa\u0ead\u0e99\u0020\u004f\u0070\u0065\u006e\u0054\u0079\u0070\u0065\u0020\u0ec0\u0e9b\u0eb1\u0e99\u0ec0\u0e97\u0eb1\u0e81\u0ec2\u0e99\u0ec2\u0ea5\u0e8d\u0eb5\u0eaa\u0eb3\u0e84\u0eb1\u0e99\u0eaa\u0eb3\u0ea5\u0eb1\u0e9a\u0e81\u0eb2\u0e99\u0eaa\u0eb0\u0ec1\u0e94\u0e87\u0e9c\u0ebb\u0e99\u0e82\u0ead\u0e87\u0e9e\u0eb2\u0eaa\u0eb2\u0e97\u0eb3\u0ea1\u0eb0\u0e8a\u0eb2\u0e94\u0eab\u0ebc\u0eb2\u0e8d\u0e9e\u0eb2\u0eaa\u0eb2\u0e82\u0ead\u0e87\u0ec2\u0ea5\u0e81\u002e";
+
+ static final String hindiText =
+ // ओपनटाइप फ़ॉन्ट लेआउट दुनिया की कई प्राकृतिक भाषाओं के उचित प्रतिपादन के लिए एक महत्वपूर्ण तकनीक है।
+ "\u0913\u092a\u0928\u091f\u093e\u0907\u092a\u0020\u092b\u093c\u0949\u0928\u094d\u091f\u0020\u0932\u0947\u0906\u0909\u091f\u0020\u0926\u0941\u0928\u093f\u092f\u093e\u0020\u0915\u0940\u0020\u0915\u0908\u0020\u092a\u094d\u0930\u093e\u0915\u0943\u0924\u093f\u0915\u0020\u092d\u093e\u0937\u093e\u0913\u0902\u0020\u0915\u0947\u0020\u0909\u091a\u093f\u0924\u0020\u092a\u094d\u0930\u0924\u093f\u092a\u093e\u0926\u0928\u0020\u0915\u0947\u0020\u0932\u093f\u090f\u0020\u090f\u0915\u0020\u092e\u0939\u0924\u094d\u0935\u092a\u0942\u0930\u094d\u0923\u0020\u0924\u0915\u0928\u0940\u0915\u0020\u0939\u0948\u0964";
+
+ static final String kannadaText =
+ // ಓಪನ್ಟೈಪ್ ಫಾಂಟ್ ವಿನ್ಯಾಸವು ಪ್ರಪಂಚದ ಅನೇಕ ನೈಸರ್ಗಿಕ ಭಾಷೆಗಳ ಸರಿಯಾದ ರೆಂಡರಿಂಗ್ಗೆ ನಿರ್ಣಾಯಕ ತಂತ್ರಜ್ಞಾನವಾಗಿದೆ.
+ "\u0c93\u0caa\u0ca8\u0ccd\u200c\u0c9f\u0cc8\u0caa\u0ccd\u0020\u0cab\u0cbe\u0c82\u0c9f\u0ccd\u0020\u0cb5\u0cbf\u0ca8\u0ccd\u0caf\u0cbe\u0cb8\u0cb5\u0cc1\u0020\u0caa\u0ccd\u0cb0\u0caa\u0c82\u0c9a\u0ca6\u0020\u0c85\u0ca8\u0cc7\u0c95\u0020\u0ca8\u0cc8\u0cb8\u0cb0\u0ccd\u0c97\u0cbf\u0c95\u0020\u0cad\u0cbe\u0cb7\u0cc6\u0c97\u0cb3\u0020\u0cb8\u0cb0\u0cbf\u0caf\u0cbe\u0ca6\u0020\u0cb0\u0cc6\u0c82\u0ca1\u0cb0\u0cbf\u0c82\u0c97\u0ccd\u200c\u0c97\u0cc6\u0020\u0ca8\u0cbf\u0cb0\u0ccd\u0ca3\u0cbe\u0caf\u0c95\u0020\u0ca4\u0c82\u0ca4\u0ccd\u0cb0\u0c9c\u0ccd\u0c9e\u0cbe\u0ca8\u0cb5\u0cbe\u0c97\u0cbf\u0ca6\u0cc6\u002e";
+
+ static final String tamilText =
+ // ஓபன் டைப் எழுத்துரு அமைப்பு என்பது உலகின் பல இயற்கை மொழிகளைச் சரியாக வழங்குவதற்கான ஒரு முக்கியமான தொழில்நுட்பமாகும்.
+ "\u0b93\u0baa\u0ba9\u0bcd\u0020\u0b9f\u0bc8\u0baa\u0bcd\u0020\u0b8e\u0bb4\u0bc1\u0ba4\u0bcd\u0ba4\u0bc1\u0bb0\u0bc1\u0020\u0b85\u0bae\u0bc8\u0baa\u0bcd\u0baa\u0bc1\u0020\u0b8e\u0ba9\u0bcd\u0baa\u0ba4\u0bc1\u0020\u0b89\u0bb2\u0b95\u0bbf\u0ba9\u0bcd\u0020\u0baa\u0bb2\u0020\u0b87\u0baf\u0bb1\u0bcd\u0b95\u0bc8\u0020\u0bae\u0bca\u0bb4\u0bbf\u0b95\u0bb3\u0bc8\u0b9a\u0bcd\u0020\u0b9a\u0bb0\u0bbf\u0baf\u0bbe\u0b95\u0020\u0bb5\u0bb4\u0b99\u0bcd\u0b95\u0bc1\u0bb5\u0ba4\u0bb1\u0bcd\u0b95\u0bbe\u0ba9\u0020\u0b92\u0bb0\u0bc1\u0020\u0bae\u0bc1\u0b95\u0bcd\u0b95\u0bbf\u0baf\u0bae\u0bbe\u0ba9\u0020\u0ba4\u0bca\u0bb4\u0bbf\u0bb2\u0bcd\u0ba8\u0bc1\u0b9f\u0bcd\u0baa\u0bae\u0bbe\u0b95\u0bc1\u0bae\u0bcd\u002e";
+
+ static final String malayalamText =
+ // ഓപ്പൺടൈപ്പ് ഫോണ്ട് ലേഔട്ട് ലോകത്തിലെ പല സ്വാഭാവിക ഭാഷകളുടെയും ശരിയായ റെൻഡറിംഗിനുള്ള ഒരു നിർണായക സാങ്കേതികവിദ്യയാണ്.
+ "\u0d13\u0d2a\u0d4d\u0d2a\u0d7a\u0d1f\u0d48\u0d2a\u0d4d\u0d2a\u0d4d\u0020\u0d2b\u0d4b\u0d23\u0d4d\u0d1f\u0d4d\u0020\u0d32\u0d47\u0d14\u0d1f\u0d4d\u0d1f\u0d4d\u0020\u0d32\u0d4b\u0d15\u0d24\u0d4d\u0d24\u0d3f\u0d32\u0d46\u0020\u0d2a\u0d32\u0020\u0d38\u0d4d\u0d35\u0d3e\u0d2d\u0d3e\u0d35\u0d3f\u0d15\u0020\u0d2d\u0d3e\u0d37\u0d15\u0d33\u0d41\u0d1f\u0d46\u0d2f\u0d41\u0d02\u0020\u0d36\u0d30\u0d3f\u0d2f\u0d3e\u0d2f\u0020\u0d31\u0d46\u0d7b\u0d21\u0d31\u0d3f\u0d02\u0d17\u0d3f\u0d28\u0d41\u0d33\u0d4d\u0d33\u0020\u0d12\u0d30\u0d41\u0020\u0d28\u0d3f\u0d7c\u0d23\u0d3e\u0d2f\u0d15\u0020\u0d38\u0d3e\u0d19\u0d4d\u0d15\u0d47\u0d24\u0d3f\u0d15\u0d35\u0d3f\u0d26\u0d4d\u0d2f\u0d2f\u0d3e\u0d23\u0d4d\u002e";
+
+ static final String gujaratiText =
+ // ຮູບແບບຕົວອັກສອນ OpenType ເປັນເທັກໂນໂລຍີສຳຄັນສຳລັບການສະແດງຜົນຂອງພາສາທຳມະຊາດຫຼາຍພາສາຂອງໂລກ.
+ "\u0eae\u0eb9\u0e9a\u0ec1\u0e9a\u0e9a\u0e95\u0ebb\u0ea7\u0ead\u0eb1\u0e81\u0eaa\u0ead\u0e99\u0020\u004f\u0070\u0065\u006e\u0054\u0079\u0070\u0065\u0020\u0ec0\u0e9b\u0eb1\u0e99\u0ec0\u0e97\u0eb1\u0e81\u0ec2\u0e99\u0ec2\u0ea5\u0e8d\u0eb5\u0eaa\u0eb3\u0e84\u0eb1\u0e99\u0eaa\u0eb3\u0ea5\u0eb1\u0e9a\u0e81\u0eb2\u0e99\u0eaa\u0eb0\u0ec1\u0e94\u0e87\u0e9c\u0ebb\u0e99\u0e82\u0ead\u0e87\u0e9e\u0eb2\u0eaa\u0eb2\u0e97\u0eb3\u0ea1\u0eb0\u0e8a\u0eb2\u0e94\u0eab\u0ebc\u0eb2\u0e8d\u0e9e\u0eb2\u0eaa\u0eb2\u0e82\u0ead\u0e87\u0ec2\u0ea5\u0e81\u002e";
+
+ static final String teluguText =
+ // ఓపెన్టైప్ ఫాంట్ లేఅవుట్ అనేది ప్రపంచంలోని అనేక సహజ భాషలను సరిగ్గా రెండరింగ్ చేయడానికి కీలకమైన సాంకేతికత.
+ "\u0c13\u0c2a\u0c46\u0c28\u0c4d\u200c\u0c1f\u0c48\u0c2a\u0c4d\u0020\u0c2b\u0c3e\u0c02\u0c1f\u0c4d\u0020\u0c32\u0c47\u0c05\u0c35\u0c41\u0c1f\u0c4d\u0020\u0c05\u0c28\u0c47\u0c26\u0c3f\u0020\u0c2a\u0c4d\u0c30\u0c2a\u0c02\u0c1a\u0c02\u0c32\u0c4b\u0c28\u0c3f\u0020\u0c05\u0c28\u0c47\u0c15\u0020\u0c38\u0c39\u0c1c\u0020\u0c2d\u0c3e\u0c37\u0c32\u0c28\u0c41\u0020\u0c38\u0c30\u0c3f\u0c17\u0c4d\u0c17\u0c3e\u0020\u0c30\u0c46\u0c02\u0c21\u0c30\u0c3f\u0c02\u0c17\u0c4d\u0020\u0c1a\u0c47\u0c2f\u0c21\u0c3e\u0c28\u0c3f\u0c15\u0c3f\u0020\u0c15\u0c40\u0c32\u0c15\u0c2e\u0c48\u0c28\u0020\u0c38\u0c3e\u0c02\u0c15\u0c47\u0c24\u0c3f\u0c15\u0c24\u002e";
+
+
+ static Font[] allFonts;
+
+ public static void main(String args[]) throws Exception {
+ if (args.length > 0) {
+ writeLayouts(args[0]);
+ return;
+ }
+ String classesDir = System.getProperty("test.classes");
+ if (classesDir != null) {
+ String sep = System.getProperty("file.separator");
+ String fileDir = classesDir + sep;
+ jni = fileDir + jni;
+ ffm = fileDir + ffm;
+ }
+ forkAndWait(jni, false);
+ forkAndWait(ffm, true);
+ compareLayouts(jni, ffm);
+ }
+
+ static void compareLayouts(String file1, String file2) throws Exception {
+ FileInputStream i1 = new FileInputStream(file1);
+ FileInputStream i2 = new FileInputStream(file2);
+ byte[] ba1 = i1.readAllBytes();
+ byte[] ba2 = i2.readAllBytes();
+ for (int i = 0; i < ba1.length; i++) {
+ if (ba1[i] != ba2[i]) {
+ throw new RuntimeException("files differ byte offset=" + i);
+ }
+ }
+ }
+
+ static boolean isLogicalFont(Font f) {
+ String s = f.getFamily().toLowerCase();
+ if (s.startsWith(".") || // skip Apple System fonts - not supposed to be used
+ s.equals("serif") ||
+ s.equals("sansserif") ||
+ s.equals("dialog") ||
+ s.equals("dialoginput") ||
+ s.equals("monospaced")) {
+ return true;
+ }
+ return false;
+ }
+
+ static Font findFont(char c) {
+ for (Font f : allFonts) {
+ if (isLogicalFont(f)) continue;
+ if (f.canDisplay(c)) { // not for supplementary chars
+ return f.deriveFont(24.0f);
+ }
+ }
+ return new Font(Font.DIALOG, 24, Font.PLAIN);
+ }
+
+ static void writeGV(PrintStream out, String title, String text) {
+ char[] chars = text.toCharArray();
+ Font font = findFont(chars[0]);
+ GlyphVector gv = font.layoutGlyphVector(frc, chars, 0, chars.length, 0);
+ int ng = gv.getNumGlyphs();
+ int[] codes = gv.getGlyphCodes(0, ng, null);
+ float[] positions = gv.getGlyphPositions(0, ng, null);
+ out.println(title);
+ out.println(font);
+ out.println("num glyphs = " + ng);
+ out.print("Codes=");
+ for (int code : codes) out.print(" "+code); out.println();
+ out.print("Positions=");
+ for (float pos : positions) out.print(" "+pos); out.println();
+ out.println();
+ }
+
+ static void writeLayouts(String fileName) throws Exception {
+ allFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
+ PrintStream out = new PrintStream(fileName);
+ out.println("java.home="+javaHome);
+ out.println("javaExe="+javaExe);
+ out.println("classpath="+classpath);
+ writeGV(out,"English:", englishText);
+ writeGV(out,"Arabic:", arabicText);
+ writeGV(out,"Hebrew:", hebrewText);
+ writeGV(out,"Thai:", thaiText);
+ writeGV(out,"Khmer:", khmerText);
+ writeGV(out,"Lao:", laoText);
+ writeGV(out,"Hindi:", hindiText);
+ writeGV(out,"Kannada:", kannadaText);
+ writeGV(out,"Tamil:", tamilText);
+ writeGV(out,"Malayalam:", malayalamText);
+ writeGV(out,"Gujarati:", gujaratiText);
+ writeGV(out,"Telugu:", teluguText);
+ out.close();
+ }
+
+ static final String javaHome = (System.getProperty("test.jdk") != null)
+ ? System.getProperty("test.jdk")
+ : System.getProperty("java.home");
+
+ static final String javaExe =
+ javaHome + File.separator + "bin" + File.separator + "java";
+
+ static final String classpath =
+ System.getProperty("java.class.path");
+
+ static void forkAndWait(String fileName, boolean val) throws Exception {
+ List