diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml index b7018a5fc95d4149e562979756df2497446b04bb..93dd4e4b9f08333a89f8e5a36a63ff4dc1afb9b4 100644 --- a/.github/workflows/submit.yml +++ b/.github/workflows/submit.yml @@ -23,6 +23,7 @@ jobs: outputs: should_run: ${{ steps.check_submit.outputs.should_run }} bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }} + jdk_version: ${{ steps.check_jdk_versions.outputs.jdk_version }} platform_linux_additional: ${{ steps.check_platforms.outputs.platform_linux_additional }} platform_linux_x64: ${{ steps.check_platforms.outputs.platform_linux_x64 }} platform_linux_x86: ${{ steps.check_platforms.outputs.platform_linux_x86 }} @@ -70,6 +71,23 @@ jobs: run: "echo '${{ steps.check_deps.outputs.dependencies }}'" if: steps.check_submit.outputs.should_run != 'false' + - name: Determine full JDK versions + id: check_jdk_versions + shell: bash + run: | + FEATURE=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_FEATURE }} + INTERIM=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_INTERIM }} + UPDATE=${{ fromJson(steps.check_deps.outputs.dependencies).DEFAULT_VERSION_UPDATE }} + if [ "x${UPDATE}" != "x0" ]; then + V=${FEATURE}.${INTERIM}.${UPDATE} + elif [ "x${INTERIM}" != "x0" ]; then + V={FEATURE}.${INTERIM} + else + V=${FEATURE} + fi + echo "::set-output name=jdk_version::${V}" + if: steps.check_submit.outputs.should_run != 'false' + - name: Determine the jtreg ref to checkout run: "echo JTREG_REF=jtreg-${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_VERSION }}+${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_BUILD }} >> $GITHUB_ENV" if: steps.check_submit.outputs.should_run != 'false' @@ -125,7 +143,7 @@ jobs: artifact: -debug env: - JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}" BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}" BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}" @@ -253,7 +271,7 @@ jobs: artifact: -debug env: - JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}" BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}" BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}" @@ -435,7 +453,7 @@ jobs: gnu-arch: powerpc64le env: - JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}" BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}" BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}" @@ -582,7 +600,7 @@ jobs: # Reduced 32-bit build uses the same boot JDK as 64-bit build env: - JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}" BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}" BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}" @@ -718,7 +736,7 @@ jobs: # Reduced 32-bit build uses the same boot JDK as 64-bit build env: - JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}" BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}" BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}" @@ -869,7 +887,7 @@ jobs: artifact: -debug env: - JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}" BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_FILENAME }}" BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_URL }}" @@ -957,7 +975,7 @@ jobs: artifact: -debug env: - JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}" BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_FILENAME }}" BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_URL }}" @@ -1108,7 +1126,7 @@ jobs: artifact: -debug env: - JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}" BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_FILENAME }}" BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_URL }}" @@ -1283,7 +1301,7 @@ jobs: artifact: -debug env: - JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}" BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_FILENAME }}" BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_URL }}" @@ -1384,7 +1402,7 @@ jobs: artifact: -debug env: - JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}" BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_FILENAME }}" BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_URL }}" @@ -1514,7 +1532,7 @@ jobs: artifact: -debug env: - JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + JDK_VERSION: "${{ needs.prerequisites.outputs.jdk_version }}" BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_FILENAME }}" BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_URL }}" diff --git a/doc/building.html b/doc/building.html index 09ea7dc7f725a1cde571bd091dad93063f867426..4745af2a1d748fa6d8fb3f9856f8eab235a72002 100644 --- a/doc/building.html +++ b/doc/building.html @@ -273,7 +273,7 @@ Linux -gcc 10.2.0 +gcc 11.2.0 macOS @@ -281,14 +281,14 @@ Windows -Microsoft Visual Studio 2019 update 16.7.2 +Microsoft Visual Studio 2022 update 17.1.0

All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio doesn't fully support C99 so in practice shared code is limited to using C99 features that it does support.

gcc

The minimum accepted version of gcc is 5.0. Older versions will generate a warning by configure and are unlikely to work.

-

The JDK is currently known to be able to compile with at least version 10.2 of gcc.

+

The JDK is currently known to be able to compile with at least version 11.2 of gcc.

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

clang

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

diff --git a/doc/building.md b/doc/building.md index e83c2bada21233592123f0691f55b83631d7aede..f3b0ee10522ab540287a0bf582cf10edd93015b3 100644 --- a/doc/building.md +++ b/doc/building.md @@ -329,9 +329,9 @@ issues. Operating system Toolchain version ------------------ ------------------------------------------------------- - Linux gcc 10.2.0 + Linux gcc 11.2.0 macOS Apple Xcode 10.1 (using clang 10.0.0) - Windows Microsoft Visual Studio 2019 update 16.7.2 + Windows Microsoft Visual Studio 2022 update 17.1.0 All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio @@ -343,7 +343,7 @@ features that it does support. The minimum accepted version of gcc is 5.0. Older versions will generate a warning by `configure` and are unlikely to work. -The JDK is currently known to be able to compile with at least version 10.2 of +The JDK is currently known to be able to compile with at least version 11.2 of gcc. In general, any version between these two should be usable. diff --git a/doc/hotspot-style.html b/doc/hotspot-style.html index 453b9fbc14bc135c688e692612d510b6dea08390..f0dfad09eb8f76153a30b3926a85b5d8a6cb2f2c 100644 --- a/doc/hotspot-style.html +++ b/doc/hotspot-style.html @@ -51,6 +51,7 @@
  • <atomic>
  • Uniform Initialization
  • Local Function Objects
  • +
  • Inheriting constructors
  • Additional Permitted Features
  • Excluded Features
  • Undecided Features
  • @@ -210,7 +211,7 @@ while ( test_foo(args...) ) { // No, excess spaces around controlRationale: Other than to implement exceptions (which HotSpot doesn't use), most potential uses of RTTI are better done via virtual functions. Some of the remainder can be replaced by bespoke mechanisms. The cost of the additional runtime data structures needed to support RTTI are deemed not worthwhile, given the alternatives.

    Memory Allocation

    Do not use the standard global allocation and deallocation functions (operator new and related functions). Use of these functions by HotSpot code is disabled for some platforms.

    -

    Rationale: HotSpot often uses "resource" or "arena" allocation. Even where heap allocation is used, the standard global functions are avoided in favor of wrappers around malloc and free that support the VM's Native Memory Tracking (NMT) feature.

    +

    Rationale: HotSpot often uses "resource" or "arena" allocation. Even where heap allocation is used, the standard global functions are avoided in favor of wrappers around malloc and free that support the VM's Native Memory Tracking (NMT) feature. Typically, uses of the global operator new are inadvertent and therefore often associated with memory leaks.

    Native memory allocation failures are often treated as non-recoverable. The place where "out of memory" is (first) detected may be an innocent bystander, unrelated to the actual culprit.

    Class Inheritance

    Use public single inheritance.

    @@ -270,8 +271,8 @@ while ( test_foo(args...) ) { // No, excess spaces around controlThe underlying type of a scoped-enum should also be specified explicitly if conversions may be applied to values of that type.

    Due to bugs in certain (very old) compilers, there is widespread use of enums and avoidance of in-class initialization of static integral constant members. Compilers having such bugs are no longer supported. Except where an enum is semantically appropriate, new code should use integral constants.

    thread_local

    -

    Do not use thread_local (n2659); instead, use the HotSpot macro THREAD_LOCAL. The initializer must be a constant expression.

    -

    As was discussed in the review for JDK-8230877, thread_local allows dynamic initialization and destruction semantics. However, that support requires a run-time penalty for references to non-function-local thread_local variables defined in a different translation unit, even if they don't need dynamic initialization. Dynamic initialization and destruction of namespace-scoped thread local variables also has the same ordering problems as for ordinary namespace-scoped variables.

    +

    Avoid use of thread_local (n2659); and instead, use the HotSpot macro THREAD_LOCAL, for which the initializer must be a constant expression. When thread_local must be used, use the Hotspot macro APPROVED_CPP_THREAD_LOCAL to indicate that the use has been given appropriate consideration.

    +

    As was discussed in the review for JDK-8230877, thread_local allows dynamic initialization and destruction semantics. However, that support requires a run-time penalty for references to non-function-local thread_local variables defined in a different translation unit, even if they don't need dynamic initialization. Dynamic initialization and destruction of non-local thread_local variables also has the same ordering problems as for ordinary non-local variables. So we avoid use of thread_local in general, limiting its use to only those cases where dynamic initialization or destruction are essential. See JDK-8282469 for further discussion.

    nullptr

    Prefer nullptr (n2431) to NULL. Don't use (constexpr or literal) 0 for pointers.

    For historical reasons there are widespread uses of both NULL and of integer 0 as a pointer value.

    @@ -405,6 +406,10 @@ while ( test_foo(args...) ) { // No, excess spaces around control
  • Make () more optional for lambdas (p1102r2)
  • +

    Inheriting constructors

    +

    Do not use inheriting constructors (n2540).

    +

    C++11 provides simple syntax allowing a class to inherit the constructors of a base class. Unfortunately there are a number of problems with the original specification, and C++17 contains significant revisions (p0136r1 opens with a list of 8 Core Issues). Since HotSpot doesn't support use of C++17, use of inherited constructors could run into those problems. Such uses might also change behavior in a future HotSpot update to use C++17 or later, potentially in subtle ways that could lead to hard to diagnose problems. Because of this, HotSpot code must not use inherited constructors.

    +

    Note that gcc7 provides the -fnew-inheriting-ctors option to use the p0136r1 semantics. This is enabled by default when using C++17 or later. It is also enabled by default for fabi-version=11 (introduced by gcc7) or higher when using C++11/14, as the change is considered a Defect Report that applies to those versions. Earlier versions of gcc don't have that option, and other supported compilers may not have anything similar.

    Additional Permitted Features

    Excluded Features

    * + * @deprecated Locale constructors have been deprecated. See + * Obtaining a Locale for other options. + * * @param language An ISO 639 alpha-2 or alpha-3 language code, or a language subtag * up to 8 characters in length. See the {@code Locale} class description about * valid language values. @@ -778,6 +769,7 @@ public final class Locale implements Cloneable, Serializable { * See the {@code Locale} class description about valid country values. * @throws NullPointerException thrown if either argument is null. */ + @Deprecated(since="19") public Locale(String language, String country) { this(language, country, ""); } @@ -794,16 +786,96 @@ public final class Locale implements Cloneable, Serializable { * any syntactic checks on the input. * * + * @deprecated Locale constructors have been deprecated. See + * Obtaining a Locale for other options. + * * @param language An ISO 639 alpha-2 or alpha-3 language code, or a language subtag * up to 8 characters in length. See the {@code Locale} class description about * valid language values. * @throws NullPointerException thrown if argument is null. * @since 1.4 */ + @Deprecated(since="19") public Locale(String language) { this(language, "", ""); } + /** + * Obtains a locale from language, country and variant. + * This method normalizes the language value to lowercase and + * the country value to uppercase. + * @implNote + * + * + * @param language A language code. See the {@code Locale} class description of + * language values. + * @param country A country code. See the {@code Locale} class description of + * country values. + * @param variant Any arbitrary value used to indicate a variation of a {@code Locale}. + * See the {@code Locale} class description of variant values. + * @throws NullPointerException thrown if any argument is null. + * @return A {@code Locale} object + * @since 19 + */ + public static Locale of(String language, String country, String variant) { + return getInstance(language, "", country, variant, null); + } + + /** + * Obtains a locale from language and country. + * This method normalizes the language value to lowercase and + * the country value to uppercase. + * @implNote + * + * + * @param language A language code. See the {@code Locale} class description of + * language values. + * @param country A country code. See the {@code Locale} class description of + * country values. + * @throws NullPointerException thrown if either argument is null. + * @return A {@code Locale} object + * @since 19 + */ + public static Locale of(String language, String country) { + return getInstance(language, "", country, "", null); + } + + /** + * Obtains a locale from a language code. + * This method normalizes the language value to lowercase. + * @implNote + * + * + * @param language A language code. See the {@code Locale} class description of + * language values. + * @throws NullPointerException thrown if argument is null. + * @return A {@code Locale} object + * @since 19 + */ + public static Locale of(String language) { + return getInstance(language, "", "", "", null); + } + /** * Returns a {@code Locale} constructed from the given * {@code language}, {@code country} and @@ -1138,14 +1210,14 @@ public final class Locale implements Cloneable, Serializable { /** * Returns a list of all 2-letter country codes defined in ISO 3166. - * Can be used to create Locales. + * Can be used to obtain Locales. * This method is equivalent to {@link #getISOCountries(Locale.IsoCountryCode type)} * with {@code type} {@link IsoCountryCode#PART1_ALPHA2}. *

    * Note: The {@code Locale} class also supports other codes for * country (region), such as 3-letter numeric UN M.49 area codes. * Therefore, the list returned by this method does not contain ALL valid - * codes that can be used to create Locales. + * codes that can be used to obtain Locales. *

    * Note that this method does not return obsolete 2-letter country codes. * ISO3166-3 codes which designate country codes for those obsolete codes, @@ -1178,7 +1250,7 @@ public final class Locale implements Cloneable, Serializable { /** * Returns a list of all 2-letter language codes defined in ISO 639. - * Can be used to create Locales. + * Can be used to obtain Locales. *

    * Note: *

    * * @return An array of ISO 639 two-letter language codes. @@ -1520,12 +1592,12 @@ public final class Locale implements Cloneable, Serializable { * "NY", representing Norwegian Nynorsk (Norway), is converted * to a language tag "nn-NO". * - *

    Note: Although the language tag created by this + *

    Note: Although the language tag obtained by this * method is well-formed (satisfies the syntax requirements * defined by the IETF BCP 47 specification), it is not * necessarily a valid BCP 47 language tag. For example, *

    -     *   new Locale("xx", "YY").toLanguageTag();
    + * Locale.forLanguageTag("xx-YY").toLanguageTag(); * * will return "xx-YY", but the language subtag "xx" and the * region subtag "YY" are invalid because they are not registered @@ -2510,7 +2582,7 @@ public final class Locale implements Cloneable, Serializable { * from values configured by the setters. Unlike the {@code Locale} * constructors, the {@code Builder} checks if a value configured by a * setter satisfies the syntax requirements defined by the {@code Locale} - * class. A {@code Locale} object created by a {@code Builder} is + * class. A {@code Locale} object obtained from a {@code Builder} is * well-formed and can be transformed to a well-formed IETF BCP 47 language tag * without losing information. * @@ -2521,11 +2593,11 @@ public final class Locale implements Cloneable, Serializable { * {@code IllformedLocaleException} for a variant that does not satisfy * this restriction. If it is necessary to support such a variant, use a * Locale constructor. However, keep in mind that a {@code Locale} - * object created this way might lose the variant information when + * object obtained this way might lose the variant information when * transformed to a BCP 47 language tag. * - *

    The following example shows how to create a {@code Locale} object - * with the {@code Builder}. + *

    The following example shows how to obtain a {@code Locale} object + * using a {@code Builder}. *

    *
          *     Locale aLocale = new Builder().setLanguage("sr").setScript("Latn").setRegion("RS").build();
    @@ -2658,7 +2730,7 @@ public final class Locale implements Cloneable, Serializable {
              * 

    The typical region value is a two-letter ISO 3166 code or a * three-digit UN M.49 area code. * - *

    The country value in the {@code Locale} created by the + *

    The country value in the {@code Locale} obtained from a * {@code Builder} is always normalized to upper case. * * @param region the region @@ -2831,7 +2903,7 @@ public final class Locale implements Cloneable, Serializable { } /** - * Returns an instance of {@code Locale} created from the fields set + * Returns an instance of {@code Locale} obtained from the fields set * on this builder. * *

    This applies the conversions listed in {@link Locale#forLanguageTag} @@ -2853,7 +2925,7 @@ public final class Locale implements Cloneable, Serializable { /** * This enum provides constants to select a filtering mode for locale - * matching. Refer to RFC 4647 + * matching. Refer to RFC 4647 * Matching of Language Tags for details. * *

    As an example, think of two Language Priority Lists each of which @@ -2989,7 +3061,7 @@ public final class Locale implements Cloneable, Serializable { /** * This class expresses a Language Range defined in - * RFC 4647 Matching of + * RFC 4647 Matching of * Language Tags. A language range is an identifier which is used to * select language tag(s) meeting specific requirements by using the * mechanisms described in Locale @@ -2998,7 +3070,7 @@ public final class Locale implements Cloneable, Serializable { * *

    There are two types of language ranges: basic and extended. In RFC * 4647, the syntax of language ranges is expressed in - * ABNF as follows: + * ABNF as follows: *

    *
          *     basic-language-range    = (1*8ALPHA *("-" 1*8alphanum)) / "*"
    @@ -3164,7 +3236,7 @@ public final class Locale implements Cloneable, Serializable {
              *
              * In a weighted list, each language range is given a weight value.
              * The weight value is identical to the "quality value" in
    -         * RFC 2616, and it
    +         * RFC 2616, and it
              * expresses how much the user prefers  the language. A weight value is
              * specified after a corresponding language range followed by
              * {@code ";q="}, and the default weight value is {@code MAX_WEIGHT}
    @@ -3202,7 +3274,7 @@ public final class Locale implements Cloneable, Serializable {
              *
              * @param ranges a list of comma-separated language ranges or a list of
              *     language ranges in the form of the "Accept-Language" header
    -         *     defined in RFC
    +         *     defined in RFC
              *     2616
              * @return a Language Priority List consisting of language ranges
              *     included in the given {@code ranges} and their equivalent
    @@ -3223,7 +3295,7 @@ public final class Locale implements Cloneable, Serializable {
              *
              * @param ranges a list of comma-separated language ranges or a list
              *     of language ranges in the form of the "Accept-Language" header
    -         *     defined in RFC
    +         *     defined in RFC
              *     2616
              * @param map a map containing information to customize language ranges
              * @return a Language Priority List with customization. The list is
    diff --git a/src/java.base/share/classes/java/util/MissingFormatArgumentException.java b/src/java.base/share/classes/java/util/MissingFormatArgumentException.java
    index dcb0847833b25e11173cd16823053b4a4ce13119..6363566216bdb2414d827c0ced76ee79eea33a65 100644
    --- a/src/java.base/share/classes/java/util/MissingFormatArgumentException.java
    +++ b/src/java.base/share/classes/java/util/MissingFormatArgumentException.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
      * 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 @@ package java.util;
      *
      * @since 1.5
      */
    -public class MissingFormatArgumentException extends IllegalFormatException {
    +public non-sealed class MissingFormatArgumentException extends IllegalFormatException {
     
         @java.io.Serial
         private static final long serialVersionUID = 19190115L;
    diff --git a/src/java.base/share/classes/java/util/MissingFormatWidthException.java b/src/java.base/share/classes/java/util/MissingFormatWidthException.java
    index 0ce9c3af83ce6789159a4be3d068b2680bf3e3b7..b553a3876ac13a831704e0a4ec3e2c34192bba28 100644
    --- a/src/java.base/share/classes/java/util/MissingFormatWidthException.java
    +++ b/src/java.base/share/classes/java/util/MissingFormatWidthException.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
      * 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 @@ package java.util;
      *
      * @since 1.5
      */
    -public class MissingFormatWidthException extends IllegalFormatException {
    +public non-sealed class MissingFormatWidthException extends IllegalFormatException {
     
         @java.io.Serial
         private static final long serialVersionUID = 15560123L;
    diff --git a/src/java.base/share/classes/java/util/RegularEnumSet.java b/src/java.base/share/classes/java/util/RegularEnumSet.java
    index 1deda8a293529c065e08156a1e2542cadc84de50..f06adcbf692c1b4980c255daca7301f3af746f0c 100644
    --- a/src/java.base/share/classes/java/util/RegularEnumSet.java
    +++ b/src/java.base/share/classes/java/util/RegularEnumSet.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
      * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      *
      * This code is free software; you can redistribute it and/or modify it
    @@ -33,7 +33,7 @@ package java.util;
      * @since 1.5
      * @serial exclude
      */
    -class RegularEnumSet> extends EnumSet {
    +final class RegularEnumSet> extends EnumSet {
         @java.io.Serial
         private static final long serialVersionUID = 3411599620347842686L;
         /**
    diff --git a/src/java.base/share/classes/java/util/UUID.java b/src/java.base/share/classes/java/util/UUID.java
    index 0378df95a79863f16eaf068a6854cec2cde55a6d..e88d77ae63e7c3b311204cab0cfd2bcb38ab0140 100644
    --- a/src/java.base/share/classes/java/util/UUID.java
    +++ b/src/java.base/share/classes/java/util/UUID.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
      * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      *
      * This code is free software; you can redistribute it and/or modify it
    @@ -264,7 +264,7 @@ public final class UUID implements java.io.Serializable, Comparable {
                 throw new IllegalArgumentException("UUID string too large");
             }
     
    -        int dash1 = name.indexOf('-', 0);
    +        int dash1 = name.indexOf('-');
             int dash2 = name.indexOf('-', dash1 + 1);
             int dash3 = name.indexOf('-', dash2 + 1);
             int dash4 = name.indexOf('-', dash3 + 1);
    diff --git a/src/java.base/share/classes/java/util/UnknownFormatConversionException.java b/src/java.base/share/classes/java/util/UnknownFormatConversionException.java
    index 07519ade1701b5c5a134f51342c937a34e5c913d..13d428e0b60f3337b9e055ec5adbe0e8a87846f7 100644
    --- a/src/java.base/share/classes/java/util/UnknownFormatConversionException.java
    +++ b/src/java.base/share/classes/java/util/UnknownFormatConversionException.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
      * 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 @@ package java.util;
      *
      * @since 1.5
      */
    -public class UnknownFormatConversionException extends IllegalFormatException {
    +public non-sealed class UnknownFormatConversionException extends IllegalFormatException {
     
         @java.io.Serial
         private static final long serialVersionUID = 19060418L;
    diff --git a/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java b/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java
    index c498711fa216285aef82feffe94d986748743142..93eaf85b389e2f17cf06358b8dd1fefd851af0a4 100644
    --- a/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java
    +++ b/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
      * 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 @@ package java.util;
      *
      * @since 1.5
      */
    -public class UnknownFormatFlagsException extends IllegalFormatException {
    +public non-sealed class UnknownFormatFlagsException extends IllegalFormatException {
     
         @java.io.Serial
         private static final long serialVersionUID = 19370506L;
    diff --git a/src/java.base/share/classes/java/util/WeakHashMap.java b/src/java.base/share/classes/java/util/WeakHashMap.java
    index d74c7d6572846ffcc2304d1f406e0cf12de4eb8f..bc31985b66ee2f68928600d32bb2f89acad0cb2e 100644
    --- a/src/java.base/share/classes/java/util/WeakHashMap.java
    +++ b/src/java.base/share/classes/java/util/WeakHashMap.java
    @@ -213,9 +213,7 @@ public class WeakHashMap
             if (loadFactor <= 0 || Float.isNaN(loadFactor))
                 throw new IllegalArgumentException("Illegal Load factor: "+
                                                    loadFactor);
    -        int capacity = 1;
    -        while (capacity < initialCapacity)
    -            capacity <<= 1;
    +        int capacity = HashMap.tableSizeFor(initialCapacity);
             table = newTable(capacity);
             this.loadFactor = loadFactor;
             threshold = (int)(capacity * loadFactor);
    @@ -251,7 +249,7 @@ public class WeakHashMap
          * @since   1.3
          */
         public WeakHashMap(Map m) {
    -        this(Math.max((int) ((float)m.size() / DEFAULT_LOAD_FACTOR + 1.0F),
    +        this(Math.max((int) Math.ceil(m.size() / (double)DEFAULT_LOAD_FACTOR),
                     DEFAULT_INITIAL_CAPACITY),
                  DEFAULT_LOAD_FACTOR);
             putAll(m);
    @@ -468,7 +466,7 @@ public class WeakHashMap
             modCount++;
             Entry e = tab[i];
             tab[i] = new Entry<>(k, value, queue, h, e);
    -        if (++size >= threshold)
    +        if (++size > threshold)
                 resize(tab.length * 2);
             return null;
         }
    @@ -557,7 +555,7 @@ public class WeakHashMap
              * to at most one extra resize.
              */
             if (numKeysToBeAdded > threshold) {
    -            int targetCapacity = (int)(numKeysToBeAdded / loadFactor + 1);
    +            int targetCapacity = (int)Math.ceil(numKeysToBeAdded / (double)loadFactor);
                 if (targetCapacity > MAXIMUM_CAPACITY)
                     targetCapacity = MAXIMUM_CAPACITY;
                 int newCapacity = table.length;
    diff --git a/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java b/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java
    index de8dd5f85809e04b57d4927bb17cb75cc35a5fd6..890d8a0824c9eaa1c8009de5ffac9e43de2a4a5a 100644
    --- a/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java
    +++ b/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java
    @@ -93,7 +93,7 @@ import jdk.internal.misc.VM;
             i = 64, j = 0, k = 0,
             equidistribution = 1
     )
    -public class ThreadLocalRandom extends Random {
    +public final class ThreadLocalRandom extends Random {
         /*
          * This class implements the java.util.Random API (and subclasses
          * Random) using a single static instance that accesses 64 bits of
    diff --git a/src/java.base/share/classes/java/util/regex/Pattern.java b/src/java.base/share/classes/java/util/regex/Pattern.java
    index 5bb6ec76a7c6f5e2e6f386e96a3f24ee0036a728..a06afacc6d2b24bcf023f9c0e7694e8241e82ff6 100644
    --- a/src/java.base/share/classes/java/util/regex/Pattern.java
    +++ b/src/java.base/share/classes/java/util/regex/Pattern.java
    @@ -158,7 +158,8 @@ import jdk.internal.util.ArraysSupport;
      * {@code .}
      *     Any character (may or may not match line terminators)
      * {@code \d}
    - *     A digit: {@code [0-9]}
    + *     A digit: {@code [0-9]} if 
    + *  *         UNICODE_CHARACTER_CLASS is not set. See Unicode Support.
      * {@code \D}
      *     A non-digit: {@code [^0-9]}
      * {@code \h}
    @@ -167,7 +168,9 @@ import jdk.internal.util.ArraysSupport;
      * {@code \H}
      *     A non-horizontal whitespace character: {@code [^\h]}
      * {@code \s}
    - *     A whitespace character: {@code [ \t\n\x0B\f\r]}
    + *     A whitespace character: {@code [ \t\n\x0B\f\r]} if
    + *      UNICODE_CHARACTER_CLASS is not set. See
    + *     Unicode Support.
      * {@code \S}
      *     A non-whitespace character: {@code [^\s]}
      * {@code \v}
    @@ -176,7 +179,8 @@ import jdk.internal.util.ArraysSupport;
      * {@code \V}
      *     A non-vertical whitespace character: {@code [^\v]}
      * {@code \w}
    - *     A word character: {@code [a-zA-Z_0-9]}
    + *     A word character: {@code [a-zA-Z_0-9]} if 
    + *         UNICODE_CHARACTER_CLASS is not set. See Unicode Support. 
      * {@code \W}
      *     A non-word character: {@code [^\w]}
      *
    @@ -246,11 +250,12 @@ import jdk.internal.util.ArraysSupport;
      * {@code $}
      *     The end of a line
      * {@code \b}
    - *     A word boundary
    + *     A word boundary: {@code (?:(?<=\w)(?=\W)|(?<=\W)(?=\w))} (the location
    + *     where a non-word character abuts a word character)
      * {@code \b{g}}
      *     A Unicode extended grapheme cluster boundary
      * {@code \B}
    - *     A non-word boundary
    + *     A non-word boundary: {@code [^\b]}
      * {@code \A}
      *     The beginning of the input
      * {@code \G}
    @@ -535,7 +540,7 @@ import jdk.internal.util.ArraysSupport;
      * that do not capture text and do not count towards the group total, or
      * named-capturing group.
      *
    - * 

    Unicode support

    + *

    Unicode support

    * *

    This class is in conformance with Level 1 of Unicode Technical @@ -5377,7 +5382,7 @@ loop: for(int x=0, offset=0; x b.length) { diff --git a/src/java.base/share/classes/java/util/zip/ZipOutputStream.java b/src/java.base/share/classes/java/util/zip/ZipOutputStream.java index 1b8ed562d9f7d0a5bd1f3f85a2acd37ab26695c1..d11eb4d4aae51032855b67994c7bb27389d6f757 100644 --- a/src/java.base/share/classes/java/util/zip/ZipOutputStream.java +++ b/src/java.base/share/classes/java/util/zip/ZipOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -314,7 +314,7 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant crc.reset(); current = null; } catch (IOException e) { - if (usesDefaultDeflater && !(e instanceof ZipException)) + if (def.shouldFinish() && usesDefaultDeflater && !(e instanceof ZipException)) def.end(); throw e; } diff --git a/src/java.base/share/classes/javax/crypto/Cipher.java b/src/java.base/share/classes/javax/crypto/Cipher.java index a6751e886bdbcf26d538534b35ae036b12e662db..e1cb75d54936120c37c827268e7e12f9191b4166 100644 --- a/src/java.base/share/classes/javax/crypto/Cipher.java +++ b/src/java.base/share/classes/javax/crypto/Cipher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1174,7 +1174,7 @@ public class Cipher { } // check if opmode is one of the defined constants - // throw InvalidParameterExeption if not + // throw InvalidParameterException if not private static void checkOpmode(int opmode) { if ((opmode < ENCRYPT_MODE) || (opmode > UNWRAP_MODE)) { throw new InvalidParameterException("Invalid operation mode"); diff --git a/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java b/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java index ced87331bce6a6cee895307694e1acef19e4d481..0a86e17cd02a86053298429d00abc0431ae2b8ac 100644 --- a/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java +++ b/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java @@ -29,7 +29,7 @@ import java.security.spec.AlgorithmParameterSpec; /** * This class specifies the parameters used with the - * RC5 + * RC5 * algorithm. * *

    The parameters consist of a version number, a rounds count, a word diff --git a/src/java.base/share/classes/javax/net/ssl/SSLException.java b/src/java.base/share/classes/javax/net/ssl/SSLException.java index c77992db3014ff4793ffb32c56fd280bb0f38b1b..b2e96afa7d62860da2b36187250c2a4751f6d4dd 100644 --- a/src/java.base/share/classes/javax/net/ssl/SSLException.java +++ b/src/java.base/share/classes/javax/net/ssl/SSLException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ import java.io.IOException; * @since 1.4 * @author David Brownell */ -public -class SSLException extends IOException -{ +public class SSLException extends IOException { @java.io.Serial private static final long serialVersionUID = 4511006460650708967L; @@ -48,8 +46,7 @@ class SSLException extends IOException * * @param reason describes the problem. */ - public SSLException(String reason) - { + public SSLException(String reason) { super(reason); } @@ -66,8 +63,7 @@ class SSLException extends IOException * @since 1.5 */ public SSLException(String message, Throwable cause) { - super(message); - initCause(cause); + super(message, cause); } /** @@ -83,7 +79,6 @@ class SSLException extends IOException * @since 1.5 */ public SSLException(Throwable cause) { - super(cause == null ? null : cause.toString()); - initCause(cause); + super(cause); } } diff --git a/src/java.base/share/classes/javax/net/ssl/SSLHandshakeException.java b/src/java.base/share/classes/javax/net/ssl/SSLHandshakeException.java index 5f342b074db855edfd00852777696abc5162810a..e6fa239bdcbbd0eae201a6a4f02580d55632dccc 100644 --- a/src/java.base/share/classes/javax/net/ssl/SSLHandshakeException.java +++ b/src/java.base/share/classes/javax/net/ssl/SSLHandshakeException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,8 @@ * questions. */ - package javax.net.ssl; - /** * Indicates that the client and server could not negotiate the * desired level of security. The connection is no longer usable. @@ -34,9 +32,7 @@ package javax.net.ssl; * @since 1.4 * @author David Brownell */ -public -class SSLHandshakeException extends SSLException -{ +public class SSLHandshakeException extends SSLException { @java.io.Serial private static final long serialVersionUID = -5045881315018326890L; @@ -46,8 +42,23 @@ class SSLHandshakeException extends SSLException * * @param reason describes the problem. */ - public SSLHandshakeException(String reason) - { + public SSLHandshakeException(String reason) { super(reason); } + + /** + * Creates a {@code SSLHandshakeException} with the specified detail + * message and cause. + * + * @param message the detail message (which is saved for later retrieval + * by the {@link #getMessage()} method). + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A {@code null} value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + * @since 19 + */ + public SSLHandshakeException(String message, Throwable cause) { + super(message, cause); + } } diff --git a/src/java.base/share/classes/javax/net/ssl/SSLKeyException.java b/src/java.base/share/classes/javax/net/ssl/SSLKeyException.java index 49fe57c369dbec171d40c38861a02bfa614bbf23..f27c9ee554c6f3156e446482eee9ab080222d42e 100644 --- a/src/java.base/share/classes/javax/net/ssl/SSLKeyException.java +++ b/src/java.base/share/classes/javax/net/ssl/SSLKeyException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * 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,9 +33,7 @@ package javax.net.ssl; * @since 1.4 * @author David Brownell */ -public -class SSLKeyException extends SSLException -{ +public class SSLKeyException extends SSLException { @java.io.Serial private static final long serialVersionUID = -8071664081941937874L; @@ -45,8 +43,23 @@ class SSLKeyException extends SSLException * * @param reason describes the problem. */ - public SSLKeyException(String reason) - { + public SSLKeyException(String reason) { super(reason); } + + /** + * Creates a {@code SSLKeyException} with the specified detail + * message and cause. + * + * @param message the detail message (which is saved for later retrieval + * by the {@link #getMessage()} method). + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A {@code null} value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + * @since 19 + */ + public SSLKeyException(String message, Throwable cause) { + super(message, cause); + } } diff --git a/src/java.base/share/classes/javax/net/ssl/SSLPeerUnverifiedException.java b/src/java.base/share/classes/javax/net/ssl/SSLPeerUnverifiedException.java index e98e2b4b7f46b6cef6dcddd4f42ea9473bf20d90..3fbec6c04345a24a8167cc4ebf928abc674437ae 100644 --- a/src/java.base/share/classes/javax/net/ssl/SSLPeerUnverifiedException.java +++ b/src/java.base/share/classes/javax/net/ssl/SSLPeerUnverifiedException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,9 +39,7 @@ package javax.net.ssl; * @since 1.4 * @author David Brownell */ -public -class SSLPeerUnverifiedException extends SSLException -{ +public class SSLPeerUnverifiedException extends SSLException { @java.io.Serial private static final long serialVersionUID = -8919512675000600547L; @@ -51,8 +49,23 @@ class SSLPeerUnverifiedException extends SSLException * * @param reason describes the problem. */ - public SSLPeerUnverifiedException(String reason) - { + public SSLPeerUnverifiedException(String reason) { super(reason); } + + /** + * Creates a {@code SSLPeerUnverifiedException} with the specified detail + * message and cause. + * + * @param message the detail message (which is saved for later retrieval + * by the {@link #getMessage()} method). + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A {@code null} value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + * @since 19 + */ + public SSLPeerUnverifiedException(String message, Throwable cause) { + super(message, cause); + } } diff --git a/src/java.base/share/classes/javax/net/ssl/SSLProtocolException.java b/src/java.base/share/classes/javax/net/ssl/SSLProtocolException.java index a39b2048924977dfcf382462d59dccb457895c82..bf590430b3fffc8378149048b364871fe29e81d5 100644 --- a/src/java.base/share/classes/javax/net/ssl/SSLProtocolException.java +++ b/src/java.base/share/classes/javax/net/ssl/SSLProtocolException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * 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,9 +33,7 @@ package javax.net.ssl; * @since 1.4 * @author David Brownell */ -public -class SSLProtocolException extends SSLException -{ +public class SSLProtocolException extends SSLException { @java.io.Serial private static final long serialVersionUID = 5445067063799134928L; @@ -45,8 +43,23 @@ class SSLProtocolException extends SSLException * * @param reason describes the problem. */ - public SSLProtocolException(String reason) - { + public SSLProtocolException(String reason) { super(reason); } + + /** + * Creates a {@code SSLProtocolException} with the specified detail + * message and cause. + * + * @param message the detail message (which is saved for later retrieval + * by the {@link #getMessage()} method). + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A {@code null} value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + * @since 19 + */ + public SSLProtocolException(String message, Throwable cause) { + super(message, cause); + } } diff --git a/src/java.base/share/classes/javax/net/ssl/SSLSocket.java b/src/java.base/share/classes/javax/net/ssl/SSLSocket.java index b2c912c3b65bdf2bff1c074ef51d1fdbeaefc969..e5cdd3741b944ab2eebff261240458dd376e7736 100644 --- a/src/java.base/share/classes/javax/net/ssl/SSLSocket.java +++ b/src/java.base/share/classes/javax/net/ssl/SSLSocket.java @@ -174,17 +174,19 @@ import java.util.function.BiFunction; * @apiNote * When the connection is no longer needed, the client and server * applications should each close both sides of their respective connection. - * For {@code SSLSocket} objects, for example, an application can call - * {@link Socket#shutdownOutput()} or {@link java.io.OutputStream#close()} - * for output stream close and call {@link Socket#shutdownInput()} or - * {@link java.io.InputStream#close()} for input stream close. Note that - * in some cases, closing the input stream may depend on the peer's output - * stream being closed first. If the connection is not closed in an orderly - * manner (for example {@link Socket#shutdownInput()} is called before the - * peer's write closure notification has been received), exceptions may - * be raised to indicate that an error has occurred. Once an - * {@code SSLSocket} is closed, it is not reusable: a new {@code SSLSocket} - * must be created. + * This can be done either in one shot by calling {@link Socket#close()}, + * or by closing each side individually using + * {@link Socket#shutdownOutput()} / {@link Socket#shutdownInput()} which is + * useful for protocol versions that can support half-closed connections. + * + *

    Note that in some cases, closing the input stream may depend on the + * peer's output stream being closed first. If the connection is not closed + * in an orderly manner (for example {@link Socket#shutdownInput()} is called + * before the peer's write closure notification has been received), exceptions + * may be raised to indicate that an error has occurred. + * + *

    Once an {@code SSLSocket} is closed, it is not reusable: a new + * {@code SSLSocket} must be created. * * @see java.net.Socket * @see SSLServerSocket diff --git a/src/java.base/share/classes/javax/security/auth/x500/X500Principal.java b/src/java.base/share/classes/javax/security/auth/x500/X500Principal.java index f0bf5e0ae2e1028b2ea07b88bb5c3da511412b06..578249ef48daef7e5108a713b748463c305bad74 100644 --- a/src/java.base/share/classes/javax/security/auth/x500/X500Principal.java +++ b/src/java.base/share/classes/javax/security/auth/x500/X500Principal.java @@ -41,13 +41,13 @@ import sun.security.util.*; * of the distinguished name, or by using the ASN.1 DER encoded byte * representation of the distinguished name. The current specification * for the string representation of a distinguished name is defined in - * RFC 2253: Lightweight + * RFC 2253: Lightweight * Directory Access Protocol (v3): UTF-8 String Representation of * Distinguished Names. This class, however, accepts string formats from - * both RFC 2253 and RFC 1779: + * both RFC 2253 and RFC 1779: * A String Representation of Distinguished Names, and also recognizes * attribute type keywords whose OIDs (Object Identifiers) are defined in - * RFC 5280: Internet X.509 + * RFC 5280: Internet X.509 * Public Key Infrastructure Certificate and CRL Profile. * *

    The string representation for this {@code X500Principal} diff --git a/src/java.base/share/classes/javax/security/auth/x500/package-info.java b/src/java.base/share/classes/javax/security/auth/x500/package-info.java index 38c6439092e4e6e71c5ad7009ed315dcf4b8d545..45859a79bedf03bf81a8ba718c203d28c9e896e4 100644 --- a/src/java.base/share/classes/javax/security/auth/x500/package-info.java +++ b/src/java.base/share/classes/javax/security/auth/x500/package-info.java @@ -31,15 +31,15 @@ *

    Package Specification

    * * diff --git a/src/java.base/share/classes/jdk/internal/loader/RawNativeLibraries.java b/src/java.base/share/classes/jdk/internal/loader/RawNativeLibraries.java index 972e34e1fd20b94a33ded6d6839f5c727154ba62..35ed4701c9902dbef4ca2fd4f4aa533f7fe28537 100644 --- a/src/java.base/share/classes/jdk/internal/loader/RawNativeLibraries.java +++ b/src/java.base/share/classes/jdk/internal/loader/RawNativeLibraries.java @@ -31,8 +31,8 @@ import java.lang.invoke.MethodHandles; import java.nio.file.Path; import java.security.AccessController; import java.security.PrivilegedAction; -import java.util.Map; import java.util.Objects; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; /** @@ -45,7 +45,7 @@ import java.util.concurrent.ConcurrentHashMap; * 3. No relationship with class loaders. */ public final class RawNativeLibraries { - final Map libraries = new ConcurrentHashMap<>(); + final Set libraries = ConcurrentHashMap.newKeySet(); final Class caller; private RawNativeLibraries(MethodHandles.Lookup trustedCaller) { @@ -70,6 +70,12 @@ public final class RawNativeLibraries { * Load a native library from the given path. Returns null if the given * library is determined to be non-loadable, which is system-dependent. * + * The library is opened with the platform-specific library loading + * mechanism. If this method is called with the same path multiple times, + * the library is opened the same number of times. To close the library + * of the given path, {@code #unload} must be called on all the + * {@code NativeLibrary} instances that load it. + * * @param path the path of the native library */ @SuppressWarnings("removal") @@ -106,28 +112,39 @@ public final class RawNativeLibraries { * NativeLibrary lib = libs.load(System.mapLibraryName("blas")); * } * + * The library is opened with the platform-specific library loading + * mechanism. If this method is called with the same pathname multiple times, + * the library is opened the same number of times. To close the library + * of the given path, {@code #unload} must be called on all the + * {@code NativeLibrary} instances that load it. + * * @param pathname the pathname of the native library * @see System#mapLibraryName(String) */ public NativeLibrary load(String pathname) { - return libraries.computeIfAbsent(pathname, this::get); - } - - private RawNativeLibraryImpl get(String pathname) { - RawNativeLibraryImpl lib = new RawNativeLibraryImpl(caller, pathname); + RawNativeLibraryImpl lib = new RawNativeLibraryImpl(pathname); if (!lib.open()) { return null; } + libraries.add(lib); return lib; } /* - * Unloads the given native library. + * Unloads the given native library. Each {@code NativeLibrary} + * instance can be unloaded only once. + * + * The native library may remain opened after this method is called. + * Refer to the platform-specific library loading mechanism, for example, + * dlopen/dlclose on Unix or LoadLibrary/FreeLibrary on Windows. + * + * @throws IllegalArgumentException if the given library is not + * loaded by this RawNativeLibraries or has already been unloaded */ public void unload(NativeLibrary lib) { Objects.requireNonNull(lib); - if (!libraries.remove(lib.name(), lib)) { - throw new IllegalArgumentException(lib.name() + " not loaded by this RawNativeLibraries instance"); + if (!libraries.remove(lib)) { + throw new IllegalArgumentException("can't unload " + lib.name() + " loaded from " + lib); } RawNativeLibraryImpl nl = (RawNativeLibraryImpl)lib; nl.close(); @@ -139,7 +156,7 @@ public final class RawNativeLibraries { // opaque handle to raw native library, used in native code. long handle; - RawNativeLibraryImpl(Class fromClass, String name) { + RawNativeLibraryImpl(String name) { this.name = name; } diff --git a/src/java.base/share/classes/jdk/internal/logger/LoggerFinderLoader.java b/src/java.base/share/classes/jdk/internal/logger/LoggerFinderLoader.java index dbf4ccca128e4c292231f66fd1e3f33f11296cd3..4f009973e2742a2468aa2437353f23bcd178a99a 100644 --- a/src/java.base/share/classes/jdk/internal/logger/LoggerFinderLoader.java +++ b/src/java.base/share/classes/jdk/internal/logger/LoggerFinderLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * 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,7 +129,7 @@ public final class LoggerFinderLoader { result = iterator.next(); if (iterator.hasNext() && ensureSingletonProvider()) { throw new ServiceConfigurationError( - "More than on LoggerFinder implementation"); + "More than one LoggerFinder implementation"); } } else { result = loadDefaultImplementation(); diff --git a/src/java.base/share/classes/jdk/internal/misc/CDS.java b/src/java.base/share/classes/jdk/internal/misc/CDS.java index 370086612cd83b8ed4cdf23fc129ee31f5970d32..29b6a3cbce721ba2fd0bd3648d3db6e0ca89200a 100644 --- a/src/java.base/share/classes/jdk/internal/misc/CDS.java +++ b/src/java.base/share/classes/jdk/internal/misc/CDS.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,6 @@ import java.util.Map; import java.util.Objects; import java.util.stream.Stream; -import jdk.internal.access.JavaLangInvokeAccess; import jdk.internal.access.SharedSecrets; public class CDS { @@ -224,7 +223,7 @@ public class CDS { prt.println(line); } } catch (IOException e) { - throw new RuntimeException("IOExeption happens during drain stream to file " + + throw new RuntimeException("IOException happens during drain stream to file " + fileName + ": " + e.getMessage()); }}).start(); return fileName; diff --git a/src/java.base/share/classes/jdk/internal/misc/InnocuousThread.java b/src/java.base/share/classes/jdk/internal/misc/InnocuousThread.java index 81064a043e21c138ed8ca4a04eae699e38fb2877..ab28c6339c4b36f69a8b99aa5d2728615ddb09a0 100644 --- a/src/java.base/share/classes/jdk/internal/misc/InnocuousThread.java +++ b/src/java.base/share/classes/jdk/internal/misc/InnocuousThread.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -72,13 +72,15 @@ public final class InnocuousThread extends Thread { */ public static Thread newThread(String name, Runnable target, int priority) { if (System.getSecurityManager() == null) { - return createThread(name, target, ClassLoader.getSystemClassLoader(), priority); + return createThread(name, target, 0L, + ClassLoader.getSystemClassLoader(), priority); } return AccessController.doPrivileged( new PrivilegedAction() { @Override public Thread run() { - return createThread(name, target, ClassLoader.getSystemClassLoader(), priority); + return createThread(name, target, 0L, + ClassLoader.getSystemClassLoader(), priority); } }); } @@ -104,28 +106,50 @@ public final class InnocuousThread extends Thread { */ public static Thread newSystemThread(String name, Runnable target, int priority) { if (System.getSecurityManager() == null) { - return createThread(name, target, null, priority); + return createThread(name, target, 0L, null, priority); } return AccessController.doPrivileged( new PrivilegedAction() { @Override public Thread run() { - return createThread(name, target, null, priority); + return createThread(name, target, 0L, + null, priority); } }); } - private static Thread createThread(String name, Runnable target, ClassLoader loader, int priority) { + /** + * Returns a new InnocuousThread with null context class loader. + * Thread priority is set to the given priority. + */ + public static Thread newSystemThread(String name, Runnable target, + long stackSize, int priority) { + if (System.getSecurityManager() == null) { + return createThread(name, target, stackSize, null, priority); + } + return AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public Thread run() { + return createThread(name, target, 0L, + null, priority); + } + }); + } + + private static Thread createThread(String name, Runnable target, long stackSize, + ClassLoader loader, int priority) { Thread t = new InnocuousThread(INNOCUOUSTHREADGROUP, - target, name, loader); + target, name, stackSize, loader); if (priority >= 0) { t.setPriority(priority); } return t; } - private InnocuousThread(ThreadGroup group, Runnable target, String name, ClassLoader tccl) { - super(group, target, name, 0L, false); + private InnocuousThread(ThreadGroup group, Runnable target, String name, + long stackSize, ClassLoader tccl) { + super(group, target, name, stackSize, false); UNSAFE.putReferenceRelease(this, INHERITEDACCESSCONTROLCONTEXT, ACC); UNSAFE.putReferenceRelease(this, CONTEXTCLASSLOADER, tccl); } diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/AnnotationVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/AnnotationVisitor.java index b5127eb142e5b27de38434552a0eca5fcf33e331..2288378fdddd2aa2346e6664b0fc46e010d7da9b 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/AnnotationVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/AnnotationVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -98,19 +99,15 @@ public abstract class AnnotationVisitor { * @param annotationVisitor the annotation visitor to which this visitor must delegate method * calls. May be {@literal null}. */ - @SuppressWarnings("deprecation") public AnnotationVisitor(final int api, final AnnotationVisitor annotationVisitor) { - if (api != Opcodes.ASM8 + if (api != Opcodes.ASM9 + && api != Opcodes.ASM8 && api != Opcodes.ASM7 && api != Opcodes.ASM6 && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM9_EXPERIMENTAL) { + && api != Opcodes.ASM4) { throw new IllegalArgumentException("Unsupported api " + api); } - if (api == Opcodes.ASM9_EXPERIMENTAL) { - Constants.checkAsmExperimental(this); - } this.api = api; this.av = annotationVisitor; } @@ -162,9 +159,9 @@ public abstract class AnnotationVisitor { } /** - * Visits an array value of the annotation. Note that arrays of primitive types (such as byte, + * Visits an array value of the annotation. Note that arrays of primitive values (such as byte, * boolean, short, char, int, long, float or double) can be passed as value to {@link #visit - * visit}. This is what {@link ClassReader} does. + * visit}. This is what {@link ClassReader} does for non empty arrays of primitive values. * * @param name the value name. * @return a visitor to visit the actual array value elements, or {@literal null} if this visitor diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/AnnotationWriter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/AnnotationWriter.java index 9517d6b02555efe159e75d3d7ae2c6fb2cb6df65..fb4ae268d822f4509216ddcdd6806a8421a5fac5 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/AnnotationWriter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/AnnotationWriter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -143,7 +144,7 @@ final class AnnotationWriter extends AnnotationVisitor { final boolean useNamedValues, final ByteVector annotation, final AnnotationWriter previousAnnotation) { - super(/* latest api = */ Opcodes.ASM8); + super(/* latest api = */ Opcodes.ASM9); this.symbolTable = symbolTable; this.useNamedValues = useNamedValues; this.annotation = annotation; diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Attribute.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Attribute.java index daadeb263e20a79db905a3a424059a288e354322..9c5ce91e3ffc43a8d32e2902f56429e707054092 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Attribute.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Attribute.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ByteVector.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ByteVector.java index e576513f91bde684a51581a2f0bba3af51c8d89d..9e5b8cf8850d5f1e5fef91c03922b77102355aa6 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ByteVector.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ByteVector.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -390,3 +391,4 @@ public class ByteVector { data = newData; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java index e306e60d45bf209990bd019099ecc8ed605cadcd..7f76419d86c486b002d9daf4352747d8dfed0aad 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; import java.io.ByteArrayOutputStream; @@ -119,6 +120,9 @@ public class ClassReader { */ static final int EXPAND_ASM_INSNS = 256; + /** The maximum size of array to allocate. */ + private static final int MAX_BUFFER_SIZE = 1024 * 1024; + /** The size of the temporary byte array used to read class input streams chunk by chunk. */ private static final int INPUT_STREAM_DATA_CHUNK_SIZE = 4096; @@ -132,6 +136,9 @@ public class ClassReader { // DontCheck(MemberName): can't be renamed (for backward binary compatibility). public final byte[] b; + /** The offset in bytes of the ClassFile's access_flags field. */ + public final int header; + /** * A byte array containing the JVMS ClassFile structure to be parsed. The content of this array * must not be modified. This field is intended for {@link Attribute} sub classes, and is normally @@ -178,9 +185,6 @@ public class ClassReader { */ private final int maxStringLength; - /** The offset in bytes of the ClassFile's access_flags field. */ - public final int header; - // ----------------------------------------------------------------------------------------------- // Constructors // ----------------------------------------------------------------------------------------------- @@ -341,13 +345,19 @@ public class ClassReader { if (inputStream == null) { throw new IOException("Class not found"); } + int bufferSize = calculateBufferSize(inputStream); try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { - byte[] data = new byte[INPUT_STREAM_DATA_CHUNK_SIZE]; + byte[] data = new byte[bufferSize]; int bytesRead; - while ((bytesRead = inputStream.read(data, 0, data.length)) != -1) { + int readCount = 0; + while ((bytesRead = inputStream.read(data, 0, bufferSize)) != -1) { outputStream.write(data, 0, bytesRead); + readCount++; } outputStream.flush(); + if (readCount == 1) { + return data; + } return outputStream.toByteArray(); } finally { if (close) { @@ -356,6 +366,20 @@ public class ClassReader { } } + private static int calculateBufferSize(final InputStream inputStream) throws IOException { + int expectedLength = inputStream.available(); + /* + * Some implementations can return 0 while holding available data + * (e.g. new FileInputStream("/proc/a_file")) + * Also in some pathological cases a very small number might be returned, + * and in this case we use default size + */ + if (expectedLength < 256) { + return INPUT_STREAM_DATA_CHUNK_SIZE; + } + return Math.min(expectedLength, MAX_BUFFER_SIZE); + } + // ----------------------------------------------------------------------------------------------- // Accessors // ----------------------------------------------------------------------------------------------- @@ -446,7 +470,6 @@ public class ClassReader { * @param parsingOptions the options to use to parse this class. One or more of {@link * #SKIP_CODE}, {@link #SKIP_DEBUG}, {@link #SKIP_FRAMES} or {@link #EXPAND_FRAMES}. */ - @SuppressWarnings("deprecation") public void accept( final ClassVisitor classVisitor, final Attribute[] attributePrototypes, @@ -710,11 +733,11 @@ public class ClassReader { // Visit the PermittedSubclasses attribute. if (permittedSubclassesOffset != 0) { int numberOfPermittedSubclasses = readUnsignedShort(permittedSubclassesOffset); - int currentPermittedSubclassOffset = permittedSubclassesOffset + 2; + int currentPermittedSubclassesOffset = permittedSubclassesOffset + 2; while (numberOfPermittedSubclasses-- > 0) { - classVisitor.visitPermittedSubclassExperimental( - readClass(currentPermittedSubclassOffset, charBuffer)); - currentPermittedSubclassOffset += 2; + classVisitor.visitPermittedSubclass( + readClass(currentPermittedSubclassesOffset, charBuffer)); + currentPermittedSubclassesOffset += 2; } } @@ -3005,7 +3028,7 @@ public class ClassReader { // Parse the array_value array. while (numElementValuePairs-- > 0) { currentOffset = - readElementValue(annotationVisitor, currentOffset, /* named = */ null, charBuffer); + readElementValue(annotationVisitor, currentOffset, /* elementName= */ null, charBuffer); } } if (annotationVisitor != null) { @@ -3483,7 +3506,6 @@ public class ClassReader { private int[] readBootstrapMethodsAttribute(final int maxStringLength) { char[] charBuffer = new char[maxStringLength]; int currentAttributeOffset = getFirstAttributeOffset(); - int[] currentBootstrapMethodOffsets = null; for (int i = readUnsignedShort(currentAttributeOffset - 2); i > 0; --i) { // Read the attribute_info's attribute_name and attribute_length fields. String attributeName = readUTF8(currentAttributeOffset, charBuffer); @@ -3491,17 +3513,17 @@ public class ClassReader { currentAttributeOffset += 6; if (Constants.BOOTSTRAP_METHODS.equals(attributeName)) { // Read the num_bootstrap_methods field and create an array of this size. - currentBootstrapMethodOffsets = new int[readUnsignedShort(currentAttributeOffset)]; + int[] result = new int[readUnsignedShort(currentAttributeOffset)]; // Compute and store the offset of each 'bootstrap_methods' array field entry. int currentBootstrapMethodOffset = currentAttributeOffset + 2; - for (int j = 0; j < currentBootstrapMethodOffsets.length; ++j) { - currentBootstrapMethodOffsets[j] = currentBootstrapMethodOffset; + for (int j = 0; j < result.length; ++j) { + result[j] = currentBootstrapMethodOffset; // Skip the bootstrap_method_ref and num_bootstrap_arguments fields (2 bytes each), // as well as the bootstrap_arguments array field (of size num_bootstrap_arguments * 2). currentBootstrapMethodOffset += 4 + readUnsignedShort(currentBootstrapMethodOffset + 2) * 2; } - return currentBootstrapMethodOffsets; + return result; } currentAttributeOffset += attributeLength; } @@ -3860,3 +3882,4 @@ public class ClassReader { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassTooLargeException.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassTooLargeException.java index 730cfc953a4be0e53f05145501d52939a8122a33..fe94f7446d497300c5b1fc14ee6ca74625ac42f9 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassTooLargeException.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassTooLargeException.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -100,3 +101,4 @@ public final class ClassTooLargeException extends IndexOutOfBoundsException { return constantPoolCount; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassVisitor.java index 7bfb17051aed692a7f1cfbee8b2300c2f3ff80f5..a19ef8619ad9ea3b4b56225d420ccedc7295105e 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassVisitor.java @@ -56,14 +56,16 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** * A visitor to visit a Java class. The methods of this class must be called in the following order: * {@code visit} [ {@code visitSource} ] [ {@code visitModule} ][ {@code visitNestHost} ][ {@code - * visitPermittedSubclass} ][ {@code visitOuterClass} ] ( {@code visitAnnotation} | {@code - * visitTypeAnnotation} | {@code visitAttribute} )* ( {@code visitNestMember} | {@code - * visitInnerClass} | {@code visitField} | {@code visitMethod} )* {@code visitEnd}. + * visitOuterClass} ] ( {@code visitAnnotation} | {@code visitTypeAnnotation} | {@code + * visitAttribute} )* ( {@code visitNestMember} | [ {@code * visitPermittedSubclass} ] | {@code + * visitInnerClass} | {@code visitRecordComponent} | {@code visitField} | {@code visitMethod} )* + * {@code visitEnd}. * * @author Eric Bruneton */ @@ -92,24 +94,20 @@ public abstract class ClassVisitor { * Constructs a new {@link ClassVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param classVisitor the class visitor to which this visitor must delegate method calls. May be * null. */ - @SuppressWarnings("deprecation") public ClassVisitor(final int api, final ClassVisitor classVisitor) { - if (api != Opcodes.ASM8 + if (api != Opcodes.ASM9 + && api != Opcodes.ASM8 && api != Opcodes.ASM7 && api != Opcodes.ASM6 && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM9_EXPERIMENTAL) { + && api != Opcodes.ASM4) { throw new IllegalArgumentException("Unsupported api " + api); } - if (api == Opcodes.ASM9_EXPERIMENTAL) { - Constants.checkAsmExperimental(this); - } this.api = api; this.cv = classVisitor; } @@ -172,7 +170,7 @@ public abstract class ClassVisitor { */ public ModuleVisitor visitModule(final String name, final int access, final String version) { if (api < Opcodes.ASM6) { - throw new UnsupportedOperationException("This feature requires ASM6"); + throw new UnsupportedOperationException("Module requires ASM6"); } if (cv != null) { return cv.visitModule(name, access, version); @@ -192,7 +190,7 @@ public abstract class ClassVisitor { */ public void visitNestHost(final String nestHost) { if (api < Opcodes.ASM7) { - throw new UnsupportedOperationException("This feature requires ASM7"); + throw new UnsupportedOperationException("NestHost requires ASM7"); } if (cv != null) { cv.visitNestHost(nestHost); @@ -248,7 +246,7 @@ public abstract class ClassVisitor { public AnnotationVisitor visitTypeAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { if (api < Opcodes.ASM5) { - throw new UnsupportedOperationException("This feature requires ASM5"); + throw new UnsupportedOperationException("TypeAnnotation requires ASM5"); } if (cv != null) { return cv.visitTypeAnnotation(typeRef, typePath, descriptor, visible); @@ -278,7 +276,7 @@ public abstract class ClassVisitor { */ public void visitNestMember(final String nestMember) { if (api < Opcodes.ASM7) { - throw new UnsupportedOperationException("This feature requires ASM7"); + throw new UnsupportedOperationException("NestMember requires ASM7"); } if (cv != null) { cv.visitNestMember(nestMember); @@ -286,20 +284,17 @@ public abstract class ClassVisitor { } /** - * Experimental, use at your own risk. This method will be renamed when it becomes stable, this - * will break existing code using it. Visits a permitted subclass. A permitted subclass is one - * of the allowed subclasses of the current class. + * Visits a permitted subclasses. A permitted subclass is one of the allowed subclasses of the + * current class. * * @param permittedSubclass the internal name of a permitted subclass. - * @deprecated this API is experimental. */ - @Deprecated - public void visitPermittedSubclassExperimental(final String permittedSubclass) { - if (api != Opcodes.ASM9_EXPERIMENTAL) { - throw new UnsupportedOperationException("This feature requires ASM9_EXPERIMENTAL"); + public void visitPermittedSubclass(final String permittedSubclass) { + if (api < Opcodes.ASM9) { + throw new UnsupportedOperationException("PermittedSubclasses requires ASM9"); } if (cv != null) { - cv.visitPermittedSubclassExperimental(permittedSubclass); + cv.visitPermittedSubclass(permittedSubclass); } } @@ -335,7 +330,7 @@ public abstract class ClassVisitor { public RecordComponentVisitor visitRecordComponent( final String name, final String descriptor, final String signature) { if (api < Opcodes.ASM8) { - throw new UnsupportedOperationException("This feature requires ASM8"); + throw new UnsupportedOperationException("Record requires ASM8"); } if (cv != null) { return cv.visitRecordComponent(name, descriptor, signature); @@ -411,3 +406,4 @@ public abstract class ClassVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java index 31cfe85afe29579930ca2a2af8717c2da4b8e67b..7c387666262beb3378b81fcf64b158425494a290 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -110,7 +111,7 @@ public class ClassWriter extends ClassVisitor { /** * The access_flags field of the JVMS ClassFile structure. This field can contain ASM specific - * access flags, such as {@link Opcodes#ACC_DEPRECATED} or {}@link Opcodes#ACC_RECORD}, which are + * access flags, such as {@link Opcodes#ACC_DEPRECATED} or {@link Opcodes#ACC_RECORD}, which are * removed when generating the ClassFile structure. */ private int accessFlags; @@ -209,10 +210,10 @@ public class ClassWriter extends ClassVisitor { private ByteVector nestMemberClasses; /** The number_of_classes field of the PermittedSubclasses attribute, or 0. */ - private int numberOfPermittedSubclassClasses; + private int numberOfPermittedSubclasses; /** The 'classes' array of the PermittedSubclasses attribute, or {@literal null}. */ - private ByteVector permittedSubclassClasses; + private ByteVector permittedSubclasses; /** * The record components of this class, stored in a linked list of {@link RecordComponentWriter} @@ -285,7 +286,7 @@ public class ClassWriter extends ClassVisitor { * maximum stack size nor the stack frames will be computed for these methods. */ public ClassWriter(final ClassReader classReader, final int flags) { - super(/* latest api = */ Opcodes.ASM8); + super(/* latest api = */ Opcodes.ASM9); symbolTable = classReader == null ? new SymbolTable(this) : new SymbolTable(this, classReader); if ((flags & COMPUTE_FRAMES) != 0) { this.compute = MethodWriter.COMPUTE_ALL_FRAMES; @@ -403,20 +404,13 @@ public class ClassWriter extends ClassVisitor { nestMemberClasses.putShort(symbolTable.addConstantClass(nestMember).index); } - /** - * Experimental, use at your own risk. - * - * @param permittedSubclass the internal name of a permitted subclass. - * @deprecated this API is experimental. - */ @Override - @Deprecated - public final void visitPermittedSubclassExperimental(final String permittedSubclass) { - if (permittedSubclassClasses == null) { - permittedSubclassClasses = new ByteVector(); + public final void visitPermittedSubclass(final String permittedSubclass) { + if (permittedSubclasses == null) { + permittedSubclasses = new ByteVector(); } - ++numberOfPermittedSubclassClasses; - permittedSubclassClasses.putShort(symbolTable.addConstantClass(permittedSubclass).index); + ++numberOfPermittedSubclasses; + permittedSubclasses.putShort(symbolTable.addConstantClass(permittedSubclass).index); } @Override @@ -607,9 +601,9 @@ public class ClassWriter extends ClassVisitor { size += 8 + nestMemberClasses.length; symbolTable.addConstantUtf8(Constants.NEST_MEMBERS); } - if (permittedSubclassClasses != null) { + if (permittedSubclasses != null) { ++attributesCount; - size += 8 + permittedSubclassClasses.length; + size += 8 + permittedSubclasses.length; symbolTable.addConstantUtf8(Constants.PERMITTED_SUBCLASSES); } int recordComponentCount = 0; @@ -729,12 +723,12 @@ public class ClassWriter extends ClassVisitor { .putShort(numberOfNestMemberClasses) .putByteArray(nestMemberClasses.data, 0, nestMemberClasses.length); } - if (permittedSubclassClasses != null) { + if (permittedSubclasses != null) { result .putShort(symbolTable.addConstantUtf8(Constants.PERMITTED_SUBCLASSES)) - .putInt(permittedSubclassClasses.length + 2) - .putShort(numberOfPermittedSubclassClasses) - .putByteArray(permittedSubclassClasses.data, 0, permittedSubclassClasses.length); + .putInt(permittedSubclasses.length + 2) + .putShort(numberOfPermittedSubclasses) + .putByteArray(permittedSubclasses.data, 0, permittedSubclasses.length); } if ((accessFlags & Opcodes.ACC_RECORD) != 0 || firstRecordComponent != null) { result @@ -783,8 +777,8 @@ public class ClassWriter extends ClassVisitor { nestHostClassIndex = 0; numberOfNestMemberClasses = 0; nestMemberClasses = null; - numberOfPermittedSubclassClasses = 0; - permittedSubclassClasses = null; + numberOfPermittedSubclasses = 0; + permittedSubclasses = null; firstRecordComponent = null; lastRecordComponent = null; firstAttribute = null; @@ -1089,3 +1083,4 @@ public class ClassWriter extends ClassVisitor { return getClass().getClassLoader(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ConstantDynamic.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ConstantDynamic.java index 089c69b261d087c52c78071eb9a62466f635b826..457bec9c94a0fa127708e20cb1a6fffa440bb935 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ConstantDynamic.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ConstantDynamic.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; import java.util.Arrays; @@ -207,3 +208,4 @@ public final class ConstantDynamic { + Arrays.toString(bootstrapMethodArguments); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Constants.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Constants.java index 8599089459a38508f759308fe1e53d5614e00148..cc10a3cee72afb085e38410f036f1f4f1f9b7513 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Constants.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Constants.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; import java.io.DataInputStream; @@ -250,3 +251,4 @@ final class Constants { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Context.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Context.java index d88d22777d4f03c5ac34eb75299d217fa1505e38..9b64452a096aaed1f3df0cb7873b8c373f1aaf3e 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Context.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Context.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -165,3 +166,4 @@ final class Context { */ Object[] currentFrameStackTypes; } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/CurrentFrame.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/CurrentFrame.java index 7f4351706b133df0c8c7aa24a4feba789872d1f5..32a4544dfd7e0289c9a622a74d493bb884067352 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/CurrentFrame.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/CurrentFrame.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -84,3 +85,4 @@ final class CurrentFrame extends Frame { copyFrom(successor); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Edge.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Edge.java index 3dc0ae3caf8990212a826774d9a28c823ba4b448..3da370335ffe9d244af9fa0d1b87ce0b041f9fb3 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Edge.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Edge.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -120,3 +121,4 @@ final class Edge { this.nextEdge = nextEdge; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/FieldVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/FieldVisitor.java index 454c57d319102b596244541971c7d4854ead2e6d..235229da644b59ad18932869e91ce5959e320c9b 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/FieldVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/FieldVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -69,8 +70,8 @@ public abstract class FieldVisitor { /** * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. */ protected final int api; @@ -81,8 +82,8 @@ public abstract class FieldVisitor { * Constructs a new {@link FieldVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. */ public FieldVisitor(final int api) { this(api, null); @@ -97,19 +98,15 @@ public abstract class FieldVisitor { * @param fieldVisitor the field visitor to which this visitor must delegate method calls. May be * null. */ - @SuppressWarnings("deprecation") public FieldVisitor(final int api, final FieldVisitor fieldVisitor) { - if (api != Opcodes.ASM8 + if (api != Opcodes.ASM9 + && api != Opcodes.ASM8 && api != Opcodes.ASM7 && api != Opcodes.ASM6 && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM9_EXPERIMENTAL) { + && api != Opcodes.ASM4) { throw new IllegalArgumentException("Unsupported api " + api); } - if (api == Opcodes.ASM9_EXPERIMENTAL) { - Constants.checkAsmExperimental(this); - } this.api = api; this.fv = fieldVisitor; } @@ -174,3 +171,4 @@ public abstract class FieldVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/FieldWriter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/FieldWriter.java index ef8c52e02f1351c0b8c530928324d7e4c8db97c2..dd3b445056d80b27e46fbc1577316d39a384caaa 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/FieldWriter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/FieldWriter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -155,7 +156,7 @@ final class FieldWriter extends FieldVisitor { final String descriptor, final String signature, final Object constantValue) { - super(/* latest api = */ Opcodes.ASM8); + super(/* latest api = */ Opcodes.ASM9); this.symbolTable = symbolTable; this.accessFlags = access; this.nameIndex = symbolTable.addConstantUtf8(name); @@ -313,3 +314,4 @@ final class FieldWriter extends FieldVisitor { attributePrototypes.addAttributes(firstAttribute); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Frame.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Frame.java index 47aa6d5753dd1e97123dd1d975d4defcdf2e8bc4..e4c9b420747ac9f1f8c93553029a754bcae45f23 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Frame.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Frame.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -1502,3 +1503,4 @@ class Frame { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Handle.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Handle.java index c18d6142a0d3d956f2c167e3047da494490cdd36..991fc6aabf588502daa6fac710e4481e1ded8887 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Handle.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Handle.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -217,3 +218,4 @@ public final class Handle { return owner + '.' + name + descriptor + " (" + tag + (isInterface ? " itf" : "") + ')'; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Handler.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Handler.java index 3802f67564399d3fab0ff384ff913a5dc091f1c3..848a6d1e14c375194c2349b68a6b89b50771cfe6 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Handler.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Handler.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -227,3 +228,4 @@ final class Handler { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Label.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Label.java index 4f1cedaad2396aa40bd5421b5519d5a86c40092f..a24413f76635cd609bb721f718773c7f166e641f 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Label.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Label.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -651,3 +652,4 @@ public class Label { return "L" + System.identityHashCode(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodTooLargeException.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodTooLargeException.java index 82a551a3e3d47e641aeb4beb002e2416f0acf0d1..6c7252e35fb3db60c92e85bd9209c9120823c5fa 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodTooLargeException.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodTooLargeException.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -128,3 +129,4 @@ public final class MethodTooLargeException extends IndexOutOfBoundsException { return codeSize; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodVisitor.java index 6bc37b1ec7af94b7caf877cf87c9c4cb998c925f..69939c660010f44fc0870fd406e7f70c5424b1fc 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -110,19 +111,15 @@ public abstract class MethodVisitor { * @param methodVisitor the method visitor to which this visitor must delegate method calls. May * be null. */ - @SuppressWarnings("deprecation") public MethodVisitor(final int api, final MethodVisitor methodVisitor) { - if (api != Opcodes.ASM8 + if (api != Opcodes.ASM9 + && api != Opcodes.ASM8 && api != Opcodes.ASM7 && api != Opcodes.ASM6 && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM9_EXPERIMENTAL) { + && api != Opcodes.ASM4) { throw new IllegalArgumentException("Unsupported api " + api); } - if (api == Opcodes.ASM9_EXPERIMENTAL) { - Constants.checkAsmExperimental(this); - } this.api = api; this.mv = methodVisitor; } @@ -815,3 +812,4 @@ public abstract class MethodVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java index 648d523ba95adeae090bd8def7884de2a29be825..155d8fc06b1d8ddb7ce691503656148fdcaa36d2 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -623,7 +624,7 @@ final class MethodWriter extends MethodVisitor { final String signature, final String[] exceptions, final int compute) { - super(/* latest api = */ Opcodes.ASM8); + super(/* latest api = */ Opcodes.ASM9); this.symbolTable = symbolTable; this.accessFlags = "".equals(name) ? access | Constants.ACC_CONSTRUCTOR : access; this.nameIndex = symbolTable.addConstantUtf8(name); @@ -2422,3 +2423,4 @@ final class MethodWriter extends MethodVisitor { attributePrototypes.addAttributes(firstCodeAttribute); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ModuleVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ModuleVisitor.java index 7ae90f18533b54ea62c0d0aaf5d7d188234cdb02..c230852922584b6e5c89b250b206912452e71536 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ModuleVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ModuleVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -96,19 +97,15 @@ public abstract class ModuleVisitor { * @param moduleVisitor the module visitor to which this visitor must delegate method calls. May * be null. */ - @SuppressWarnings("deprecation") public ModuleVisitor(final int api, final ModuleVisitor moduleVisitor) { - if (api != Opcodes.ASM8 + if (api != Opcodes.ASM9 + && api != Opcodes.ASM8 && api != Opcodes.ASM7 && api != Opcodes.ASM6 && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM9_EXPERIMENTAL) { + && api != Opcodes.ASM4) { throw new IllegalArgumentException("Unsupported api " + api); } - if (api == Opcodes.ASM9_EXPERIMENTAL) { - Constants.checkAsmExperimental(this); - } this.api = api; this.mv = moduleVisitor; } @@ -214,3 +211,4 @@ public abstract class ModuleVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ModuleWriter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ModuleWriter.java index 950b53ee20f3707c8f1331c03c1c4eff086d1f0a..8680488d7a0e0877dddd3f6c951a9a37990ce0c8 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ModuleWriter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ModuleWriter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -125,7 +126,7 @@ final class ModuleWriter extends ModuleVisitor { private int mainClassIndex; ModuleWriter(final SymbolTable symbolTable, final int name, final int access, final int version) { - super(/* latest api = */ Opcodes.ASM8); + super(/* latest api = */ Opcodes.ASM9); this.symbolTable = symbolTable; this.moduleNameIndex = name; this.moduleFlags = access; @@ -282,3 +283,4 @@ final class ModuleWriter extends ModuleVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java index d1b6d52865cca24e5ed7d767f8789e1038b69c39..4123d87cd3582124b82c99ae75065c9a4a19ef45 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -79,14 +80,7 @@ public interface Opcodes { int ASM6 = 6 << 16 | 0 << 8; int ASM7 = 7 << 16 | 0 << 8; int ASM8 = 8 << 16 | 0 << 8; - - /** - * Experimental, use at your own risk. This field will be renamed when it becomes stable, this - * will break existing code using it. Only code compiled with --enable-preview can use this. - * - * @deprecated This API is experimental. - */ - @Deprecated int ASM9_EXPERIMENTAL = 1 << 24 | 9 << 16 | 0 << 8; + int ASM9 = 9 << 16 | 0 << 8; /* * Internal flags used to redirect calls to deprecated methods. For instance, if a visitOldStuff @@ -163,7 +157,7 @@ public interface Opcodes { *
           * public class StuffVisitor {
           *   @Deprecated public void visitOldStuff(int arg, ...) {
    -      *     visitNewStuf(arg | SOURCE_DEPRECATED, ...);
    +      *     visitNewStuff(arg | SOURCE_DEPRECATED, ...);
           *   }
           *   public void visitNewStuff(int argAndSource...) {
           *     if ((argAndSource & SOURCE_DEPRECATED) == 0) {
    @@ -185,7 +179,7 @@ public interface Opcodes {
           * 

    and there are two cases: * *

      - *
    • call visitOldSuff: in the call to super.visitOldStuff, the source is set to + *
    • call visitOldStuff: in the call to super.visitOldStuff, the source is set to * SOURCE_DEPRECATED and visitNewStuff is called. Here 'do stuff' is run because the source * was previously set to SOURCE_DEPRECATED, and execution eventually returns to * UserStuffVisitor.visitOldStuff, where 'do user stuff' is run. @@ -590,3 +584,4 @@ public interface Opcodes { int IFNULL = 198; // visitJumpInsn int IFNONNULL = 199; // - } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/RecordComponentVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/RecordComponentVisitor.java index 70396a6cfb934af73588207069bde41db6e13de7..dbca79f4a136b21c1b108b764ded4b17c61cfac1 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/RecordComponentVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/RecordComponentVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -68,8 +69,8 @@ package jdk.internal.org.objectweb.asm; */ public abstract class RecordComponentVisitor { /** - * The ASM API version implemented by this visitor. The value of this field must be {@link - * Opcodes#ASM8}. + * The ASM API version implemented by this visitor. The value of this field must be one of {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. */ protected final int api; @@ -81,7 +82,8 @@ public abstract class RecordComponentVisitor { /** * Constructs a new {@link RecordComponentVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be {@link Opcodes#ASM8}. + * @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM8} + * or {@link Opcodes#ASM9}. */ public RecordComponentVisitor(final int api) { this(api, null); @@ -94,20 +96,16 @@ public abstract class RecordComponentVisitor { * @param recordComponentVisitor the record component visitor to which this visitor must delegate * method calls. May be null. */ - @SuppressWarnings("deprecation") public RecordComponentVisitor( final int api, final RecordComponentVisitor recordComponentVisitor) { - if (api != Opcodes.ASM8 + if (api != Opcodes.ASM9 + && api != Opcodes.ASM8 && api != Opcodes.ASM7 && api != Opcodes.ASM6 && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM9_EXPERIMENTAL) { + && api != Opcodes.ASM4) { throw new IllegalArgumentException("Unsupported api " + api); } - if (api == Opcodes.ASM9_EXPERIMENTAL) { - Constants.checkAsmExperimental(this); - } this.api = api; this.delegate = recordComponentVisitor; } @@ -180,3 +178,4 @@ public abstract class RecordComponentVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/RecordComponentWriter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/RecordComponentWriter.java index 5ec88b4000a06eda403075f03e1b92017097daae..c75130736af8f6c5603dfad1a44eeb17e068bb82 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/RecordComponentWriter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/RecordComponentWriter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; final class RecordComponentWriter extends RecordComponentVisitor { @@ -125,7 +126,7 @@ final class RecordComponentWriter extends RecordComponentVisitor { final String name, final String descriptor, final String signature) { - super(/* latest api = */ Opcodes.ASM8); + super(/* latest api = */ Opcodes.ASM9); this.symbolTable = symbolTable; this.nameIndex = symbolTable.addConstantUtf8(name); this.descriptorIndex = symbolTable.addConstantUtf8(descriptor); @@ -254,3 +255,4 @@ final class RecordComponentWriter extends RecordComponentVisitor { attributePrototypes.addAttributes(firstAttribute); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Symbol.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Symbol.java index 630afc5d0842edf47638ecd932941fc3c5da860a..a6b17c650afb13611515e09419e84fc8fa533238 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Symbol.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Symbol.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -272,3 +273,4 @@ abstract class Symbol { return info; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/SymbolTable.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/SymbolTable.java index d4af66c210197d06930133baa1e4f9b2df69e261..2ca923859f4a195ba5d7a20590f05948c92959c3 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/SymbolTable.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/SymbolTable.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -1351,3 +1352,4 @@ final class SymbolTable { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Type.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Type.java index 0302df589e646baa375dccd4d7593084fe1e1d9e..3eaa0c5438094c10806b7cd654b9487a0fccdcdc 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Type.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Type.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; import java.lang.reflect.Constructor; @@ -924,3 +925,4 @@ public final class Type { return getDescriptor(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/TypePath.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/TypePath.java index ae588db91a5ca3bcb80729e9c78a0a40c125129a..9725e5b04488ee439f1b31199653901731d60d78 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/TypePath.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/TypePath.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -229,3 +230,4 @@ public final class TypePath { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/TypeReference.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/TypeReference.java index bc8da0604a37686fbce0acea0c87132b15230bd3..92a1c94eb0fe94e99129fb2d8113567e949c9d2c 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/TypeReference.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/TypeReference.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm; /** @@ -464,3 +465,4 @@ public class TypeReference { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AdviceAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AdviceAdapter.java index b34d5cc4bbbf4ca2b7978606f30abe1654d2493a..f319c79456b11d0512c8e212fa060c6624a576e8 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AdviceAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AdviceAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import java.util.ArrayList; @@ -185,10 +186,12 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes throw new IllegalArgumentException("Invalid return in constructor"); case RETURN: // empty stack onMethodExit(opcode); + endConstructorBasicBlockWithoutSuccessor(); break; case ATHROW: // 1 before n/a after popValue(); onMethodExit(opcode); + endConstructorBasicBlockWithoutSuccessor(); break; case NOP: case LALOAD: // remove 2 add 2 @@ -383,6 +386,7 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes popValue(); break; case RET: + endConstructorBasicBlockWithoutSuccessor(); break; default: throw new IllegalArgumentException(INVALID_OPCODE + opcode); @@ -484,10 +488,10 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes super.visitMethodInsn(opcodeAndSource, owner, name, descriptor, isInterface); int opcode = opcodeAndSource & ~Opcodes.SOURCE_MASK; - doVisitMethodInsn(opcode, descriptor); + doVisitMethodInsn(opcode, name, descriptor); } - private void doVisitMethodInsn(final int opcode, final String descriptor) { + private void doVisitMethodInsn(final int opcode, final String name, final String descriptor) { if (isConstructor && !superClassConstructorCalled) { for (Type argumentType : Type.getArgumentTypes(descriptor)) { popValue(); @@ -502,7 +506,9 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes break; case INVOKESPECIAL: Object value = popValue(); - if (value == UNINITIALIZED_THIS && !superClassConstructorCalled) { + if (value == UNINITIALIZED_THIS + && !superClassConstructorCalled + && name.equals("")) { superClassConstructorCalled = true; onMethodEnter(); } @@ -528,7 +534,7 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes final Handle bootstrapMethodHandle, final Object... bootstrapMethodArguments) { super.visitInvokeDynamicInsn(name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments); - doVisitMethodInsn(Opcodes.INVOKEDYNAMIC, descriptor); + doVisitMethodInsn(Opcodes.INVOKEDYNAMIC, name, descriptor); } @Override @@ -560,6 +566,9 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes case JSR: pushValue(OTHER); break; + case GOTO: + endConstructorBasicBlockWithoutSuccessor(); + break; default: break; } @@ -573,6 +582,7 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes if (isConstructor && !superClassConstructorCalled) { popValue(); addForwardJumps(dflt, labels); + endConstructorBasicBlockWithoutSuccessor(); } } @@ -583,6 +593,7 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes if (isConstructor && !superClassConstructorCalled) { popValue(); addForwardJumps(dflt, labels); + endConstructorBasicBlockWithoutSuccessor(); } } @@ -619,6 +630,19 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes forwardJumpStackFrames.put(label, new ArrayList<>(stackFrame)); } + private void endConstructorBasicBlockWithoutSuccessor() { + // The next instruction is not reachable from this instruction. If it is dead code, we + // should not try to simulate stack operations, and there is no need to insert advices + // here. If it is reachable with a backward jump, the only possible case is that the super + // class constructor has already been called (backward jumps are forbidden before it is + // called). If it is reachable with a forward jump, there are two sub-cases. Either the + // super class constructor has already been called when reaching the next instruction, or + // it has not been called. But in this case there must be a forwardJumpStackFrames entry + // for a Label designating the next instruction, and superClassConstructorCalled will be + // reset to false there. We can therefore always reset this field to true here. + superClassConstructorCalled = true; + } + private Object popValue() { return stackFrame.remove(stackFrame.size() - 1); } @@ -676,3 +700,4 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes */ protected void onMethodExit(final int opcode) {} } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AnalyzerAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AnalyzerAdapter.java index 488764a65ed4a91b9ffeb5231071af0ed68e7d0a..9d0c104fa64872b5b6945373d3a73446fb2036b1 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AnalyzerAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AnalyzerAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import java.util.ArrayList; @@ -147,7 +148,7 @@ public class AnalyzerAdapter extends MethodVisitor { final String name, final String descriptor, final MethodVisitor methodVisitor) { - this(/* latest api = */ Opcodes.ASM8, owner, access, name, descriptor, methodVisitor); + this(/* latest api = */ Opcodes.ASM9, owner, access, name, descriptor, methodVisitor); if (getClass() != AnalyzerAdapter.class) { throw new IllegalStateException(); } @@ -157,8 +158,8 @@ public class AnalyzerAdapter extends MethodVisitor { * Constructs a new {@link AnalyzerAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param owner the owner's class name. * @param access the method's access flags (see {@link Opcodes}). * @param name the method's name. @@ -938,3 +939,4 @@ public class AnalyzerAdapter extends MethodVisitor { labels = null; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AnnotationRemapper.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AnnotationRemapper.java index 937b42f560e13dade9328d7712913d9d86300692..4cadba8cdf12c3d4dad4677fe9e0318a09d56129 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AnnotationRemapper.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/AnnotationRemapper.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -68,6 +69,12 @@ import jdk.internal.org.objectweb.asm.Opcodes; */ public class AnnotationRemapper extends AnnotationVisitor { + /** + * The descriptor of the visited annotation. May be {@literal null}, for instance for + * AnnotationDefault. + */ + protected final String descriptor; + /** The remapper used to remap the types in the visited annotation. */ protected final Remapper remapper; @@ -75,11 +82,27 @@ public class AnnotationRemapper extends AnnotationVisitor { * Constructs a new {@link AnnotationRemapper}. Subclasses must not use this constructor. * Instead, they must use the {@link #AnnotationRemapper(int,AnnotationVisitor,Remapper)} version. * - * @param annotationVisitor the annotation visitor this remapper must deleted to. + * @param annotationVisitor the annotation visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited annotation. + * @deprecated use {@link #AnnotationRemapper(String, AnnotationVisitor, Remapper)} instead. */ + @Deprecated public AnnotationRemapper(final AnnotationVisitor annotationVisitor, final Remapper remapper) { - this(/* latest api = */ Opcodes.ASM8, annotationVisitor, remapper); + this(/* descriptor = */ null, annotationVisitor, remapper); + } + + /** + * Constructs a new {@link AnnotationRemapper}. Subclasses must not use this constructor. + * Instead, they must use the {@link #AnnotationRemapper(int,String,AnnotationVisitor,Remapper)} + * version. + * + * @param descriptor the descriptor of the visited annotation. May be {@literal null}. + * @param annotationVisitor the annotation visitor this remapper must delegate to. + * @param remapper the remapper to use to remap the types in the visited annotation. + */ + public AnnotationRemapper( + final String descriptor, final AnnotationVisitor annotationVisitor, final Remapper remapper) { + this(/* latest api = */ Opcodes.ASM9, descriptor, annotationVisitor, remapper); } /** @@ -87,44 +110,71 @@ public class AnnotationRemapper extends AnnotationVisitor { * * @param api the ASM API version supported by this remapper. Must be one of {@link * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5}, {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7} or {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM8} - * @param annotationVisitor the annotation visitor this remapper must deleted to. + * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM8} or {@link jdk.internal.org.objectweb.asm.Opcodes#ASM9}. + * @param annotationVisitor the annotation visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited annotation. + * @deprecated use {@link #AnnotationRemapper(int, String, AnnotationVisitor, Remapper)} instead. */ + @Deprecated protected AnnotationRemapper( final int api, final AnnotationVisitor annotationVisitor, final Remapper remapper) { + this(api, /* descriptor = */ null, annotationVisitor, remapper); + } + + /** + * Constructs a new {@link AnnotationRemapper}. + * + * @param api the ASM API version supported by this remapper. Must be one of {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM8} or {@link jdk.internal.org.objectweb.asm.Opcodes#ASM9}. + * @param descriptor the descriptor of the visited annotation. May be {@literal null}. + * @param annotationVisitor the annotation visitor this remapper must delegate to. + * @param remapper the remapper to use to remap the types in the visited annotation. + */ + protected AnnotationRemapper( + final int api, + final String descriptor, + final AnnotationVisitor annotationVisitor, + final Remapper remapper) { super(api, annotationVisitor); + this.descriptor = descriptor; this.remapper = remapper; } @Override public void visit(final String name, final Object value) { - super.visit(name, remapper.mapValue(value)); + super.visit(mapAnnotationAttributeName(name), remapper.mapValue(value)); } @Override public void visitEnum(final String name, final String descriptor, final String value) { - super.visitEnum(name, remapper.mapDesc(descriptor), value); + super.visitEnum(mapAnnotationAttributeName(name), remapper.mapDesc(descriptor), value); } @Override public AnnotationVisitor visitAnnotation(final String name, final String descriptor) { - AnnotationVisitor annotationVisitor = super.visitAnnotation(name, remapper.mapDesc(descriptor)); + AnnotationVisitor annotationVisitor = + super.visitAnnotation(mapAnnotationAttributeName(name), remapper.mapDesc(descriptor)); if (annotationVisitor == null) { return null; } else { - return annotationVisitor == av ? this : createAnnotationRemapper(annotationVisitor); + return annotationVisitor == av + ? this + : createAnnotationRemapper(descriptor, annotationVisitor); } } @Override public AnnotationVisitor visitArray(final String name) { - AnnotationVisitor annotationVisitor = super.visitArray(name); + AnnotationVisitor annotationVisitor = super.visitArray(mapAnnotationAttributeName(name)); if (annotationVisitor == null) { return null; } else { - return annotationVisitor == av ? this : createAnnotationRemapper(annotationVisitor); + return annotationVisitor == av + ? this + : createAnnotationRemapper(/* descriptor = */ null, annotationVisitor); } } @@ -134,8 +184,63 @@ public class AnnotationRemapper extends AnnotationVisitor { * * @param annotationVisitor the AnnotationVisitor the remapper must delegate to. * @return the newly created remapper. + * @deprecated use {@link #createAnnotationRemapper(String, AnnotationVisitor)} instead. */ + @Deprecated protected AnnotationVisitor createAnnotationRemapper(final AnnotationVisitor annotationVisitor) { - return new AnnotationRemapper(api, annotationVisitor, remapper); + return new AnnotationRemapper(api, /* descriptor = */ null, annotationVisitor, remapper); + } + + /** + * Constructs a new remapper for annotations. The default implementation of this method returns a + * new {@link AnnotationRemapper}. + * + * @param descriptor the descriptor of the visited annotation. + * @param annotationVisitor the AnnotationVisitor the remapper must delegate to. + * @return the newly created remapper. + */ + protected AnnotationVisitor createAnnotationRemapper( + final String descriptor, final AnnotationVisitor annotationVisitor) { + return new AnnotationRemapper(api, descriptor, annotationVisitor, remapper) + .orDeprecatedValue(createAnnotationRemapper(annotationVisitor)); + } + + /** + * Returns either this object, or the given one. If the given object is equal to the object + * returned by the default implementation of the deprecated createAnnotationRemapper method, + * meaning that this method has not been overridden (or only in minor ways, for instance to add + * logging), then we can return this object instead, supposed to have been created by the new + * createAnnotationRemapper method. Otherwise we must return the given object. + * + * @param deprecatedAnnotationVisitor the result of a call to the deprecated + * createAnnotationRemapper method. + * @return either this object, or the given one. + */ + final AnnotationVisitor orDeprecatedValue(final AnnotationVisitor deprecatedAnnotationVisitor) { + if (deprecatedAnnotationVisitor.getClass() == getClass()) { + AnnotationRemapper deprecatedAnnotationRemapper = + (AnnotationRemapper) deprecatedAnnotationVisitor; + if (deprecatedAnnotationRemapper.api == api + && deprecatedAnnotationRemapper.av == av + && deprecatedAnnotationRemapper.remapper == remapper) { + return this; + } + } + return deprecatedAnnotationVisitor; + } + + /** + * Maps an annotation attribute name with the remapper. Returns the original name unchanged if the + * internal name of the annotation is {@literal null}. + * + * @param name the name of the annotation attribute. + * @return the new name of the annotation attribute. + */ + private String mapAnnotationAttributeName(final String name) { + if (descriptor == null) { + return name; + } + return remapper.mapAnnotationAttributeName(descriptor, name); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ClassRemapper.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ClassRemapper.java index acbf406b8a45135edb8aab123208aef9a34c03e8..29f6c8de1c3f15321a754f93d8279cbba2083261 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ClassRemapper.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ClassRemapper.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import java.util.List; @@ -100,11 +101,11 @@ public class ClassRemapper extends ClassVisitor { * Constructs a new {@link ClassRemapper}. Subclasses must not use this constructor. * Instead, they must use the {@link #ClassRemapper(int,ClassVisitor,Remapper)} version. * - * @param classVisitor the class visitor this remapper must deleted to. + * @param classVisitor the class visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited class. */ public ClassRemapper(final ClassVisitor classVisitor, final Remapper remapper) { - this(/* latest api = */ Opcodes.ASM8, classVisitor, remapper); + this(/* latest api = */ Opcodes.ASM9, classVisitor, remapper); } /** @@ -112,9 +113,9 @@ public class ClassRemapper extends ClassVisitor { * * @param api the ASM API version supported by this remapper. Must be one of {@link * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5}, {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7} or {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM8}. - * @param classVisitor the class visitor this remapper must deleted to. + * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM8} or {@link jdk.internal.org.objectweb.asm.Opcodes#ASM9}. + * @param classVisitor the class visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited class. */ protected ClassRemapper(final int api, final ClassVisitor classVisitor, final Remapper remapper) { @@ -150,7 +151,9 @@ public class ClassRemapper extends ClassVisitor { public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitAnnotation(remapper.mapDesc(descriptor), visible); - return annotationVisitor == null ? null : createAnnotationRemapper(annotationVisitor); + return annotationVisitor == null + ? null + : createAnnotationRemapper(descriptor, annotationVisitor); } @Override @@ -158,7 +161,9 @@ public class ClassRemapper extends ClassVisitor { final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); - return annotationVisitor == null ? null : createAnnotationRemapper(annotationVisitor); + return annotationVisitor == null + ? null + : createAnnotationRemapper(descriptor, annotationVisitor); } @Override @@ -249,16 +254,9 @@ public class ClassRemapper extends ClassVisitor { super.visitNestMember(remapper.mapType(nestMember)); } - /** - * Experimental, use at your own risk.. - * - * @param permittedSubclass the internal name of a permitted subclass. - * @deprecated this API is experimental. - */ @Override - @Deprecated - public void visitPermittedSubclassExperimental(final String permittedSubclass) { - super.visitPermittedSubclassExperimental(remapper.mapType(permittedSubclass)); + public void visitPermittedSubclass(final String permittedSubclass) { + super.visitPermittedSubclass(remapper.mapType(permittedSubclass)); } /** @@ -289,9 +287,25 @@ public class ClassRemapper extends ClassVisitor { * * @param annotationVisitor the AnnotationVisitor the remapper must delegate to. * @return the newly created remapper. + * @deprecated use {@link #createAnnotationRemapper(String, AnnotationVisitor)} instead. */ + @Deprecated protected AnnotationVisitor createAnnotationRemapper(final AnnotationVisitor annotationVisitor) { - return new AnnotationRemapper(api, annotationVisitor, remapper); + return new AnnotationRemapper(api, /* descriptor = */ null, annotationVisitor, remapper); + } + + /** + * Constructs a new remapper for annotations. The default implementation of this method returns a + * new {@link AnnotationRemapper}. + * + * @param descriptor the descriptor of the visited annotation. + * @param annotationVisitor the AnnotationVisitor the remapper must delegate to. + * @return the newly created remapper. + */ + protected AnnotationVisitor createAnnotationRemapper( + final String descriptor, final AnnotationVisitor annotationVisitor) { + return new AnnotationRemapper(api, descriptor, annotationVisitor, remapper) + .orDeprecatedValue(createAnnotationRemapper(annotationVisitor)); } /** @@ -317,3 +331,4 @@ public class ClassRemapper extends ClassVisitor { return new RecordComponentRemapper(api, recordComponentVisitor, remapper); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/CodeSizeEvaluator.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/CodeSizeEvaluator.java index 64595f3dace0ea8a2b97ea6737c187a84bcea842..dd9abb7e0bd9f338d343dba9ec60fd9e5ec75df2 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/CodeSizeEvaluator.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/CodeSizeEvaluator.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.ConstantDynamic; @@ -78,7 +79,7 @@ public class CodeSizeEvaluator extends MethodVisitor implements Opcodes { private int maxSize; public CodeSizeEvaluator(final MethodVisitor methodVisitor) { - this(/* latest api = */ Opcodes.ASM8, methodVisitor); + this(/* latest api = */ Opcodes.ASM9, methodVisitor); } protected CodeSizeEvaluator(final int api, final MethodVisitor methodVisitor) { @@ -236,3 +237,4 @@ public class CodeSizeEvaluator extends MethodVisitor implements Opcodes { super.visitMultiANewArrayInsn(descriptor, numDimensions); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/FieldRemapper.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/FieldRemapper.java index 54fea2e7720380ec79f57f638b0164b48c67354b..5f4f10a86d131d4ca0cc1e11fb123dbcf724dc57 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/FieldRemapper.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/FieldRemapper.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -77,20 +78,20 @@ public class FieldRemapper extends FieldVisitor { * Constructs a new {@link FieldRemapper}. Subclasses must not use this constructor. * Instead, they must use the {@link #FieldRemapper(int,FieldVisitor,Remapper)} version. * - * @param fieldVisitor the field visitor this remapper must deleted to. + * @param fieldVisitor the field visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited field. */ public FieldRemapper(final FieldVisitor fieldVisitor, final Remapper remapper) { - this(/* latest api = */ Opcodes.ASM8, fieldVisitor, remapper); + this(/* latest api = */ Opcodes.ASM9, fieldVisitor, remapper); } /** * Constructs a new {@link FieldRemapper}. * - * @param api the ASM API version supported by this remapper. Must be one of {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5}, {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link Opcodes#ASM8}. - * @param fieldVisitor the field visitor this remapper must deleted to. + * @param api the ASM API version supported by this remapper. Must be one of {@link Opcodes#ASM4}, + * {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link Opcodes#ASM8}, or + * {@link Opcodes#ASM9}. + * @param fieldVisitor the field visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited field. */ protected FieldRemapper(final int api, final FieldVisitor fieldVisitor, final Remapper remapper) { @@ -102,7 +103,9 @@ public class FieldRemapper extends FieldVisitor { public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitAnnotation(remapper.mapDesc(descriptor), visible); - return annotationVisitor == null ? null : createAnnotationRemapper(annotationVisitor); + return annotationVisitor == null + ? null + : createAnnotationRemapper(descriptor, annotationVisitor); } @Override @@ -110,7 +113,9 @@ public class FieldRemapper extends FieldVisitor { final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); - return annotationVisitor == null ? null : createAnnotationRemapper(annotationVisitor); + return annotationVisitor == null + ? null + : createAnnotationRemapper(descriptor, annotationVisitor); } /** @@ -119,8 +124,25 @@ public class FieldRemapper extends FieldVisitor { * * @param annotationVisitor the AnnotationVisitor the remapper must delegate to. * @return the newly created remapper. + * @deprecated use {@link #createAnnotationRemapper(String, AnnotationVisitor)} instead. */ + @Deprecated protected AnnotationVisitor createAnnotationRemapper(final AnnotationVisitor annotationVisitor) { - return new AnnotationRemapper(api, annotationVisitor, remapper); + return new AnnotationRemapper(api, /* descriptor = */ null, annotationVisitor, remapper); + } + + /** + * Constructs a new remapper for annotations. The default implementation of this method returns a + * new {@link AnnotationRemapper}. + * + * @param descriptor the descriptor of the visited annotation. + * @param annotationVisitor the AnnotationVisitor the remapper must delegate to. + * @return the newly created remapper. + */ + protected AnnotationVisitor createAnnotationRemapper( + final String descriptor, final AnnotationVisitor annotationVisitor) { + return new AnnotationRemapper(api, descriptor, annotationVisitor, remapper) + .orDeprecatedValue(createAnnotationRemapper(annotationVisitor)); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/GeneratorAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/GeneratorAdapter.java index 1a18fc5550ea1674d03286e02752c47abf9ebbf0..fa9d8ad593b1de4ba912a378e3c48c233b9a7870 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/GeneratorAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/GeneratorAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import java.util.ArrayList; @@ -232,7 +233,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { final int access, final String name, final String descriptor) { - this(/* latest api = */ Opcodes.ASM8, methodVisitor, access, name, descriptor); + this(/* latest api = */ Opcodes.ASM9, methodVisitor, access, name, descriptor); if (getClass() != GeneratorAdapter.class) { throw new IllegalStateException(); } @@ -242,8 +243,8 @@ public class GeneratorAdapter extends LocalVariablesSorter { * Constructs a new {@link GeneratorAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param methodVisitor the method visitor to which this adapter delegates calls. * @param access the method's access flags (see {@link Opcodes}). * @param name the method's name. @@ -1398,3 +1399,4 @@ public class GeneratorAdapter extends LocalVariablesSorter { mark(catchLabel); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java index ba150bf85830380975ce70922b81fc79cadab709..1e1f30d5db797524d33d8f688fcc5faf659b1ae7 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.ConstantDynamic; @@ -83,7 +84,7 @@ public class InstructionAdapter extends MethodVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public InstructionAdapter(final MethodVisitor methodVisitor) { - this(/* latest api = */ Opcodes.ASM8, methodVisitor); + this(/* latest api = */ Opcodes.ASM9, methodVisitor); if (getClass() != InstructionAdapter.class) { throw new IllegalStateException(); } @@ -93,8 +94,8 @@ public class InstructionAdapter extends MethodVisitor { * Constructs a new {@link InstructionAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param methodVisitor the method visitor to which this adapter delegates calls. */ protected InstructionAdapter(final int api, final MethodVisitor methodVisitor) { @@ -1121,7 +1122,7 @@ public class InstructionAdapter extends MethodVisitor { final String owner, final String name, final String descriptor, final boolean isInterface) { if (api < Opcodes.ASM5) { if (isInterface) { - throw new IllegalArgumentException("INVOKEVIRTUAL on interfaces require ASM 5"); + throw new UnsupportedOperationException("INVOKEVIRTUAL on interfaces require ASM 5"); } invokevirtual(owner, name, descriptor); return; @@ -1159,7 +1160,7 @@ public class InstructionAdapter extends MethodVisitor { final String owner, final String name, final String descriptor, final boolean isInterface) { if (api < Opcodes.ASM5) { if (isInterface) { - throw new IllegalArgumentException("INVOKESPECIAL on interfaces require ASM 5"); + throw new UnsupportedOperationException("INVOKESPECIAL on interfaces require ASM 5"); } invokespecial(owner, name, descriptor); return; @@ -1197,7 +1198,7 @@ public class InstructionAdapter extends MethodVisitor { final String owner, final String name, final String descriptor, final boolean isInterface) { if (api < Opcodes.ASM5) { if (isInterface) { - throw new IllegalArgumentException("INVOKESTATIC on interfaces require ASM 5"); + throw new UnsupportedOperationException("INVOKESTATIC on interfaces require ASM 5"); } invokestatic(owner, name, descriptor); return; @@ -1329,3 +1330,4 @@ public class InstructionAdapter extends MethodVisitor { mv.visitLabel(label); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/JSRInlinerAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/JSRInlinerAdapter.java index deb08e45ebb76086ffa48c3f105602157cb002e9..7ef4a5108bc3d5f8f167ed7862e1274464d9b1e7 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/JSRInlinerAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/JSRInlinerAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import java.util.AbstractMap; @@ -130,7 +131,7 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes { final String signature, final String[] exceptions) { this( - /* latest api = */ Opcodes.ASM8, + /* latest api = */ Opcodes.ASM9, methodVisitor, access, name, @@ -146,8 +147,8 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes { * Constructs a new {@link JSRInlinerAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param methodVisitor the method visitor to send the resulting inlined method code to, or * null. * @param access the method's access flags (see {@link Opcodes}). This parameter also indicates if @@ -600,3 +601,4 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/LocalVariablesSorter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/LocalVariablesSorter.java index c2df9e3c395864bffb46c300146a95bcce86c852..aab097156c0f444e9495a29905732613c5e52d81 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/LocalVariablesSorter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/LocalVariablesSorter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -112,7 +113,7 @@ public class LocalVariablesSorter extends MethodVisitor { */ public LocalVariablesSorter( final int access, final String descriptor, final MethodVisitor methodVisitor) { - this(/* latest api = */ Opcodes.ASM8, access, descriptor, methodVisitor); + this(/* latest api = */ Opcodes.ASM9, access, descriptor, methodVisitor); if (getClass() != LocalVariablesSorter.class) { throw new IllegalStateException(); } @@ -122,8 +123,8 @@ public class LocalVariablesSorter extends MethodVisitor { * Constructs a new {@link LocalVariablesSorter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param access access flags of the adapted method. * @param descriptor the method's descriptor (see {@link Type}). * @param methodVisitor the method visitor to which this adapter delegates calls. @@ -381,3 +382,4 @@ public class LocalVariablesSorter extends MethodVisitor { return local; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java index 16dc0d8375e068b265a71c4048de427742bf7eef..1fcab96f1813c872cf34032f06a14a96bfa1e453 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import java.util.HashMap; @@ -291,3 +292,4 @@ public class Method { return name.hashCode() ^ descriptor.hashCode(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/MethodRemapper.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/MethodRemapper.java index 29c4df3c6fc5f0b9bf9545ace0a56ff289ca3729..aaa7d3ffe01d2262718fcaeca8f9b0f1c66f27a6 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/MethodRemapper.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/MethodRemapper.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -79,21 +80,21 @@ public class MethodRemapper extends MethodVisitor { * Constructs a new {@link MethodRemapper}. Subclasses must not use this constructor. * Instead, they must use the {@link #MethodRemapper(int,MethodVisitor,Remapper)} version. * - * @param methodVisitor the method visitor this remapper must deleted to. + * @param methodVisitor the method visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited method. */ public MethodRemapper(final MethodVisitor methodVisitor, final Remapper remapper) { - this(/* latest api = */ Opcodes.ASM8, methodVisitor, remapper); + this(/* latest api = */ Opcodes.ASM9, methodVisitor, remapper); } /** * Constructs a new {@link MethodRemapper}. * * @param api the ASM API version supported by this remapper. Must be one of {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5} or {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7} or {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM8}. - * @param methodVisitor the method visitor this remapper must deleted to. + * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM8} or {@link jdk.internal.org.objectweb.asm.Opcodes#ASM9}. + * @param methodVisitor the method visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited method. */ protected MethodRemapper( @@ -107,7 +108,7 @@ public class MethodRemapper extends MethodVisitor { AnnotationVisitor annotationVisitor = super.visitAnnotationDefault(); return annotationVisitor == null ? annotationVisitor - : createAnnotationRemapper(annotationVisitor); + : createAnnotationRemapper(/* descriptor = */ null, annotationVisitor); } @Override @@ -116,7 +117,7 @@ public class MethodRemapper extends MethodVisitor { super.visitAnnotation(remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor - : createAnnotationRemapper(annotationVisitor); + : createAnnotationRemapper(descriptor, annotationVisitor); } @Override @@ -126,7 +127,7 @@ public class MethodRemapper extends MethodVisitor { super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor - : createAnnotationRemapper(annotationVisitor); + : createAnnotationRemapper(descriptor, annotationVisitor); } @Override @@ -136,7 +137,7 @@ public class MethodRemapper extends MethodVisitor { super.visitParameterAnnotation(parameter, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor - : createAnnotationRemapper(annotationVisitor); + : createAnnotationRemapper(descriptor, annotationVisitor); } @Override @@ -240,7 +241,7 @@ public class MethodRemapper extends MethodVisitor { super.visitInsnAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor - : createAnnotationRemapper(annotationVisitor); + : createAnnotationRemapper(descriptor, annotationVisitor); } @Override @@ -256,7 +257,7 @@ public class MethodRemapper extends MethodVisitor { super.visitTryCatchAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor - : createAnnotationRemapper(annotationVisitor); + : createAnnotationRemapper(descriptor, annotationVisitor); } @Override @@ -290,7 +291,7 @@ public class MethodRemapper extends MethodVisitor { typeRef, typePath, start, end, index, remapper.mapDesc(descriptor), visible); return annotationVisitor == null ? annotationVisitor - : createAnnotationRemapper(annotationVisitor); + : createAnnotationRemapper(descriptor, annotationVisitor); } /** @@ -299,8 +300,25 @@ public class MethodRemapper extends MethodVisitor { * * @param annotationVisitor the AnnotationVisitor the remapper must delegate to. * @return the newly created remapper. + * @deprecated use {@link #createAnnotationRemapper(String, AnnotationVisitor)} instead. */ + @Deprecated protected AnnotationVisitor createAnnotationRemapper(final AnnotationVisitor annotationVisitor) { - return new AnnotationRemapper(api, annotationVisitor, remapper); + return new AnnotationRemapper(api, /* descriptor = */ null, annotationVisitor, remapper); + } + + /** + * Constructs a new remapper for annotations. The default implementation of this method returns a + * new {@link AnnotationRemapper}. + * + * @param descriptor the descriptor of the visited annotation. + * @param annotationVisitor the AnnotationVisitor the remapper must delegate to. + * @return the newly created remapper. + */ + protected AnnotationVisitor createAnnotationRemapper( + final String descriptor, final AnnotationVisitor annotationVisitor) { + return new AnnotationRemapper(api, descriptor, annotationVisitor, remapper) + .orDeprecatedValue(createAnnotationRemapper(annotationVisitor)); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleHashesAttribute.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleHashesAttribute.java index 8786f195685efa06ca233ef73f9f171cfdb1d394..5b4cc253c39e8b589b05d836118e6916442e33fc 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleHashesAttribute.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleHashesAttribute.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import java.util.ArrayList; @@ -133,7 +134,7 @@ public final class ModuleHashesAttribute extends Attribute { currentOffset += 2; byte[] hash = new byte[hashLength]; for (int j = 0; j < hashLength; ++j) { - hash[j] = (byte) (classReader.readByte(currentOffset) & 0xFF); + hash[j] = (byte) classReader.readByte(currentOffset); currentOffset += 1; } hashList.add(hash); @@ -167,3 +168,4 @@ public final class ModuleHashesAttribute extends Attribute { return byteVector; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleRemapper.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleRemapper.java index fdfc7c48207d95bec867be10f8377e0f710812a5..f04e2f0322e059736fd91db2b551d2bec6d7dd5f 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleRemapper.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleRemapper.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.ModuleVisitor; @@ -75,11 +76,11 @@ public class ModuleRemapper extends ModuleVisitor { * Constructs a new {@link ModuleRemapper}. Subclasses must not use this constructor. * Instead, they must use the {@link #ModuleRemapper(int,ModuleVisitor,Remapper)} version. * - * @param moduleVisitor the module visitor this remapper must deleted to. + * @param moduleVisitor the module visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited module. */ public ModuleRemapper(final ModuleVisitor moduleVisitor, final Remapper remapper) { - this(/* latest api = */ Opcodes.ASM8, moduleVisitor, remapper); + this(/* latest api = */ Opcodes.ASM9, moduleVisitor, remapper); } /** @@ -87,9 +88,9 @@ public class ModuleRemapper extends ModuleVisitor { * * @param api the ASM API version supported by this remapper. Must be one of {@link * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5}, {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7} or {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM8}. - * @param moduleVisitor the module visitor this remapper must deleted to. + * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM8} or {@link jdk.internal.org.objectweb.asm.Opcodes#ASM9}. + * @param moduleVisitor the module visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited module. */ protected ModuleRemapper( @@ -151,3 +152,4 @@ public class ModuleRemapper extends ModuleVisitor { super.visitProvide(remapper.mapType(service), remappedProviders); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleResolutionAttribute.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleResolutionAttribute.java index f862ddcce8d0f0422f65e6e9567acc9ab0a8d5f9..8187ad30e0cc7ea6d52b856264a3bca1471c5a5b 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleResolutionAttribute.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleResolutionAttribute.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.Attribute; @@ -141,3 +142,4 @@ public final class ModuleResolutionAttribute extends Attribute { return byteVector; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleTargetAttribute.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleTargetAttribute.java index 998adcf8b42f50fc44f39ca49b8e5ef7bea8ce16..4d92734a972e465ae23e152f68e0b8349c33e0fe 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleTargetAttribute.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/ModuleTargetAttribute.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.Attribute; @@ -115,3 +116,4 @@ public final class ModuleTargetAttribute extends Attribute { return byteVector; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RecordComponentRemapper.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RecordComponentRemapper.java index 531a371c5457ae1170d70bcecd849744103ce7ef..6974b05d71e8e0f08fda7a6c107967cc2cf79649 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RecordComponentRemapper.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RecordComponentRemapper.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -83,14 +84,14 @@ public class RecordComponentRemapper extends RecordComponentVisitor { */ public RecordComponentRemapper( final RecordComponentVisitor recordComponentVisitor, final Remapper remapper) { - this(/* latest api = */ Opcodes.ASM8, recordComponentVisitor, remapper); + this(/* latest api = */ Opcodes.ASM9, recordComponentVisitor, remapper); } /** * Constructs a new {@link RecordComponentRemapper}. * - * @param api the ASM API version supported by this remapper. Must be {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM8}. + * @param api the ASM API version supported by this remapper. Must be one of {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM8} or {@link jdk.internal.org.objectweb.asm.Opcodes#ASM9}. * @param recordComponentVisitor the record component visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited record component. */ @@ -104,7 +105,9 @@ public class RecordComponentRemapper extends RecordComponentVisitor { public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitAnnotation(remapper.mapDesc(descriptor), visible); - return annotationVisitor == null ? null : createAnnotationRemapper(annotationVisitor); + return annotationVisitor == null + ? null + : createAnnotationRemapper(descriptor, annotationVisitor); } @Override @@ -112,7 +115,9 @@ public class RecordComponentRemapper extends RecordComponentVisitor { final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { AnnotationVisitor annotationVisitor = super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); - return annotationVisitor == null ? null : createAnnotationRemapper(annotationVisitor); + return annotationVisitor == null + ? null + : createAnnotationRemapper(descriptor, annotationVisitor); } /** @@ -121,8 +126,25 @@ public class RecordComponentRemapper extends RecordComponentVisitor { * * @param annotationVisitor the AnnotationVisitor the remapper must delegate to. * @return the newly created remapper. + * @deprecated use {@link #createAnnotationRemapper(String, AnnotationVisitor)} instead. */ + @Deprecated protected AnnotationVisitor createAnnotationRemapper(final AnnotationVisitor annotationVisitor) { - return new AnnotationRemapper(api, annotationVisitor, remapper); + return new AnnotationRemapper(api, /* descriptor = */ null, annotationVisitor, remapper); + } + + /** + * Constructs a new remapper for annotations. The default implementation of this method returns a + * new {@link AnnotationRemapper}. + * + * @param descriptor the descriptor sof the visited annotation. + * @param annotationVisitor the AnnotationVisitor the remapper must delegate to. + * @return the newly created remapper. + */ + protected AnnotationVisitor createAnnotationRemapper( + final String descriptor, final AnnotationVisitor annotationVisitor) { + return new AnnotationRemapper(api, descriptor, annotationVisitor, remapper) + .orDeprecatedValue(createAnnotationRemapper(annotationVisitor)); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/Remapper.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/Remapper.java index de0e11889cc79b7eeffffca12a89f5a5fed5ae56..0439b4054e27c2f4921254410d631496e800ed36 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/Remapper.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/Remapper.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.ConstantDynamic; @@ -266,6 +267,18 @@ public abstract class Remapper { return new SignatureRemapper(signatureVisitor, this); } + /** + * Maps an annotation attribute name. The default implementation of this method returns the given + * name, unchanged. Subclasses can override. + * + * @param descriptor the descriptor of the annotation class. + * @param name the name of the annotation attribute. + * @return the new name of the annotation attribute. + */ + public String mapAnnotationAttributeName(final String descriptor, final String name) { + return name; + } + /** * Maps an inner class name to its new name. The default implementation of this method provides a * strategy that will work for inner classes produced by Java, but not necessarily other @@ -376,3 +389,4 @@ public abstract class Remapper { return internalName; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingAnnotationAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingAnnotationAdapter.java index 6347464f45532994022f68efd3864560169355b0..0f41cff5354c1fadd18bddbe1a41e47086454254 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingAnnotationAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingAnnotationAdapter.java @@ -74,7 +74,7 @@ public class RemappingAnnotationAdapter extends AnnotationVisitor { public RemappingAnnotationAdapter( final AnnotationVisitor annotationVisitor, final Remapper remapper) { - this(Opcodes.ASM6, annotationVisitor, remapper); + this(Opcodes.ASM9, annotationVisitor, remapper); } protected RemappingAnnotationAdapter( @@ -113,3 +113,4 @@ public class RemappingAnnotationAdapter extends AnnotationVisitor { : new RemappingAnnotationAdapter(annotationVisitor, remapper)); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingClassAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingClassAdapter.java deleted file mode 100644 index 11af9d0d9daa5eb418375ac2674f3ce6b168d91e..0000000000000000000000000000000000000000 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingClassAdapter.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * This file is available under and governed by the GNU General Public - * License version 2 only, as published by the Free Software Foundation. - * However, the following notice accompanied the original version of this - * file: - * - * ASM: a very small and fast Java bytecode manipulation framework - * Copyright (c) 2000-2011 INRIA, France Telecom - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ -package jdk.internal.org.objectweb.asm.commons; - -import jdk.internal.org.objectweb.asm.AnnotationVisitor; -import jdk.internal.org.objectweb.asm.ClassVisitor; -import jdk.internal.org.objectweb.asm.FieldVisitor; -import jdk.internal.org.objectweb.asm.MethodVisitor; -import jdk.internal.org.objectweb.asm.ModuleVisitor; -import jdk.internal.org.objectweb.asm.Opcodes; -import jdk.internal.org.objectweb.asm.TypePath; - -/** - * A {@link ClassVisitor} for type remapping. - * - * @deprecated use {@link ClassRemapper} instead. - * @author Eugene Kuleshov - */ -@Deprecated -public class RemappingClassAdapter extends ClassVisitor { - - protected final Remapper remapper; - - protected String className; - - public RemappingClassAdapter(final ClassVisitor classVisitor, final Remapper remapper) { - this(Opcodes.ASM6, classVisitor, remapper); - } - - protected RemappingClassAdapter( - final int api, final ClassVisitor classVisitor, final Remapper remapper) { - super(api, classVisitor); - this.remapper = remapper; - } - - @Override - public void visit( - final int version, - final int access, - final String name, - final String signature, - final String superName, - final String[] interfaces) { - this.className = name; - super.visit( - version, - access, - remapper.mapType(name), - remapper.mapSignature(signature, false), - remapper.mapType(superName), - interfaces == null ? null : remapper.mapTypes(interfaces)); - } - - @Override - public ModuleVisitor visitModule(final String name, final int flags, final String version) { - throw new RuntimeException("RemappingClassAdapter is deprecated, use ClassRemapper instead"); - } - - @Override - public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { - AnnotationVisitor annotationVisitor = - super.visitAnnotation(remapper.mapDesc(descriptor), visible); - return annotationVisitor == null ? null : createRemappingAnnotationAdapter(annotationVisitor); - } - - @Override - public AnnotationVisitor visitTypeAnnotation( - final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { - AnnotationVisitor annotationVisitor = - super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); - return annotationVisitor == null ? null : createRemappingAnnotationAdapter(annotationVisitor); - } - - @Override - public FieldVisitor visitField( - final int access, - final String name, - final String descriptor, - final String signature, - final Object value) { - FieldVisitor fieldVisitor = - super.visitField( - access, - remapper.mapFieldName(className, name, descriptor), - remapper.mapDesc(descriptor), - remapper.mapSignature(signature, true), - remapper.mapValue(value)); - return fieldVisitor == null ? null : createRemappingFieldAdapter(fieldVisitor); - } - - @Override - public MethodVisitor visitMethod( - final int access, - final String name, - final String descriptor, - final String signature, - final String[] exceptions) { - String newDescriptor = remapper.mapMethodDesc(descriptor); - MethodVisitor methodVisitor = - super.visitMethod( - access, - remapper.mapMethodName(className, name, descriptor), - newDescriptor, - remapper.mapSignature(signature, false), - exceptions == null ? null : remapper.mapTypes(exceptions)); - return methodVisitor == null - ? null - : createRemappingMethodAdapter(access, newDescriptor, methodVisitor); - } - - @Override - public void visitInnerClass( - final String name, final String outerName, final String innerName, final int access) { - super.visitInnerClass( - remapper.mapType(name), - outerName == null ? null : remapper.mapType(outerName), - innerName, - access); - } - - @Override - public void visitOuterClass(final String owner, final String name, final String descriptor) { - super.visitOuterClass( - remapper.mapType(owner), - name == null ? null : remapper.mapMethodName(owner, name, descriptor), - descriptor == null ? null : remapper.mapMethodDesc(descriptor)); - } - - protected FieldVisitor createRemappingFieldAdapter(final FieldVisitor fieldVisitor) { - return new RemappingFieldAdapter(fieldVisitor, remapper); - } - - protected MethodVisitor createRemappingMethodAdapter( - final int access, final String newDescriptor, final MethodVisitor methodVisitior) { - return new RemappingMethodAdapter(access, newDescriptor, methodVisitior, remapper); - } - - protected AnnotationVisitor createRemappingAnnotationAdapter(final AnnotationVisitor av) { - return new RemappingAnnotationAdapter(av, remapper); - } -} diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingFieldAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingFieldAdapter.java deleted file mode 100644 index 3fa8ccfb8991ebd2222c3f3c2c8a3b2309bd4543..0000000000000000000000000000000000000000 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingFieldAdapter.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * This file is available under and governed by the GNU General Public - * License version 2 only, as published by the Free Software Foundation. - * However, the following notice accompanied the original version of this - * file: - * - * ASM: a very small and fast Java bytecode manipulation framework - * Copyright (c) 2000-2011 INRIA, France Telecom - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ -package jdk.internal.org.objectweb.asm.commons; - -import jdk.internal.org.objectweb.asm.AnnotationVisitor; -import jdk.internal.org.objectweb.asm.FieldVisitor; -import jdk.internal.org.objectweb.asm.Opcodes; -import jdk.internal.org.objectweb.asm.TypePath; - -/** - * A {@link FieldVisitor} adapter for type remapping. - * - * @deprecated use {@link FieldRemapper} instead. - * @author Eugene Kuleshov - */ -@Deprecated -public class RemappingFieldAdapter extends FieldVisitor { - - private final Remapper remapper; - - public RemappingFieldAdapter(final FieldVisitor fieldVisitor, final Remapper remapper) { - this(Opcodes.ASM6, fieldVisitor, remapper); - } - - protected RemappingFieldAdapter( - final int api, final FieldVisitor fieldVisitor, final Remapper remapper) { - super(api, fieldVisitor); - this.remapper = remapper; - } - - @Override - public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { - AnnotationVisitor annotationVisitor = fv.visitAnnotation(remapper.mapDesc(descriptor), visible); - return annotationVisitor == null - ? null - : new RemappingAnnotationAdapter(annotationVisitor, remapper); - } - - @Override - public AnnotationVisitor visitTypeAnnotation( - final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { - AnnotationVisitor annotationVisitor = - super.visitTypeAnnotation(typeRef, typePath, remapper.mapDesc(descriptor), visible); - return annotationVisitor == null - ? null - : new RemappingAnnotationAdapter(annotationVisitor, remapper); - } -} diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingMethodAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingMethodAdapter.java index e9a4325300444a61a5bb43d7a67605b34a5b9074..68ad22a4793204aa4cef188a034d2c2889cb0efb 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingMethodAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingMethodAdapter.java @@ -81,7 +81,7 @@ public class RemappingMethodAdapter extends LocalVariablesSorter { final String descriptor, final MethodVisitor methodVisitor, final Remapper remapper) { - this(Opcodes.ASM6, access, descriptor, methodVisitor, remapper); + this(Opcodes.ASM9, access, descriptor, methodVisitor, remapper); } protected RemappingMethodAdapter( @@ -307,3 +307,4 @@ public class RemappingMethodAdapter extends LocalVariablesSorter { : new RemappingAnnotationAdapter(annotationVisitor, remapper); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingSignatureAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingSignatureAdapter.java deleted file mode 100644 index decfabd49e16fa033593e2792eafa14ca3116224..0000000000000000000000000000000000000000 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingSignatureAdapter.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * This file is available under and governed by the GNU General Public - * License version 2 only, as published by the Free Software Foundation. - * However, the following notice accompanied the original version of this - * file: - * - * ASM: a very small and fast Java bytecode manipulation framework - * Copyright (c) 2000-2011 INRIA, France Telecom - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ -package jdk.internal.org.objectweb.asm.commons; - -import jdk.internal.org.objectweb.asm.Opcodes; -import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; - -/** - * A {@link SignatureVisitor} adapter for type mapping. - * - * @deprecated use {@link SignatureRemapper} instead. - * @author Eugene Kuleshov - */ -@Deprecated -public class RemappingSignatureAdapter extends SignatureVisitor { - - private final SignatureVisitor signatureVisitor; - - private final Remapper remapper; - - private String className; - - public RemappingSignatureAdapter( - final SignatureVisitor signatureVisitor, final Remapper remapper) { - this(Opcodes.ASM6, signatureVisitor, remapper); - } - - protected RemappingSignatureAdapter( - final int api, final SignatureVisitor signatureVisitor, final Remapper remapper) { - super(api); - this.signatureVisitor = signatureVisitor; - this.remapper = remapper; - } - - @Override - public void visitClassType(final String name) { - className = name; - signatureVisitor.visitClassType(remapper.mapType(name)); - } - - @Override - public void visitInnerClassType(final String name) { - String remappedOuter = remapper.mapType(className) + '$'; - className = className + '$' + name; - String remappedName = remapper.mapType(className); - int index = - remappedName.startsWith(remappedOuter) - ? remappedOuter.length() - : remappedName.lastIndexOf('$') + 1; - signatureVisitor.visitInnerClassType(remappedName.substring(index)); - } - - @Override - public void visitFormalTypeParameter(final String name) { - signatureVisitor.visitFormalTypeParameter(name); - } - - @Override - public void visitTypeVariable(final String name) { - signatureVisitor.visitTypeVariable(name); - } - - @Override - public SignatureVisitor visitArrayType() { - signatureVisitor.visitArrayType(); - return this; - } - - @Override - public void visitBaseType(final char descriptor) { - signatureVisitor.visitBaseType(descriptor); - } - - @Override - public SignatureVisitor visitClassBound() { - signatureVisitor.visitClassBound(); - return this; - } - - @Override - public SignatureVisitor visitExceptionType() { - signatureVisitor.visitExceptionType(); - return this; - } - - @Override - public SignatureVisitor visitInterface() { - signatureVisitor.visitInterface(); - return this; - } - - @Override - public SignatureVisitor visitInterfaceBound() { - signatureVisitor.visitInterfaceBound(); - return this; - } - - @Override - public SignatureVisitor visitParameterType() { - signatureVisitor.visitParameterType(); - return this; - } - - @Override - public SignatureVisitor visitReturnType() { - signatureVisitor.visitReturnType(); - return this; - } - - @Override - public SignatureVisitor visitSuperclass() { - signatureVisitor.visitSuperclass(); - return this; - } - - @Override - public void visitTypeArgument() { - signatureVisitor.visitTypeArgument(); - } - - @Override - public SignatureVisitor visitTypeArgument(final char wildcard) { - signatureVisitor.visitTypeArgument(wildcard); - return this; - } - - @Override - public void visitEnd() { - signatureVisitor.visitEnd(); - } -} diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java index 727a5ff3c14b5c8bd043ac441121a24d33340e84..74c7542a2704bf8de19917a02f65dd7b2fcc1e39 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import java.io.ByteArrayOutputStream; @@ -181,7 +182,7 @@ public class SerialVersionUIDAdder extends ClassVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public SerialVersionUIDAdder(final ClassVisitor classVisitor) { - this(/* latest api = */ Opcodes.ASM8, classVisitor); + this(/* latest api = */ Opcodes.ASM9, classVisitor); if (getClass() != SerialVersionUIDAdder.class) { throw new IllegalStateException(); } @@ -191,8 +192,8 @@ public class SerialVersionUIDAdder extends ClassVisitor { * Constructs a new {@link SerialVersionUIDAdder}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param classVisitor a {@link ClassVisitor} to which this visitor will delegate calls. */ protected SerialVersionUIDAdder(final int api, final ClassVisitor classVisitor) { @@ -349,7 +350,7 @@ public class SerialVersionUIDAdder extends ClassVisitor { } /** - * Adds a static final serialVersionUID field to the class, with the given value. + * Adds a final static serialVersionUID field to the class, with the given value. * * @param svuid the serialVersionUID field value. */ @@ -522,3 +523,4 @@ public class SerialVersionUIDAdder extends ClassVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SignatureRemapper.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SignatureRemapper.java index 0de4b5630f03aa632b68cafcf9e02b7d0082ec56..81209e1bd643e6783dcba6ad38715c46c8a40d40 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SignatureRemapper.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SignatureRemapper.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import java.util.ArrayList; @@ -79,11 +80,11 @@ public class SignatureRemapper extends SignatureVisitor { * Constructs a new {@link SignatureRemapper}. Subclasses must not use this constructor. * Instead, they must use the {@link #SignatureRemapper(int,SignatureVisitor,Remapper)} version. * - * @param signatureVisitor the signature visitor this remapper must deleted to. + * @param signatureVisitor the signature visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited signature. */ public SignatureRemapper(final SignatureVisitor signatureVisitor, final Remapper remapper) { - this(/* latest api = */ Opcodes.ASM8, signatureVisitor, remapper); + this(/* latest api = */ Opcodes.ASM9, signatureVisitor, remapper); } /** @@ -91,9 +92,9 @@ public class SignatureRemapper extends SignatureVisitor { * * @param api the ASM API version supported by this remapper. Must be one of {@link * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5},{@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7} or {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM8}. - * @param signatureVisitor the signature visitor this remapper must deleted to. + * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM8} or {@link jdk.internal.org.objectweb.asm.Opcodes#ASM9}. + * @param signatureVisitor the signature visitor this remapper must delegate to. * @param remapper the remapper to use to remap the types in the visited signature. */ protected SignatureRemapper( @@ -203,3 +204,4 @@ public class SignatureRemapper extends SignatureVisitor { classNames.remove(classNames.size() - 1); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SimpleRemapper.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SimpleRemapper.java index 3e166379f6b7c6a8f6074a131578275c72d403f0..314738e3b2e94dd7ee9822230dc8ae9b53c79044 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SimpleRemapper.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SimpleRemapper.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import java.util.Collections; @@ -80,8 +81,9 @@ public class SimpleRemapper extends Remapper { * name. *
    • for invokedynamic method names, the key is the name and descriptor of the method (in * the form .<name><descriptor>), and the value is the new method name. - *
    • for field names, the key is the owner and name of the field (in the form - * <owner>.<name>), and the value is the new field name. + *
    • for field and attribute names, the key is the owner and name of the field or + * attribute (in the form <owner>.<name>), and the value is the new field + * name. *
    • for internal names, the key is the old internal name, and the value is the new * internal name. *
    @@ -113,6 +115,12 @@ public class SimpleRemapper extends Remapper { return remappedName == null ? name : remappedName; } + @Override + public String mapAnnotationAttributeName(final String descriptor, final String name) { + String remappedName = map(descriptor + '.' + name); + return remappedName == null ? name : remappedName; + } + @Override public String mapFieldName(final String owner, final String name, final String descriptor) { String remappedName = map(owner + '.' + name); @@ -124,3 +132,4 @@ public class SimpleRemapper extends Remapper { return mapping.get(key); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/StaticInitMerger.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/StaticInitMerger.java index 3d803deb17db6e4358185fc85a1e8befaa0f860a..b92e721a55ec0dc6379cec52c951b9d2f5894563 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/StaticInitMerger.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/StaticInitMerger.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.ClassVisitor; @@ -92,15 +93,15 @@ public class StaticInitMerger extends ClassVisitor { * null. */ public StaticInitMerger(final String prefix, final ClassVisitor classVisitor) { - this(/* latest api = */ Opcodes.ASM8, prefix, classVisitor); + this(/* latest api = */ Opcodes.ASM9, prefix, classVisitor); } /** * Constructs a new {@link StaticInitMerger}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param prefix the prefix to use to rename the existing <clinit> methods. * @param classVisitor the class visitor to which this visitor must delegate method calls. May be * null. @@ -154,3 +155,4 @@ public class StaticInitMerger extends ClassVisitor { super.visitEnd(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/TableSwitchGenerator.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/TableSwitchGenerator.java index 2eecf0c3c7613f9f834e2f7d7eb01f9b44699d47..69db3287c40963d1b02e37f691b33d06ea91fc55 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/TableSwitchGenerator.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/TableSwitchGenerator.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import jdk.internal.org.objectweb.asm.Label; @@ -80,3 +81,4 @@ public interface TableSwitchGenerator { /** Generates the code for the default switch case. */ void generateDefault(); } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/TryCatchBlockSorter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/TryCatchBlockSorter.java index 61431f190df908e38ab7c4ce7a57af6fafb64666..f64766572d221e58aaecc758a4358f9b276ddd31 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/TryCatchBlockSorter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/TryCatchBlockSorter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.commons; import java.util.Collections; @@ -101,7 +102,7 @@ public class TryCatchBlockSorter extends MethodNode { final String signature, final String[] exceptions) { this( - /* latest api = */ Opcodes.ASM8, + /* latest api = */ Opcodes.ASM9, methodVisitor, access, name, @@ -154,3 +155,4 @@ public class TryCatchBlockSorter extends MethodNode { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureReader.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureReader.java index 29d451d7045898f58e207e733960537a0e6c4e0c..9870ea5f72bde6012f9c047b14eeaddf59d0a6bc 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureReader.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureReader.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.signature; /** @@ -281,3 +282,4 @@ public class SignatureReader { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureVisitor.java index 32600c7d5b4c911055f23fc6468e93e5a77470ca..cbfee22ecd8bb43fdf4f1a7d8410c1023b3a1880 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.signature; import jdk.internal.org.objectweb.asm.Opcodes; @@ -102,14 +103,13 @@ public abstract class SignatureVisitor { * @param api the ASM API version implemented by this visitor. Must be one of {@link * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ - @SuppressWarnings("deprecation") public SignatureVisitor(final int api) { - if (api != Opcodes.ASM8 + if (api != Opcodes.ASM9 + && api != Opcodes.ASM8 && api != Opcodes.ASM7 && api != Opcodes.ASM6 && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM9_EXPERIMENTAL) { + && api != Opcodes.ASM4) { throw new IllegalArgumentException("Unsupported api " + api); } this.api = api; @@ -238,3 +238,4 @@ public abstract class SignatureVisitor { /** Ends the visit of a signature corresponding to a class or interface type. */ public void visitEnd() {} } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureWriter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureWriter.java index 68f8b46cb86d4b4c7add8562f455c3e4dc3c7a55..eceaaee424c57d268f1b7651c390804e5c3ab8fd 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureWriter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureWriter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.signature; import jdk.internal.org.objectweb.asm.Opcodes; @@ -101,7 +102,7 @@ public class SignatureWriter extends SignatureVisitor { /** Constructs a new {@link SignatureWriter}. */ public SignatureWriter() { - super(/* latest api =*/ Opcodes.ASM8); + super(/* latest api =*/ Opcodes.ASM9); } // ----------------------------------------------------------------------------------------------- @@ -269,3 +270,4 @@ public class SignatureWriter extends SignatureVisitor { argumentStack /= 2; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/AbstractInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/AbstractInsnNode.java index 35bfd9bd42376d936ffcee9b0dc39b4770168b4f..28b17cecc2b7f7675c7ef5bd73b0124e76e1c978 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/AbstractInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/AbstractInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.ArrayList; @@ -294,3 +295,4 @@ public abstract class AbstractInsnNode { return this; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/AnnotationNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/AnnotationNode.java index b18690a667233c370867dd936263608fc3e8f76d..d6e874221f662e1be02aef16c4613e94190a0f2f 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/AnnotationNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/AnnotationNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.ArrayList; @@ -91,7 +92,7 @@ public class AnnotationNode extends AnnotationVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public AnnotationNode(final String descriptor) { - this(/* latest api = */ Opcodes.ASM8, descriptor); + this(/* latest api = */ Opcodes.ASM9, descriptor); if (getClass() != AnnotationNode.class) { throw new IllegalStateException(); } @@ -101,8 +102,8 @@ public class AnnotationNode extends AnnotationVisitor { * Constructs a new {@link AnnotationNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8} + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param descriptor the class descriptor of the annotation class. */ public AnnotationNode(final int api, final String descriptor) { @@ -116,7 +117,7 @@ public class AnnotationNode extends AnnotationVisitor { * @param values where the visited values must be stored. */ AnnotationNode(final List values) { - super(/* latest api = */ Opcodes.ASM8); + super(/* latest api = */ Opcodes.ASM9); this.values = values; } @@ -205,7 +206,7 @@ public class AnnotationNode extends AnnotationVisitor { * introduced in more recent versions of the ASM API than the given version. * * @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, - * {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link Opcodes#ASM8}. + * {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link Opcodes#ASM8} or {@link Opcodes#ASM9}. */ public void check(final int api) { // nothing to do @@ -260,3 +261,4 @@ public class AnnotationNode extends AnnotationVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ClassNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ClassNode.java index 1f12a83b639deef86f2a8174c86cb5dec4f5a03e..56bfc584b1a52b361f02d7e793b09fb8a4abdcfd 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ClassNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ClassNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.ArrayList; @@ -158,14 +159,8 @@ public class ClassNode extends ClassVisitor { /** The internal names of the nest members of this class. May be {@literal null}. */ public List nestMembers; - /** - * Experimental, use at your own risk. This method will be renamed when it becomes stable, this - * will break existing code using it. The internal names of the permitted subclasses of this - * class. May be {@literal null}. - * - * @deprecated this API is experimental. - */ - @Deprecated public List permittedSubclassesExperimental; + /** The internal names of the permitted subclasses of this class. May be {@literal null}. */ + public List permittedSubclasses; /** The record components of this class. May be {@literal null}. */ public List recordComponents; @@ -183,7 +178,7 @@ public class ClassNode extends ClassVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public ClassNode() { - this(Opcodes.ASM8); + this(Opcodes.ASM9); if (getClass() != ClassNode.class) { throw new IllegalStateException(); } @@ -193,8 +188,8 @@ public class ClassNode extends ClassVisitor { * Constructs a new {@link ClassNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8}, or {@link Opcodes#ASM9}. */ public ClassNode(final int api) { super(api); @@ -281,16 +276,9 @@ public class ClassNode extends ClassVisitor { nestMembers = Util.add(nestMembers, nestMember); } - /** - * Experimental, use at your own risk.. - * - * @param permittedSubclass the internal name of a permitted subclass. - * @deprecated this API is experimental. - */ @Override - @Deprecated - public void visitPermittedSubclassExperimental(final String permittedSubclass) { - permittedSubclassesExperimental = Util.add(permittedSubclassesExperimental, permittedSubclass); + public void visitPermittedSubclass(final String permittedSubclass) { + permittedSubclasses = Util.add(permittedSubclasses, permittedSubclass); } @Override @@ -347,11 +335,10 @@ public class ClassNode extends ClassVisitor { * in more recent versions of the ASM API than the given version. * * @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, - * {@link Opcodes#ASM6}, {@link Opcodes#ASM7}. or {@link Opcodes#ASM8}. + * {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link Opcodes#ASM8} or {@link Opcodes#ASM9}. */ - @SuppressWarnings("deprecation") public void check(final int api) { - if (api != Opcodes.ASM9_EXPERIMENTAL && permittedSubclassesExperimental != null) { + if (api < Opcodes.ASM9 && permittedSubclasses != null) { throw new UnsupportedClassVersionException(); } if (api < Opcodes.ASM8 && ((access & Opcodes.ACC_RECORD) != 0 || recordComponents != null)) { @@ -410,7 +397,6 @@ public class ClassNode extends ClassVisitor { * * @param classVisitor a class visitor. */ - @SuppressWarnings("deprecation") public void accept(final ClassVisitor classVisitor) { // Visit the header. String[] interfacesArray = new String[this.interfaces.size()]; @@ -473,10 +459,10 @@ public class ClassNode extends ClassVisitor { classVisitor.visitNestMember(nestMembers.get(i)); } } - // Visit the permitted subclass. - if (permittedSubclassesExperimental != null) { - for (int i = 0, n = permittedSubclassesExperimental.size(); i < n; ++i) { - classVisitor.visitPermittedSubclassExperimental(permittedSubclassesExperimental.get(i)); + // Visit the permitted subclasses. + if (permittedSubclasses != null) { + for (int i = 0, n = permittedSubclasses.size(); i < n; ++i) { + classVisitor.visitPermittedSubclass(permittedSubclasses.get(i)); } } // Visit the inner classes. @@ -500,3 +486,4 @@ public class ClassNode extends ClassVisitor { classVisitor.visitEnd(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FieldInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FieldInsnNode.java index a340f675c129c189f6bc4ed07001a5a8aada39e3..8dd491246e8cafe3db5d3bd8e3528fe781e74243 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FieldInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FieldInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -125,3 +126,4 @@ public class FieldInsnNode extends AbstractInsnNode { return new FieldInsnNode(opcode, owner, name, desc).cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FieldNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FieldNode.java index 93f03da4667657a2b52458507e33d0b7e24597b7..a5034342003d273216ab5982e8b050c58bd0da4f 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FieldNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FieldNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.List; @@ -130,7 +131,7 @@ public class FieldNode extends FieldVisitor { final String descriptor, final String signature, final Object value) { - this(/* latest api = */ Opcodes.ASM8, access, name, descriptor, signature, value); + this(/* latest api = */ Opcodes.ASM9, access, name, descriptor, signature, value); if (getClass() != FieldNode.class) { throw new IllegalStateException(); } @@ -140,8 +141,8 @@ public class FieldNode extends FieldVisitor { * Constructs a new {@link FieldNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param access the field's access flags (see {@link jdk.internal.org.objectweb.asm.Opcodes}). This parameter * also indicates if the field is synthetic and/or deprecated. * @param name the field's name. @@ -274,3 +275,4 @@ public class FieldNode extends FieldVisitor { fieldVisitor.visitEnd(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FrameNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FrameNode.java index aa929d00a4053536b6ebf4e5b2446a399f1d4e8c..cd4cc5c57adc0ae4da92e6e8d12ed9ac2298a5b4 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FrameNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/FrameNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.ArrayList; @@ -217,3 +218,4 @@ public class FrameNode extends AbstractInsnNode { return array; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/IincInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/IincInsnNode.java index a445a27e076ee08132eea0b23e58d0b64283a9e9..c3cdf60337cc428f8619d5ff19fad523b8f0be9a 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/IincInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/IincInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -103,3 +104,4 @@ public class IincInsnNode extends AbstractInsnNode { return new IincInsnNode(var, incr).cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InnerClassNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InnerClassNode.java index 129bbfa36ff555b570db889b76dda77fd633fc1e..7ab29379ca82288fa5cf839ded056cdeb4ce94df 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InnerClassNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InnerClassNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import jdk.internal.org.objectweb.asm.ClassVisitor; @@ -114,3 +115,4 @@ public class InnerClassNode { classVisitor.visitInnerClass(name, outerName, innerName, access); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InsnList.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InsnList.java index 4290c469e2f422285ebd2ac861724632aaeacbd7..a375eb0ce8849b2c79db0d30337da84a1db01d15 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InsnList.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InsnList.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.ListIterator; @@ -518,12 +519,19 @@ public class InsnList implements Iterable { AbstractInsnNode remove; InsnListIterator(final int index) { - if (index == size()) { + if (index < 0 || index > size()) { + throw new IndexOutOfBoundsException(); + } else if (index == size()) { nextInsn = null; previousInsn = getLast(); } else { - nextInsn = get(index); - previousInsn = nextInsn.previousInsn; + AbstractInsnNode currentInsn = getFirst(); + for (int i = 0; i < index; i++) { + currentInsn = currentInsn.nextInsn; + } + + nextInsn = currentInsn; + previousInsn = currentInsn.previousInsn; } } @@ -626,3 +634,4 @@ public class InsnList implements Iterable { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InsnNode.java index 6c231722a58454e0ec2661e291b397a23a136376..8fed9db1949e64c59b136b22407a9c8952ec878b 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -102,3 +103,4 @@ public class InsnNode extends AbstractInsnNode { return new InsnNode(opcode).cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/IntInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/IntInsnNode.java index 82f885c35a0494815786073eb936775669553494..5da8824ea995b79579a530cf09cd6a40fd7ffb81 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/IntInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/IntInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -108,3 +109,4 @@ public class IntInsnNode extends AbstractInsnNode { return new IntInsnNode(opcode, operand).cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InvokeDynamicInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InvokeDynamicInsnNode.java index 46878f23b5d535ccf24807fb766ab620b873b813..0d934f2ab73782936ead444e6e7e168d6d7efce1 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InvokeDynamicInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/InvokeDynamicInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -121,3 +122,4 @@ public class InvokeDynamicInsnNode extends AbstractInsnNode { return new InvokeDynamicInsnNode(name, desc, bsm, bsmArgs).cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/JumpInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/JumpInsnNode.java index e1f1eb28dd0dfac778ff5403ead98fd3fc033129..8790ff322465a38f660d159d4fce32d29515a276 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/JumpInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/JumpInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -116,3 +117,4 @@ public class JumpInsnNode extends AbstractInsnNode { return new JumpInsnNode(opcode, clone(label, clonedLabels)).cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LabelNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LabelNode.java index 182c54ce10e8c0f9ddfd42461050cbcd494bb0a2..6edcc0d99d10b95e2af3f9176ba77c97488c9e83 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LabelNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LabelNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -108,3 +109,4 @@ public class LabelNode extends AbstractInsnNode { value = null; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LdcInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LdcInsnNode.java index 23309524dcef65df1f109d890024a7d69050aa26..20eafcaa65631d1d499d023d186560cfbe85c4ad 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LdcInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LdcInsnNode.java @@ -56,11 +56,15 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; +import jdk.internal.org.objectweb.asm.ConstantDynamic; +import jdk.internal.org.objectweb.asm.Handle; import jdk.internal.org.objectweb.asm.MethodVisitor; import jdk.internal.org.objectweb.asm.Opcodes; +import jdk.internal.org.objectweb.asm.Type; /** * A node that represents an LDC instruction. @@ -70,17 +74,23 @@ import jdk.internal.org.objectweb.asm.Opcodes; public class LdcInsnNode extends AbstractInsnNode { /** - * The constant to be loaded on the stack. This parameter must be a non null {@link Integer}, a - * {@link Float}, a {@link Long}, a {@link Double}, a {@link String} or a {@link - * jdk.internal.org.objectweb.asm.Type}. + * The constant to be loaded on the stack. This field must be a non null {@link Integer}, a {@link + * Float}, a {@link Long}, a {@link Double}, a {@link String}, a {@link Type} of OBJECT or ARRAY + * sort for {@code .class} constants, for classes whose version is 49, a {@link Type} of METHOD + * sort for MethodType, a {@link Handle} for MethodHandle constants, for classes whose version is + * 51 or a {@link ConstantDynamic} for a constant dynamic for classes whose version is 55. */ public Object cst; /** * Constructs a new {@link LdcInsnNode}. * - * @param value the constant to be loaded on the stack. This parameter must be a non null {@link - * Integer}, a {@link Float}, a {@link Long}, a {@link Double} or a {@link String}. + * @param value the constant to be loaded on the stack. This parameter mist be a non null {@link + * Integer}, a {@link Float}, a {@link Long}, a {@link Double}, a {@link String}, a {@link + * Type} of OBJECT or ARRAY sort for {@code .class} constants, for classes whose version is + * 49, a {@link Type} of METHOD sort for MethodType, a {@link Handle} for MethodHandle + * constants, for classes whose version is 51 or a {@link ConstantDynamic} for a constant + * dynamic for classes whose version is 55. */ public LdcInsnNode(final Object value) { super(Opcodes.LDC); @@ -103,3 +113,4 @@ public class LdcInsnNode extends AbstractInsnNode { return new LdcInsnNode(cst).cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LineNumberNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LineNumberNode.java index 92cbac238384169395e779a368ce1b48d409f076..ac882ed778356d50fb4257c7560d24b88b4445e7 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LineNumberNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LineNumberNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -103,3 +104,4 @@ public class LineNumberNode extends AbstractInsnNode { return new LineNumberNode(line, clone(start, clonedLabels)); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableAnnotationNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableAnnotationNode.java index c17e80847c2358dd3ab3cd158ed12f8a43c2144e..54701d78214a23a7bde67fdeb040cf75108d81f0 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableAnnotationNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableAnnotationNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.List; @@ -114,15 +115,15 @@ public class LocalVariableAnnotationNode extends TypeAnnotationNode { final LabelNode[] end, final int[] index, final String descriptor) { - this(/* latest api = */ Opcodes.ASM8, typeRef, typePath, start, end, index, descriptor); + this(/* latest api = */ Opcodes.ASM9, typeRef, typePath, start, end, index, descriptor); } /** * Constructs a new {@link LocalVariableAnnotationNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param typeRef a reference to the annotated type. See {@link jdk.internal.org.objectweb.asm.TypeReference}. * @param start the fist instructions corresponding to the continuous ranges that make the scope * of this local variable (inclusive). @@ -169,3 +170,4 @@ public class LocalVariableAnnotationNode extends TypeAnnotationNode { typeRef, typePath, startLabels, endLabels, indices, desc, visible)); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableNode.java index 3a62f0e35c4aa8a3fb172216648715b0a6f9e2c3..142c5915a06cdc343eed0962c9234ebe61113a1e 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LocalVariableNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import jdk.internal.org.objectweb.asm.MethodVisitor; @@ -121,3 +122,4 @@ public class LocalVariableNode { name, desc, signature, start.getLabel(), end.getLabel(), index); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java index 73e0c633a64e781a629072e75c983d8e09e239de..513f2c06cfa6ca338be8b0343b6ee4732e930051 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/LookupSwitchInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.List; @@ -122,3 +123,4 @@ public class LookupSwitchInsnNode extends AbstractInsnNode { return clone.cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MethodInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MethodInsnNode.java index 0b6ff98c89b8eb3b4a4823f0dd7ce7e361de8107..9c5f40d6517bd5d4dc21c2a025863fc3ebc3bbc9 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MethodInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MethodInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -152,3 +153,4 @@ public class MethodInsnNode extends AbstractInsnNode { return new MethodInsnNode(opcode, owner, name, desc, itf).cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MethodNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MethodNode.java index 7161391b87e1f675d5fd69af46bb996fda04c00b..6af5c517fa9c9e40d186d82a0dc8dd4148462927 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MethodNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MethodNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.ArrayList; @@ -186,7 +187,7 @@ public class MethodNode extends MethodVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public MethodNode() { - this(/* latest api = */ Opcodes.ASM8); + this(/* latest api = */ Opcodes.ASM9); if (getClass() != MethodNode.class) { throw new IllegalStateException(); } @@ -196,8 +197,8 @@ public class MethodNode extends MethodVisitor { * Constructs an uninitialized {@link MethodNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. */ public MethodNode(final int api) { super(api); @@ -223,7 +224,7 @@ public class MethodNode extends MethodVisitor { final String descriptor, final String signature, final String[] exceptions) { - this(/* latest api = */ Opcodes.ASM8, access, name, descriptor, signature, exceptions); + this(/* latest api = */ Opcodes.ASM9, access, name, descriptor, signature, exceptions); if (getClass() != MethodNode.class) { throw new IllegalStateException(); } @@ -233,8 +234,8 @@ public class MethodNode extends MethodVisitor { * Constructs a new {@link MethodNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param access the method's access flags (see {@link Opcodes}). This parameter also indicates if * the method is synthetic and/or deprecated. * @param name the method's name. @@ -599,7 +600,7 @@ public class MethodNode extends MethodVisitor { * in more recent versions of the ASM API than the given version. * * @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, - * {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link Opcodes#ASM8}. + * {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link Opcodes#ASM8} or {@link Opcodes#ASM9}. */ public void check(final int api) { if (api == Opcodes.ASM4) { @@ -803,3 +804,4 @@ public class MethodNode extends MethodVisitor { methodVisitor.visitEnd(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleExportNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleExportNode.java index 9d872820da0c9c9885241cac11d7723d4c5995c6..094c2e19300b1ffd86a12035e5e4e98481ffc77c 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleExportNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleExportNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.List; @@ -108,3 +109,4 @@ public class ModuleExportNode { packaze, access, modules == null ? null : modules.toArray(new String[0])); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleNode.java index 8c48d4e8c9c8b22002e80f1332a923d853f6f7b7..fcb9db550f03fbf13c1c4d3f9a038321e0e35d05 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.ArrayList; @@ -115,7 +116,7 @@ public class ModuleNode extends ModuleVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public ModuleNode(final String name, final int access, final String version) { - super(/* latest api = */ Opcodes.ASM8); + super(/* latest api = */ Opcodes.ASM9); if (getClass() != ModuleNode.class) { throw new IllegalStateException(); } @@ -129,7 +130,7 @@ public class ModuleNode extends ModuleVisitor { * Constructs a {@link ModuleNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link Opcodes#ASM8}. + * Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param name the fully qualified name (using dots) of the module. * @param access the module access flags, among {@code ACC_OPEN}, {@code ACC_SYNTHETIC} and {@code * ACC_MANDATED}. @@ -264,3 +265,4 @@ public class ModuleNode extends ModuleVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleOpenNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleOpenNode.java index baecf6bf4e04578cbf7061e5a799c35381b2a8e1..afc453ef3b10588ca5202587c388416b9bd40add 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleOpenNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleOpenNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.List; @@ -108,3 +109,4 @@ public class ModuleOpenNode { packaze, access, modules == null ? null : modules.toArray(new String[0])); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleProvideNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleProvideNode.java index a191a43aa5aee617247173ceda7c6a761105f98a..3370aafe5f2cc3ae58d0c97bbe21318176aa9dc8 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleProvideNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleProvideNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.List; @@ -95,3 +96,4 @@ public class ModuleProvideNode { moduleVisitor.visitProvide(service, providers.toArray(new String[0])); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleRequireNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleRequireNode.java index 15ccc4a7bdca65e92ce1615617e7afe35dbfcd60..cec5ebcdbd23cf8a2592564a8190b4cabb1a35fd 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleRequireNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ModuleRequireNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import jdk.internal.org.objectweb.asm.ModuleVisitor; @@ -102,3 +103,4 @@ public class ModuleRequireNode { moduleVisitor.visitRequire(module, access, version); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MultiANewArrayInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MultiANewArrayInsnNode.java index fde74ab7f31f3dd55f194cb0663313efd69fe76d..201fb7652d6358afa712ee562848b5f0374c60d5 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MultiANewArrayInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/MultiANewArrayInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -103,3 +104,4 @@ public class MultiANewArrayInsnNode extends AbstractInsnNode { return new MultiANewArrayInsnNode(desc, dims).cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ParameterNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ParameterNode.java index 30b85c2f49b95f347dcd6a3e9ef8651f60f6b9c5..cb90eb6db5e8b0ec1abbc1c6f1c3002362f64e2e 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ParameterNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/ParameterNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import jdk.internal.org.objectweb.asm.MethodVisitor; @@ -97,3 +98,4 @@ public class ParameterNode { methodVisitor.visitParameter(name, access); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/RecordComponentNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/RecordComponentNode.java index 0c7f10eeeb9dbdef3709f918342516cff6b107e7..7eb919b7bbb5db75cf4f1aaad54ac6dafd839d14 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/RecordComponentNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/RecordComponentNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.List; @@ -107,7 +108,7 @@ public class RecordComponentNode extends RecordComponentVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public RecordComponentNode(final String name, final String descriptor, final String signature) { - this(/* latest api = */ Opcodes.ASM8, name, descriptor, signature); + this(/* latest api = */ Opcodes.ASM9, name, descriptor, signature); if (getClass() != RecordComponentNode.class) { throw new IllegalStateException(); } @@ -116,7 +117,8 @@ public class RecordComponentNode extends RecordComponentVisitor { /** * Constructs a new {@link RecordComponentNode}. * - * @param api the ASM API version implemented by this visitor. Must be {@link Opcodes#ASM8}. + * @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM8} + * or {@link Opcodes#ASM9}. * @param name the record component name. * @param descriptor the record component descriptor (see {@link jdk.internal.org.objectweb.asm.Type}). * @param signature the record component signature. @@ -175,7 +177,7 @@ public class RecordComponentNode extends RecordComponentVisitor { * method checks that this node, and all its children recursively, do not contain elements that * were introduced in more recent versions of the ASM API than the given version. * - * @param api an ASM API version. Must be {@link Opcodes#ASM8}. + * @param api an ASM API version. Must be one of {@link Opcodes#ASM8} or {@link Opcodes#ASM9}. */ public void check(final int api) { if (api < Opcodes.ASM8) { @@ -232,3 +234,4 @@ public class RecordComponentNode extends RecordComponentVisitor { recordComponentVisitor.visitEnd(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TableSwitchInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TableSwitchInsnNode.java index 1dbf92548a4bedaf154cc3ad07b47677a726b6e2..cabc1553c695d10c07e45da107a9447cf688a217 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TableSwitchInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TableSwitchInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.List; @@ -122,3 +123,4 @@ public class TableSwitchInsnNode extends AbstractInsnNode { .cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TryCatchBlockNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TryCatchBlockNode.java index e172cde4cc6bfe2b88a09989af885d5c534ff28b..fe033a5bc7c273306aaed6b139a98a2d40b801e8 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TryCatchBlockNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TryCatchBlockNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.List; @@ -155,3 +156,4 @@ public class TryCatchBlockNode { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TypeAnnotationNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TypeAnnotationNode.java index 83b34af13184a8a94f519dbb6f7776c81a5f594b..023882bca2d751127228ab01d86db2933cf6c1fd 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TypeAnnotationNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TypeAnnotationNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import jdk.internal.org.objectweb.asm.Opcodes; @@ -90,7 +91,7 @@ public class TypeAnnotationNode extends AnnotationNode { * @throws IllegalStateException If a subclass calls this constructor. */ public TypeAnnotationNode(final int typeRef, final TypePath typePath, final String descriptor) { - this(/* latest api = */ Opcodes.ASM8, typeRef, typePath, descriptor); + this(/* latest api = */ Opcodes.ASM9, typeRef, typePath, descriptor); if (getClass() != TypeAnnotationNode.class) { throw new IllegalStateException(); } @@ -100,8 +101,8 @@ public class TypeAnnotationNode extends AnnotationNode { * Constructs a new {@link AnnotationNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param typeRef a reference to the annotated type. See {@link jdk.internal.org.objectweb.asm.TypeReference}. * @param typePath the path to the annotated type argument, wildcard bound, array element type, or * static inner type within 'typeRef'. May be {@literal null} if the annotation targets @@ -115,3 +116,4 @@ public class TypeAnnotationNode extends AnnotationNode { this.typePath = typePath; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TypeInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TypeInsnNode.java index 1bc6f3275a3d70e45ad4c4a904c808cd642a9249..3ebdfab6ceedb00d6ec0e83fd48b56aee36ddaeb 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TypeInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/TypeInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -114,3 +115,4 @@ public class TypeInsnNode extends AbstractInsnNode { return new TypeInsnNode(opcode, desc).cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/UnsupportedClassVersionException.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/UnsupportedClassVersionException.java index 8eb50e4c055dd7064efa403782200104e9c00b21..17f9ebb2e35c739186e5a8ca26ae48a33ae5a065 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/UnsupportedClassVersionException.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/UnsupportedClassVersionException.java @@ -55,7 +55,8 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. - */package jdk.internal.org.objectweb.asm.tree; + */ +package jdk.internal.org.objectweb.asm.tree; /** * Exception thrown in {@link AnnotationNode#check}, {@link ClassNode#check}, {@link @@ -69,3 +70,4 @@ public class UnsupportedClassVersionException extends RuntimeException { private static final long serialVersionUID = -3502347765891805831L; } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/Util.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/Util.java index 38e30fa1340da0a88c3003c43a8c294989022898..eeb7261bb9a4810d259b36444c72815c35c4052d 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/Util.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/Util.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.ArrayList; @@ -192,3 +193,4 @@ final class Util { return list; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/VarInsnNode.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/VarInsnNode.java index 7c41463b09bc7911b9b7b2e018f7d4cb51ee9d1d..df6d834a6c0967ab6308037e888fa45872a1a77c 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/VarInsnNode.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/VarInsnNode.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree; import java.util.Map; @@ -111,3 +112,4 @@ public class VarInsnNode extends AbstractInsnNode { return new VarInsnNode(opcode, var).cloneAnnotations(this); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Analyzer.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Analyzer.java index 31b879291f3f39f95b7460c93abdff4c33bd6cbf..8c5e315ff0921b11f39886e83c69121e1760b746 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Analyzer.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Analyzer.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import java.util.ArrayList; @@ -124,7 +125,8 @@ public class Analyzer implements Opcodes { * Analyzes the given method. * * @param owner the internal name of the class to which 'method' belongs. - * @param method the method to be analyzed. + * @param method the method to be analyzed. The maxStack and maxLocals fields must have correct + * values. * @return the symbolic state of the execution stack frame at each bytecode instruction of the * method. The size of the returned array is equal to the number of instructions (and labels) * of the method. A given frame is {@literal null} if and only if the corresponding @@ -330,6 +332,74 @@ public class Analyzer implements Opcodes { return frames; } + /** + * Analyzes the given method and computes and sets its maximum stack size and maximum number of + * local variables. + * + * @param owner the internal name of the class to which 'method' belongs. + * @param method the method to be analyzed. + * @return the symbolic state of the execution stack frame at each bytecode instruction of the + * method. The size of the returned array is equal to the number of instructions (and labels) + * of the method. A given frame is {@literal null} if and only if the corresponding + * instruction cannot be reached (dead code). + * @throws AnalyzerException if a problem occurs during the analysis. + */ + public Frame[] analyzeAndComputeMaxs(final String owner, final MethodNode method) + throws AnalyzerException { + method.maxLocals = computeMaxLocals(method); + method.maxStack = -1; + analyze(owner, method); + method.maxStack = computeMaxStack(frames); + return frames; + } + + /** + * Computes and returns the maximum number of local variables used in the given method. + * + * @param method a method. + * @return the maximum number of local variables used in the given method. + */ + private static int computeMaxLocals(final MethodNode method) { + int maxLocals = Type.getArgumentsAndReturnSizes(method.desc) >> 2; + for (AbstractInsnNode insnNode : method.instructions) { + if (insnNode instanceof VarInsnNode) { + int local = ((VarInsnNode) insnNode).var; + int size = + (insnNode.getOpcode() == Opcodes.LLOAD + || insnNode.getOpcode() == Opcodes.DLOAD + || insnNode.getOpcode() == Opcodes.LSTORE + || insnNode.getOpcode() == Opcodes.DSTORE) + ? 2 + : 1; + maxLocals = Math.max(maxLocals, local + size); + } else if (insnNode instanceof IincInsnNode) { + int local = ((IincInsnNode) insnNode).var; + maxLocals = Math.max(maxLocals, local + 1); + } + } + return maxLocals; + } + + /** + * Computes and returns the maximum stack size of a method, given its stack map frames. + * + * @param frames the stack map frames of a method. + * @return the maximum stack size of the given method. + */ + private static int computeMaxStack(final Frame[] frames) { + int maxStack = 0; + for (Frame frame : frames) { + if (frame != null) { + int stackSize = 0; + for (int i = 0; i < frame.getStackSize(); ++i) { + stackSize += frame.getStack(i).getSize(); + } + maxStack = Math.max(maxStack, stackSize); + } + } + return maxStack; + } + /** * Follows the control flow graph of the currently analyzed method, starting at the given * instruction index, and stores a copy of the given subroutine in {@link #subroutines} for each @@ -632,3 +702,4 @@ public class Analyzer implements Opcodes { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java index c74f873a80c66c40c55c64c830bb93183f67f127..e3ea04720bed08f77a5c3f9ac5a33200c19db310 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode; @@ -118,3 +119,4 @@ public class AnalyzerException extends Exception { this.node = insn; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicInterpreter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicInterpreter.java index 0b7997e5092fcf3f9ea2e7f6d8403305ecf1ba86..d640e0a06f8aae9fc2b5e5e0d51ba130bd99251a 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicInterpreter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicInterpreter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import java.util.List; @@ -92,7 +93,7 @@ public class BasicInterpreter extends Interpreter implements Opcodes * version. */ public BasicInterpreter() { - super(/* latest api = */ ASM8); + super(/* latest api = */ ASM9); if (getClass() != BasicInterpreter.class) { throw new IllegalStateException(); } @@ -103,8 +104,8 @@ public class BasicInterpreter extends Interpreter implements Opcodes * * @param api the ASM API version supported by this interpreter. Must be one of {@link * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5}, {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7} or {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM8}. + * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM8} or {@link jdk.internal.org.objectweb.asm.Opcodes#ASM9}. */ protected BasicInterpreter(final int api) { super(api); @@ -406,3 +407,4 @@ public class BasicInterpreter extends Interpreter implements Opcodes return value1; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicValue.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicValue.java index fea4e140d0f0d0cffc34b338bb48281526b28c67..58b57120ebd5cb4813feee6dfac251957bef1e9f 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicValue.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicValue.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import jdk.internal.org.objectweb.asm.Type; @@ -158,3 +159,4 @@ public class BasicValue implements Value { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicVerifier.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicVerifier.java index dd89834c3c5fb3b43767c60d69f37643921ea637..7a3b6b8ab634e63127bec40975cf94257b78123b 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicVerifier.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicVerifier.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import java.util.List; @@ -78,7 +79,7 @@ public class BasicVerifier extends BasicInterpreter { * use this constructor. Instead, they must use the {@link #BasicVerifier(int)} version. */ public BasicVerifier() { - super(/* latest api = */ ASM8); + super(/* latest api = */ ASM9); if (getClass() != BasicVerifier.class) { throw new IllegalStateException(); } @@ -89,8 +90,8 @@ public class BasicVerifier extends BasicInterpreter { * * @param api the ASM API version supported by this interpreter. Must be one of {@link * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5}, {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7} or {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM8}. + * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM8} or or {@link jdk.internal.org.objectweb.asm.Opcodes#ASM9}. */ protected BasicVerifier(final int api) { super(api); @@ -480,3 +481,4 @@ public class BasicVerifier extends BasicInterpreter { return value.equals(expected); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Frame.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Frame.java index 1e57017c7046de2fe966ecc234b5135fc1ae64ec..ddb477d6f7b4819621f6a6ee973890f84e2918df 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Frame.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Frame.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import java.util.ArrayList; @@ -80,6 +81,9 @@ import jdk.internal.org.objectweb.asm.tree.VarInsnNode; */ public class Frame { + /** The maximum size of the operand stack of any method. */ + private static final int MAX_STACK_SIZE = 65536; + /** * The expected return type of the analyzed method, or {@literal null} if the method returns void. */ @@ -88,26 +92,43 @@ public class Frame { /** * The local variables and the operand stack of this frame. The first {@link #numLocals} elements * correspond to the local variables. The following {@link #numStack} elements correspond to the - * operand stack. + * operand stack. Long and double values are represented with two elements in the local variables + * section, and with one element in the operand stack section. */ private V[] values; - /** The number of local variables of this frame. */ + /** + * The number of local variables of this frame. Long and double values are represented with two + * elements. + */ private int numLocals; - /** The number of elements in the operand stack. */ + /** + * The number of elements in the operand stack. Long and double values are represented with a + * single element. + */ private int numStack; + /** + * The maximum number of elements in the operand stack. Long and double values are represented + * with a single element. + */ + private int maxStack; + /** * Constructs a new frame with the given size. * - * @param numLocals the maximum number of local variables of the frame. - * @param numStack the maximum stack size of the frame. + * @param numLocals the number of local variables of the frame. Long and double values are + * represented with two elements. + * @param maxStack the maximum number of elements in the operand stack, or -1 if there is no + * maximum value. Long and double values are represented with a single element. */ @SuppressWarnings("unchecked") - public Frame(final int numLocals, final int numStack) { - this.values = (V[]) new Value[numLocals + numStack]; + public Frame(final int numLocals, final int maxStack) { + this.values = (V[]) new Value[numLocals + (maxStack >= 0 ? maxStack : 4)]; this.numLocals = numLocals; + this.numStack = 0; + this.maxStack = maxStack >= 0 ? maxStack : MAX_STACK_SIZE; } /** @@ -128,8 +149,14 @@ public class Frame { */ public Frame init(final Frame frame) { returnValue = frame.returnValue; - System.arraycopy(frame.values, 0, values, 0, values.length); + if (values.length < frame.values.length) { + values = frame.values.clone(); + } else { + System.arraycopy(frame.values, 0, values, 0, frame.values.length); + } + numLocals = frame.numLocals; numStack = frame.numStack; + maxStack = frame.maxStack; return this; } @@ -166,7 +193,8 @@ public class Frame { } /** - * Returns the maximum number of local variables of this frame. + * Returns the maximum number of local variables of this frame. Long and double values are + * represented with two variables. * * @return the maximum number of local variables of this frame. */ @@ -175,16 +203,18 @@ public class Frame { } /** - * Returns the maximum stack size of this frame. + * Returns the maximum number of elements in the operand stack of this frame. Long and double + * values are represented with a single element. * - * @return the maximum stack size of this frame. + * @return the maximum number of elements in the operand stack of this frame. */ public int getMaxStackSize() { - return values.length - numLocals; + return maxStack; } /** - * Returns the value of the given local variable. + * Returns the value of the given local variable. Long and double values are represented with two + * variables. * * @param index a local variable index. * @return the value of the given local variable. @@ -198,7 +228,8 @@ public class Frame { } /** - * Sets the value of the given local variable. + * Sets the value of the given local variable. Long and double values are represented with two + * variables. * * @param index a local variable index. * @param value the new value of this local variable. @@ -212,10 +243,10 @@ public class Frame { } /** - * Returns the number of values in the operand stack of this frame. Long and double values are - * treated as single values. + * Returns the number of elements in the operand stack of this frame. Long and double values are + * represented with a single element. * - * @return the number of values in the operand stack of this frame. + * @return the number of elements in the operand stack of this frame. */ public int getStackSize() { return numStack; @@ -267,9 +298,15 @@ public class Frame { * @param value the value that must be pushed into the stack. * @throws IndexOutOfBoundsException if the operand stack is full. */ + @SuppressWarnings("unchecked") public void push(final V value) { if (numLocals + numStack >= values.length) { - throw new IndexOutOfBoundsException("Insufficient maximum stack size."); + if (numLocals + numStack >= maxStack) { + throw new IndexOutOfBoundsException("Insufficient maximum stack size."); + } + V[] oldValues = values; + values = (V[]) new Value[2 * values.length]; + System.arraycopy(oldValues, 0, values, 0, oldValues.length); } values[numLocals + (numStack++)] = value; } @@ -745,3 +782,4 @@ public class Frame { return stringBuilder.toString(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Interpreter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Interpreter.java index d9b722e098e67759f16b017b12200decd5938b4e..ed8deff40224b121b25e911c63d287bc6d8e52a9 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Interpreter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Interpreter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import java.util.List; @@ -297,3 +298,4 @@ public abstract class Interpreter { */ public abstract V merge(V value1, V value2); } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SimpleVerifier.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SimpleVerifier.java index 0e14dcc986419655d5c829d0108c7580140fe9dc..cb426dea3988a0f6fa9fb98bdfd766947dc6742d 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SimpleVerifier.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SimpleVerifier.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import java.util.List; @@ -125,7 +126,7 @@ public class SimpleVerifier extends BasicVerifier { final List currentClassInterfaces, final boolean isInterface) { this( - /* latest api = */ ASM8, + /* latest api = */ ASM9, currentClass, currentSuperClass, currentClassInterfaces, @@ -141,8 +142,8 @@ public class SimpleVerifier extends BasicVerifier { * * @param api the ASM API version supported by this verifier. Must be one of {@link * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5}, {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7} or {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM8}. + * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM8} or or {@link jdk.internal.org.objectweb.asm.Opcodes#ASM9}. * @param currentClass the type of the class to be verified. * @param currentSuperClass the type of the super class of the class to be verified. * @param currentClassInterfaces the types of the interfaces directly implemented by the class to @@ -411,3 +412,4 @@ public class SimpleVerifier extends BasicVerifier { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SmallSet.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SmallSet.java index 6f8ad5621bcb870cde19d73c661f3146ded4bff7..099a73779444c1ec9574810e1ba9098fbde07429 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SmallSet.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SmallSet.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import java.util.AbstractSet; @@ -227,3 +228,4 @@ final class SmallSet extends AbstractSet { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SourceInterpreter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SourceInterpreter.java index 786aed688ca38fa157fad865bbd9f438a7833a64..bb242af2ff53ef75281bcbb6aa2c41db71026ad1 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SourceInterpreter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SourceInterpreter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import java.util.HashSet; @@ -82,7 +83,7 @@ public class SourceInterpreter extends Interpreter implements Opcod * version. */ public SourceInterpreter() { - super(/* latest api = */ ASM8); + super(/* latest api = */ ASM9); if (getClass() != SourceInterpreter.class) { throw new IllegalStateException(); } @@ -93,8 +94,8 @@ public class SourceInterpreter extends Interpreter implements Opcod * * @param api the ASM API version supported by this interpreter. Must be one of {@link * jdk.internal.org.objectweb.asm.Opcodes#ASM4}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM5}, {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7} or {@link - * jdk.internal.org.objectweb.asm.Opcodes#ASM8}. + * jdk.internal.org.objectweb.asm.Opcodes#ASM6}, {@link jdk.internal.org.objectweb.asm.Opcodes#ASM7}, {@link + * jdk.internal.org.objectweb.asm.Opcodes#ASM8} or or {@link jdk.internal.org.objectweb.asm.Opcodes#ASM9}. */ protected SourceInterpreter(final int api) { super(api); @@ -251,3 +252,4 @@ public class SourceInterpreter extends Interpreter implements Opcod return self.containsAll(other); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SourceValue.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SourceValue.java index eb0f619b913d5218f97e71bc8ce379d863f5dcf3..926c2c2831426c21ae78706f5464890fdb8c6311 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SourceValue.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/SourceValue.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import java.util.Set; @@ -148,3 +149,4 @@ public class SourceValue implements Value { return insns.hashCode(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Subroutine.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Subroutine.java index 1b38879edb15242bde5e122bd0e32da9268d1c11..f59644795d715ccc707048789675384dd2d88699 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Subroutine.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Subroutine.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; import java.util.ArrayList; @@ -135,3 +136,4 @@ final class Subroutine { return changed; } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Value.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Value.java index 5c8f0c97c17bc3cf5969405f693e57e22cdfe328..450120c741a80bec53e6678faba0f648038179fa 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Value.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Value.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.tree.analysis; /** @@ -73,3 +74,4 @@ public interface Value { */ int getSize(); } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifiable.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifiable.java deleted file mode 100644 index 541f145a0f593d42c1e59d1643c715497fb64aa2..0000000000000000000000000000000000000000 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifiable.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * This file is available under and governed by the GNU General Public - * License version 2 only, as published by the Free Software Foundation. - * However, the following notice accompanied the original version of this - * file: - * - * ASM: a very small and fast Java bytecode manipulation framework - * Copyright (c) 2000-2011 INRIA, France Telecom - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ -package jdk.internal.org.objectweb.asm.util; - -import java.util.Map; -import jdk.internal.org.objectweb.asm.Label; - -/** - * An {@link jdk.internal.org.objectweb.asm.Attribute} that can generate the ASM code to create an equivalent - * attribute. - * - * @author Eugene Kuleshov - */ -// DontCheck(AbbreviationAsWordInName): can't be renamed (for backward binary compatibility). -public interface ASMifiable { - - /** - * Generates the ASM code to create an attribute equal to this attribute. - * - * @param outputBuffer where the generated code must be appended. - * @param visitorVariableName the name of the visitor variable in the produced code. - * @param labelNames the names of the labels in the generated code. - */ - void asmify(StringBuffer outputBuffer, String visitorVariableName, Map labelNames); -} diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java index b6d0267e74847beaae8274838471f00e00dbdd76..3db7eba438beb53dd486ccd144a8d1199f963a63 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import java.io.IOException; @@ -84,7 +85,7 @@ public class ASMifier extends Printer { /** The help message shown when command line arguments are incorrect. */ private static final String USAGE = "Prints the ASM code to generate the given class.\n" - + "Usage: ASMifier [-debug] "; + + "Usage: ASMifier [-nodebug] "; /** A pseudo access flag used to distinguish class access flags. */ private static final int ACCESS_CLASS = 0x40000; @@ -136,6 +137,9 @@ public class ASMifier extends Printer { classVersions.put(Opcodes.V13, "V13"); classVersions.put(Opcodes.V14, "V14"); classVersions.put(Opcodes.V15, "V15"); + classVersions.put(Opcodes.V16, "V16"); + classVersions.put(Opcodes.V17, "V17"); + classVersions.put(Opcodes.V18, "V18"); CLASS_VERSIONS = Collections.unmodifiableMap(classVersions); } @@ -155,7 +159,7 @@ public class ASMifier extends Printer { * @throws IllegalStateException If a subclass calls this constructor. */ public ASMifier() { - this(/* latest api = */ Opcodes.ASM8, "classWriter", 0); + this(/* latest api = */ Opcodes.ASM9, "classWriter", 0); if (getClass() != ASMifier.class) { throw new IllegalStateException(); } @@ -165,7 +169,8 @@ public class ASMifier extends Printer { * Constructs a new {@link ASMifier}. * * @param api the ASM API version implemented by this class. Must be one of {@link Opcodes#ASM4}, - * {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link Opcodes#ASM8}. + * {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link Opcodes#ASM8} or + * {@link Opcodes#ASM9}. * @param visitorVariableName the name of the visitor variable in the produced code. * @param annotationVisitorId identifier of the annotation visitor variable in the produced code. */ @@ -179,7 +184,7 @@ public class ASMifier extends Printer { /** * Prints the ASM source code to generate the given class to the standard output. * - *

    Usage: ASMifier [-debug] <binary class name or class file name> + *

    Usage: ASMifier [-nodebug] <binary class name or class file name> * * @param args the command line arguments. * @throws IOException if the class cannot be found, or if an IOException occurs. @@ -191,7 +196,7 @@ public class ASMifier extends Printer { /** * Prints the ASM source code to generate the given class to the given output. * - *

    Usage: ASMifier [-debug] <binary class name or class file name> + *

    Usage: ASMifier [-nodebug] <binary class name or class file name> * * @param args the command line arguments. * @param output where to print the result. @@ -354,17 +359,10 @@ public class ASMifier extends Printer { text.add(stringBuilder.toString()); } - /** - * Experimental, use at your own risk.. - * - * @param permittedSubclass the internal name of a permitted subclass. - * @deprecated this API is experimental. - */ @Override - @Deprecated - public void visitPermittedSubclassExperimental(final String permittedSubclass) { + public void visitPermittedSubclass(final String permittedSubclass) { stringBuilder.setLength(0); - stringBuilder.append("classWriter.visitPermittedSubclassExperimental("); + stringBuilder.append("classWriter.visitPermittedSubclass("); appendConstant(permittedSubclass); stringBuilder.append(END_PARAMETERS); text.add(stringBuilder.toString()); @@ -664,9 +662,7 @@ public class ASMifier extends Printer { @Override public void visitRecordComponentEnd() { - stringBuilder.setLength(0); - stringBuilder.append(name).append(VISIT_END); - text.add(stringBuilder.toString()); + visitMemberEnd(); } // ----------------------------------------------------------------------------------------------- @@ -691,9 +687,7 @@ public class ASMifier extends Printer { @Override public void visitFieldEnd() { - stringBuilder.setLength(0); - stringBuilder.append(name).append(VISIT_END); - text.add(stringBuilder.toString()); + visitMemberEnd(); } // ----------------------------------------------------------------------------------------------- @@ -1166,9 +1160,7 @@ public class ASMifier extends Printer { @Override public void visitMethodEnd() { - stringBuilder.setLength(0); - stringBuilder.append(name).append(VISIT_END); - text.add(stringBuilder.toString()); + visitMemberEnd(); } // ----------------------------------------------------------------------------------------------- @@ -1278,6 +1270,13 @@ public class ASMifier extends Printer { text.add(stringBuilder.toString()); } + /** Visits the end of a field, record component or method. */ + private void visitMemberEnd() { + stringBuilder.setLength(0); + stringBuilder.append(name).append(VISIT_END); + text.add(stringBuilder.toString()); + } + // ----------------------------------------------------------------------------------------------- // Utility methods // ----------------------------------------------------------------------------------------------- @@ -1645,3 +1644,4 @@ public class ASMifier extends Printer { stringBuilder.append(labelNames.get(label)); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifierSupport.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifierSupport.java index b399fb27d5833a58a967c933598456804936e3ae..956938394a4d7e575cee4d6cebd6c534d3624d33 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifierSupport.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/ASMifierSupport.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import java.util.Map; @@ -80,3 +81,4 @@ public interface ASMifierSupport { void asmify( StringBuilder outputBuilder, String visitorVariableName, Map labelNames); } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckAnnotationAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckAnnotationAdapter.java index 07634756103b3c698ff39817ad51420b621b55d1..b3d21f5ae997d56fb87340c2c0f05854a0b9e94b 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckAnnotationAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckAnnotationAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -83,7 +84,7 @@ public class CheckAnnotationAdapter extends AnnotationVisitor { } CheckAnnotationAdapter(final AnnotationVisitor annotationVisitor, final boolean useNamedValues) { - super(/* latest api = */ Opcodes.ASM8, annotationVisitor); + super(/* latest api = */ Opcodes.ASM9, annotationVisitor); this.useNamedValue = useNamedValues; } @@ -164,3 +165,4 @@ public class CheckAnnotationAdapter extends AnnotationVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java index 4de5d38ae4ead3978466701de38a1198a369988c..a25280570077866adc4bba4c4cb53cce4bfb2a0a 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import java.io.FileInputStream; @@ -205,7 +206,7 @@ public class CheckClassAdapter extends ClassVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public CheckClassAdapter(final ClassVisitor classVisitor, final boolean checkDataFlow) { - this(/* latest api = */ Opcodes.ASM8, classVisitor, checkDataFlow); + this(/* latest api = */ Opcodes.ASM9, classVisitor, checkDataFlow); if (getClass() != CheckClassAdapter.class) { throw new IllegalStateException(); } @@ -215,8 +216,8 @@ public class CheckClassAdapter extends ClassVisitor { * Constructs a new {@link CheckClassAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param classVisitor the class visitor to which this adapter must delegate calls. * @param checkDataFlow {@literal true} to perform basic data flow checks, or {@literal false} to * not perform any data flow check (see {@link CheckMethodAdapter}). This option requires @@ -353,18 +354,11 @@ public class CheckClassAdapter extends ClassVisitor { super.visitNestMember(nestMember); } - /** - * Experimental, use at your own risk.. - * - * @param permittedSubclass the internal name of a permitted subclass. - * @deprecated this API is experimental. - */ @Override - @Deprecated - public void visitPermittedSubclassExperimental(final String permittedSubclass) { + public void visitPermittedSubclass(final String permittedSubclass) { checkState(); CheckMethodAdapter.checkInternalName(version, permittedSubclass, "permittedSubclass"); - super.visitPermittedSubclassExperimental(permittedSubclass); + super.visitPermittedSubclass(permittedSubclass); } @Override @@ -468,7 +462,8 @@ public class CheckClassAdapter extends ClassVisitor { final String signature, final String[] exceptions) { checkState(); - checkAccess( + checkMethodAccess( + version, access, Opcodes.ACC_PUBLIC | Opcodes.ACC_PRIVATE @@ -593,6 +588,23 @@ public class CheckClassAdapter extends ClassVisitor { } } + /** + * Checks that the given access flags do not contain invalid flags for a method. This method also + * checks that mutually incompatible flags are not set simultaneously. + * + * @param version the class version. + * @param access the method access flags to be checked. + * @param possibleAccess the valid access flags. + */ + private static void checkMethodAccess( + final int version, final int access, final int possibleAccess) { + checkAccess(access, possibleAccess); + if ((version & 0xFFFF) < Opcodes.V17 + && Integer.bitCount(access & (Opcodes.ACC_STRICT | Opcodes.ACC_ABSTRACT)) > 1) { + throw new IllegalArgumentException("strictfp and abstract are mutually exclusive: " + access); + } + } + /** * Checks that the given name is a fully qualified name, using dots. * @@ -981,9 +993,9 @@ public class CheckClassAdapter extends ClassVisitor { mask = 0xFF0000FF; break; default: - throw new AssertionError(); + break; } - if ((typeRef & ~mask) != 0) { + if (mask == 0 || (typeRef & ~mask) != 0) { throw new IllegalArgumentException( "Invalid type reference 0x" + Integer.toHexString(typeRef)); } @@ -1034,9 +1046,10 @@ public class CheckClassAdapter extends ClassVisitor { ClassReader classReader; if (args[0].endsWith(".class")) { - InputStream inputStream = - new FileInputStream(args[0]); // NOPMD(AvoidFileStream): can't fix for 1.5 compatibility - classReader = new ClassReader(inputStream); + // Can't fix PMD warning for 1.5 compatibility. + try (InputStream inputStream = new FileInputStream(args[0])) { // NOPMD(AvoidFileStream) + classReader = new ClassReader(inputStream); + } } else { classReader = new ClassReader(args[0]); } @@ -1065,7 +1078,6 @@ public class CheckClassAdapter extends ClassVisitor { * @param printResults whether to print the results of the bytecode verification. * @param printWriter where the results (or the stack trace in case of error) must be printed. */ - @SuppressWarnings("deprecation") public static void verify( final ClassReader classReader, final ClassLoader loader, @@ -1073,7 +1085,7 @@ public class CheckClassAdapter extends ClassVisitor { final PrintWriter printWriter) { ClassNode classNode = new ClassNode(); classReader.accept( - new CheckClassAdapter(Opcodes.ASM9_EXPERIMENTAL, classNode, false) {}, + new CheckClassAdapter(/*latest*/ Opcodes.ASM9, classNode, false) {}, ClassReader.SKIP_DEBUG); Type syperType = classNode.superName == null ? null : Type.getObjectType(classNode.superName); @@ -1152,7 +1164,12 @@ public class CheckClassAdapter extends ClassVisitor { if (name.charAt(endIndex - 1) == ';') { endIndex--; } - return name.substring(lastSlashIndex + 1, endIndex); + int lastBracketIndex = name.lastIndexOf('['); + if (lastBracketIndex == -1) { + return name.substring(lastSlashIndex + 1, endIndex); + } + return name.substring(0, lastBracketIndex + 1) + name.substring(lastSlashIndex + 1, endIndex); } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckFieldAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckFieldAdapter.java index 8ac6fea420edc9a88ea6aaa3674bf16f4c1d7a05..edb38aca7b13742417f75d6731b3fbdef35c4199 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckFieldAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckFieldAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -83,7 +84,7 @@ public class CheckFieldAdapter extends FieldVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public CheckFieldAdapter(final FieldVisitor fieldVisitor) { - this(/* latest api = */ Opcodes.ASM8, fieldVisitor); + this(/* latest api = */ Opcodes.ASM9, fieldVisitor); if (getClass() != CheckFieldAdapter.class) { throw new IllegalStateException(); } @@ -93,8 +94,8 @@ public class CheckFieldAdapter extends FieldVisitor { * Constructs a new {@link CheckFieldAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param fieldVisitor the field visitor to which this adapter must delegate calls. */ protected CheckFieldAdapter(final int api, final FieldVisitor fieldVisitor) { @@ -146,3 +147,4 @@ public class CheckFieldAdapter extends FieldVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java index 6ecf4604368ca18bbbe4d912a589044b7f152759..7f3816788da5afa67032ef8ea46df38641957122 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckMethodAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import java.io.PrintWriter; @@ -398,7 +399,7 @@ public class CheckMethodAdapter extends MethodVisitor { */ public CheckMethodAdapter( final MethodVisitor methodVisitor, final Map labelInsnIndices) { - this(/* latest api = */ Opcodes.ASM8, methodVisitor, labelInsnIndices); + this(/* latest api = */ Opcodes.ASM9, methodVisitor, labelInsnIndices); if (getClass() != CheckMethodAdapter.class) { throw new IllegalStateException(); } @@ -409,8 +410,8 @@ public class CheckMethodAdapter extends MethodVisitor { * data flow check (see {@link #CheckMethodAdapter(int,String,String,MethodVisitor,Map)}). * * @param api the ASM API version implemented by this CheckMethodAdapter. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param methodVisitor the method visitor to which this adapter must delegate calls. * @param labelInsnIndices the index of the instruction designated by each visited label so far * (in other methods). This map is updated with the labels from the visited method. @@ -446,7 +447,7 @@ public class CheckMethodAdapter extends MethodVisitor { final MethodVisitor methodVisitor, final Map labelInsnIndices) { this( - /* latest api = */ Opcodes.ASM8, access, name, descriptor, methodVisitor, labelInsnIndices); + /* latest api = */ Opcodes.ASM9, access, name, descriptor, methodVisitor, labelInsnIndices); if (getClass() != CheckMethodAdapter.class) { throw new IllegalStateException(); } @@ -458,8 +459,8 @@ public class CheckMethodAdapter extends MethodVisitor { * instruction IRETURN, or the invalid sequence IADD L2I will be detected. * * @param api the ASM API version implemented by this CheckMethodAdapter. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param access the method's access flags. * @param name the method's name. * @param descriptor the method's descriptor (see {@link Type}). @@ -515,7 +516,7 @@ public class CheckMethodAdapter extends MethodVisitor { checkUnqualifiedName(version, name, "name"); } CheckClassAdapter.checkAccess( - access, Opcodes.ACC_FINAL + Opcodes.ACC_MANDATED + Opcodes.ACC_SYNTHETIC); + access, Opcodes.ACC_FINAL | Opcodes.ACC_MANDATED | Opcodes.ACC_SYNTHETIC); super.visitParameter(name, access); } @@ -815,7 +816,7 @@ public class CheckMethodAdapter extends MethodVisitor { checkVisitMaxsNotCalled(); checkLabel(label, false, "label"); if (labelInsnIndices.get(label) != null) { - throw new IllegalArgumentException("Already visited label"); + throw new IllegalStateException("Already visited label"); } labelInsnIndices.put(label, insnCount); super.visitLabel(label); @@ -1473,3 +1474,4 @@ public class CheckMethodAdapter extends MethodVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckModuleAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckModuleAdapter.java index 1eae61ba66fb3aa8b07b261de9c150cde9ce7d66..91e85ce2a5b91aeda7ba75ccc05130c1af5d1d81 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckModuleAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckModuleAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import java.util.HashSet; @@ -102,7 +103,7 @@ public class CheckModuleAdapter extends ModuleVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public CheckModuleAdapter(final ModuleVisitor moduleVisitor, final boolean isOpen) { - this(/* latest api = */ Opcodes.ASM8, moduleVisitor, isOpen); + this(/* latest api = */ Opcodes.ASM9, moduleVisitor, isOpen); if (getClass() != CheckModuleAdapter.class) { throw new IllegalStateException(); } @@ -112,8 +113,8 @@ public class CheckModuleAdapter extends ModuleVisitor { * Constructs a new {@link CheckModuleAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param moduleVisitor the module visitor to which this adapter must delegate calls. * @param isOpen whether the visited module is open. Open modules have their {@link * Opcodes#ACC_OPEN} access flag set in {@link jdk.internal.org.objectweb.asm.ClassVisitor#visitModule}. @@ -242,3 +243,4 @@ public class CheckModuleAdapter extends ModuleVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckRecordComponentAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckRecordComponentAdapter.java index 2c2f976510187ef8119d662823861331e4f18241..98cbb9c4e42f45769486005a90a07e5300417acd 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckRecordComponentAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckRecordComponentAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -86,7 +87,7 @@ public class CheckRecordComponentAdapter extends RecordComponentVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public CheckRecordComponentAdapter(final RecordComponentVisitor recordComponentVisitor) { - this(/* latest api =*/ Opcodes.ASM8, recordComponentVisitor); + this(/* latest api =*/ Opcodes.ASM9, recordComponentVisitor); if (getClass() != CheckRecordComponentAdapter.class) { throw new IllegalStateException(); } @@ -95,7 +96,8 @@ public class CheckRecordComponentAdapter extends RecordComponentVisitor { /** * Constructs a new {@link CheckRecordComponentAdapter}. * - * @param api the ASM API version implemented by this visitor. Must be {@link Opcodes#ASM8}. + * @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM8} + * or {@link Opcodes#ASM9}. * @param recordComponentVisitor the record component visitor to which this adapter must delegate * calls. */ @@ -149,3 +151,4 @@ public class CheckRecordComponentAdapter extends RecordComponentVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckSignatureAdapter.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckSignatureAdapter.java index f05054afcb76f30c348da0010fba52a516e46cba..d16f45a8eca6222e288d469ef3b91cb39b17ac63 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckSignatureAdapter.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/CheckSignatureAdapter.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import java.util.EnumSet; @@ -154,15 +155,15 @@ public class CheckSignatureAdapter extends SignatureVisitor { * null}. */ public CheckSignatureAdapter(final int type, final SignatureVisitor signatureVisitor) { - this(/* latest api = */ Opcodes.ASM8, type, signatureVisitor); + this(/* latest api = */ Opcodes.ASM9, type, signatureVisitor); } /** * Constructs a new {@link CheckSignatureAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param type the type of signature to be checked. See {@link #CLASS_SIGNATURE}, {@link * #METHOD_SIGNATURE} and {@link #TYPE_SIGNATURE}. * @param signatureVisitor the visitor to which this adapter must delegate calls. May be {@literal @@ -389,3 +390,4 @@ public class CheckSignatureAdapter extends SignatureVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Printer.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Printer.java index 0c8a0e8f56e71cf11e1109585179f862db778805..19e7bc4cd66050d1697a0c79342663ca2e02bf82 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Printer.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Printer.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import java.io.FileInputStream; @@ -323,7 +324,8 @@ public abstract class Printer { /** * The ASM API version implemented by this class. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. */ protected final int api; @@ -485,18 +487,12 @@ public abstract class Printer { } /** - * Experimental, use at your own risk. This method will be renamed when it becomes stable, this - * will break existing code using it. - * - *

    Visits a permitted subclass. A permitted subtclass is one of the allowed subclasses of the - * current class. See {@link - * jdk.internal.org.objectweb.asm.ClassVisitor#visitPermittedSubclassExperimental(String)}. + * Visits a permitted subclasses. A permitted subclass is one of the allowed subclasses of the + * current class. See {@link jdk.internal.org.objectweb.asm.ClassVisitor#visitPermittedSubclass(String)}. * * @param permittedSubclass the internal name of a permitted subclass. - * @deprecated this API is experimental. */ - @Deprecated - public void visitPermittedSubclassExperimental(final String permittedSubclass) { + public void visitPermittedSubclass(final String permittedSubclass) { throw new UnsupportedOperationException(UNSUPPORTED_OPERATION); } @@ -1305,7 +1301,7 @@ public abstract class Printer { /** * Prints a the given class to the given output. * - *

    Command line arguments: [-debug] <binary class name or class file name > + *

    Command line arguments: [-nodebug] <binary class name or class file name > * * @param args the command line arguments. * @param usage the help message to show when command line arguments are incorrect. @@ -1321,7 +1317,9 @@ public abstract class Printer { final PrintWriter output, final PrintWriter logger) throws IOException { - if (args.length < 1 || args.length > 2 || (args[0].equals("-debug") && args.length != 2)) { + if (args.length < 1 + || args.length > 2 + || ((args[0].equals("-debug") || args[0].equals("-nodebug")) && args.length != 2)) { logger.println(usage); return; } @@ -1330,7 +1328,7 @@ public abstract class Printer { String className; int parsingOptions; - if (args[0].equals("-debug")) { + if (args[0].equals("-nodebug")) { className = args[1]; parsingOptions = ClassReader.SKIP_DEBUG; } else { @@ -1341,11 +1339,13 @@ public abstract class Printer { if (className.endsWith(".class") || className.indexOf('\\') != -1 || className.indexOf('/') != -1) { - InputStream inputStream = - new FileInputStream(className); // NOPMD(AvoidFileStream): can't fix for 1.5 compatibility - new ClassReader(inputStream).accept(traceClassVisitor, parsingOptions); + // Can't fix PMD warning for 1.5 compatibility. + try (InputStream inputStream = new FileInputStream(className)) { // NOPMD(AvoidFileStream) + new ClassReader(inputStream).accept(traceClassVisitor, parsingOptions); + } } else { new ClassReader(className).accept(traceClassVisitor, parsingOptions); } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Textifiable.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Textifiable.java deleted file mode 100644 index 78ed7e100333733319370e1b1a9b2b393a055e83..0000000000000000000000000000000000000000 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Textifiable.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * This file is available under and governed by the GNU General Public - * License version 2 only, as published by the Free Software Foundation. - * However, the following notice accompanied the original version of this - * file: - * - * ASM: a very small and fast Java bytecode manipulation framework - * Copyright (c) 2000-2011 INRIA, France Telecom - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ -package jdk.internal.org.objectweb.asm.util; - -import java.util.Map; -import jdk.internal.org.objectweb.asm.Label; - -/** - * An {@link jdk.internal.org.objectweb.asm.Attribute} that can print a readable representation of itself. - * - * @author Eugene Kuleshov - */ -public interface Textifiable { - - /** - * Generates a human readable representation of this attribute. - * - * @param outputBuffer where the human representation of this attribute must be appended. - * @param labelNames the human readable names of the labels. - */ - void textify(StringBuffer outputBuffer, Map labelNames); -} diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java index ace4f792545b0f13f4504333a268993ac964a904..63074314bc858a9972ac219db15c8f9d035f4a87 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import java.io.IOException; @@ -84,7 +85,7 @@ public class Textifier extends Printer { /** The help message shown when command line arguments are incorrect. */ private static final String USAGE = "Prints a disassembled view of the given class.\n" - + "Usage: Textifier [-debug] "; + + "Usage: Textifier [-nodebug] "; /** The type of internal names. See {@link #appendDescriptor}. */ public static final int INTERNAL_NAME = 0; @@ -143,7 +144,7 @@ public class Textifier extends Printer { * @throws IllegalStateException If a subclass calls this constructor. */ public Textifier() { - this(/* latest api = */ Opcodes.ASM8); + this(/* latest api = */ Opcodes.ASM9); if (getClass() != Textifier.class) { throw new IllegalStateException(); } @@ -153,8 +154,8 @@ public class Textifier extends Printer { * Constructs a new {@link Textifier}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. */ protected Textifier(final int api) { super(api); @@ -163,7 +164,7 @@ public class Textifier extends Printer { /** * Prints a disassembled view of the given class to the standard output. * - *

    Usage: Textifier [-debug] <binary class name or class file name > + *

    Usage: Textifier [-nodebug] <binary class name or class file name > * * @param args the command line arguments. * @throws IOException if the class cannot be found, or if an IOException occurs. @@ -175,7 +176,7 @@ public class Textifier extends Printer { /** * Prints a disassembled view of the given class to the given output. * - *

    Usage: Textifier [-debug] <binary class name or class file name > + *

    Usage: Textifier [-nodebug] <binary class name or class file name > * * @param args the command line arguments. * @param output where to print the result. @@ -337,15 +338,8 @@ public class Textifier extends Printer { text.add(stringBuilder.toString()); } - /** - * Experimental, use at your own risk.. - * - * @param permittedSubclass the internal name of a permitted subclass. - * @deprecated this API is experimental. - */ @Override - @Deprecated - public void visitPermittedSubclassExperimental(final String permittedSubclass) { + public void visitPermittedSubclass(final String permittedSubclass) { stringBuilder.setLength(0); stringBuilder.append(tab).append("PERMITTEDSUBCLASS "); appendDescriptor(INTERNAL_NAME, permittedSubclass); @@ -1638,3 +1632,4 @@ public class Textifier extends Printer { return new Textifier(api); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TextifierSupport.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TextifierSupport.java index f4a0c2cabd9c13365933cee26352e905bbd2b5b4..edc3bf0351b168ba9d106da41f4a61f38efe71ca 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TextifierSupport.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TextifierSupport.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import java.util.Map; @@ -76,3 +77,4 @@ public interface TextifierSupport { */ void textify(StringBuilder outputBuilder, Map labelNames); } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceAnnotationVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceAnnotationVisitor.java index e13cb331134add26662e509806c683158182692e..9133b45c5639f4a01a970e32985555ffc462b660 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceAnnotationVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceAnnotationVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -88,7 +89,7 @@ public final class TraceAnnotationVisitor extends AnnotationVisitor { * @param printer the printer to convert the visited annotation into text. */ public TraceAnnotationVisitor(final AnnotationVisitor annotationVisitor, final Printer printer) { - super(/* latest api = */ Opcodes.ASM8, annotationVisitor); + super(/* latest api = */ Opcodes.ASM9, annotationVisitor); this.printer = printer; } @@ -122,3 +123,4 @@ public final class TraceAnnotationVisitor extends AnnotationVisitor { super.visitEnd(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceClassVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceClassVisitor.java index f8b20180d68cf11a8b2e524c5abfc939c3a70ed5..eade2bc9c479b476adf64f07af8cfbd718c559f2 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceClassVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceClassVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import java.io.PrintWriter; @@ -148,10 +149,9 @@ public final class TraceClassVisitor extends ClassVisitor { * @param printer the printer to convert the visited class into text. * @param printWriter the print writer to be used to print the class. May be {@literal null}. */ - @SuppressWarnings("deprecation") public TraceClassVisitor( final ClassVisitor classVisitor, final Printer printer, final PrintWriter printWriter) { - super(/* latest api = */ Opcodes.ASM9_EXPERIMENTAL, classVisitor); + super(/* latest api = */ Opcodes.ASM9, classVisitor); this.printWriter = printWriter; this.p = printer; } @@ -219,17 +219,10 @@ public final class TraceClassVisitor extends ClassVisitor { super.visitNestMember(nestMember); } - /** - * Experimental, use at your own risk.. - * - * @param permittedSubclass the internal name of a permitted subclass. - * @deprecated this API is experimental. - */ @Override - @Deprecated - public void visitPermittedSubclassExperimental(final String permittedSubclass) { - p.visitPermittedSubclassExperimental(permittedSubclass); - super.visitPermittedSubclassExperimental(permittedSubclass); + public void visitPermittedSubclass(final String permittedSubclass) { + p.visitPermittedSubclass(permittedSubclass); + super.visitPermittedSubclass(permittedSubclass); } @Override @@ -281,3 +274,4 @@ public final class TraceClassVisitor extends ClassVisitor { super.visitEnd(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceFieldVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceFieldVisitor.java index 04f079d204499903e753f70ab7976eb5830fbd73..62cc5939f11dfc2ef80150eb08cca4d267b2b934 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceFieldVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceFieldVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -91,7 +92,7 @@ public final class TraceFieldVisitor extends FieldVisitor { * @param printer the printer to convert the visited field into text. */ public TraceFieldVisitor(final FieldVisitor fieldVisitor, final Printer printer) { - super(/* latest api = */ Opcodes.ASM8, fieldVisitor); + super(/* latest api = */ Opcodes.ASM9, fieldVisitor); this.p = printer; } @@ -122,3 +123,4 @@ public final class TraceFieldVisitor extends FieldVisitor { super.visitEnd(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceMethodVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceMethodVisitor.java index 610bd94d7bbc92121b15f908511ce555d935d49c..6f58868694b01fed69513deee22722209b12cb90 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceMethodVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceMethodVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -93,7 +94,7 @@ public final class TraceMethodVisitor extends MethodVisitor { * @param printer the printer to convert the visited method into text. */ public TraceMethodVisitor(final MethodVisitor methodVisitor, final Printer printer) { - super(/* latest api = */ Opcodes.ASM8, methodVisitor); + super(/* latest api = */ Opcodes.ASM9, methodVisitor); this.p = printer; } @@ -341,3 +342,4 @@ public final class TraceMethodVisitor extends MethodVisitor { super.visitEnd(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceModuleVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceModuleVisitor.java index b9e29c919ce671a5ef210cb4de7172dd57b2798e..cbd0bf7aca7476b9bf3beb3699fe9877f2bb13d7 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceModuleVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceModuleVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import jdk.internal.org.objectweb.asm.ModuleVisitor; @@ -88,7 +89,7 @@ public final class TraceModuleVisitor extends ModuleVisitor { * @param printer the printer to convert the visited module into text. */ public TraceModuleVisitor(final ModuleVisitor moduleVisitor, final Printer printer) { - super(/* latest api = */ Opcodes.ASM8, moduleVisitor); + super(/* latest api = */ Opcodes.ASM9, moduleVisitor); this.p = printer; } diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceRecordComponentVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceRecordComponentVisitor.java index 70e2a0258c83365bdbc01a70f8c69031767c2f00..2069f299d1a29a3f3488b467b3fa042efb67d2c1 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceRecordComponentVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceRecordComponentVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import jdk.internal.org.objectweb.asm.AnnotationVisitor; @@ -93,7 +94,7 @@ public final class TraceRecordComponentVisitor extends RecordComponentVisitor { */ public TraceRecordComponentVisitor( final RecordComponentVisitor recordComponentVisitor, final Printer printer) { - super(/* latest api ='*/ Opcodes.ASM8, recordComponentVisitor); + super(/* latest api ='*/ Opcodes.ASM9, recordComponentVisitor); this.printer = printer; } @@ -125,3 +126,4 @@ public final class TraceRecordComponentVisitor extends RecordComponentVisitor { super.visitEnd(); } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceSignatureVisitor.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceSignatureVisitor.java index c9d41729852f27890bce544a0ea502e74590b2ce..a7ba0fb6a0f1aa6cdb3fac56e26ee50f95ef4edc 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceSignatureVisitor.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceSignatureVisitor.java @@ -56,6 +56,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + package jdk.internal.org.objectweb.asm.util; import java.util.Collections; @@ -140,13 +141,13 @@ public final class TraceSignatureVisitor extends SignatureVisitor { * @param accessFlags for class type signatures, the access flags of the class. */ public TraceSignatureVisitor(final int accessFlags) { - super(/* latest api = */ Opcodes.ASM8); + super(/* latest api = */ Opcodes.ASM9); this.isInterface = (accessFlags & Opcodes.ACC_INTERFACE) != 0; this.declaration = new StringBuilder(); } private TraceSignatureVisitor(final StringBuilder stringBuilder) { - super(/* latest api = */ Opcodes.ASM8); + super(/* latest api = */ Opcodes.ASM9); this.isInterface = false; this.declaration = stringBuilder; } @@ -256,7 +257,7 @@ public final class TraceSignatureVisitor extends SignatureVisitor { @Override public void visitClassType(final String name) { if ("java/lang/Object".equals(name)) { - // 'Map' or 'public abstract V get(Object key);' should have + // 'Map' or 'abstract public V get(Object key);' should have // Object 'but java.lang.String extends java.lang.Object' is unnecessary. boolean needObjectClass = argumentStack % 2 != 0 || parameterTypeVisited; if (needObjectClass) { @@ -373,3 +374,4 @@ public final class TraceSignatureVisitor extends SignatureVisitor { } } } + diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/version.txt b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/version.txt index 023148eacfef8f8937ec7f7d50dea488e9bf3b17..b35c1bbf9edb7c6e96010e0d438b203b4504c42d 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/version.txt +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/version.txt @@ -1,2 +1,2 @@ -ASM_8_0_1 +ASM_9_2 origin http://gitlab.ow2.org/asm/asm.git (fetch) diff --git a/src/java.base/share/classes/jdk/internal/reflect/SignatureIterator.java b/src/java.base/share/classes/jdk/internal/reflect/SignatureIterator.java deleted file mode 100644 index ca5c8b78a7215bdf2e1d90f018ea9320fa80e8d4..0000000000000000000000000000000000000000 --- a/src/java.base/share/classes/jdk/internal/reflect/SignatureIterator.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package jdk.internal.reflect; - -/** Assists in iterating down a method's signature */ - -class SignatureIterator { - private final String sig; - private int idx; - - public SignatureIterator(String sig) { - this.sig = sig; - reset(); - } - - public void reset() { - idx = 1; - } - - public boolean atEnd() { - return sig.charAt(idx) == ')'; - } - - public String next() { - if (atEnd()) return null; - char c = sig.charAt(idx); - if (c != '[' && c != 'L') { - ++idx; - return String.valueOf(c); - } - // Walk forward to end of entry - int endIdx = idx; - if (c == '[') { - while ((c = sig.charAt(endIdx)) == '[') { - endIdx++; - } - } - - if (c == 'L') { - while (sig.charAt(endIdx) != ';') { - endIdx++; - } - } - - int beginIdx = idx; - idx = endIdx + 1; - return sig.substring(beginIdx, idx); - } - - /** Should only be called when atEnd() is true. Does not change - state of iterator. */ - public String returnType() { - if (!atEnd()) { - throw new InternalError("Illegal use of SignatureIterator"); - } - return sig.substring(idx + 1, sig.length()); - } -} diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties index 85c7ead75fba60c437d164a2d3da7481495edcc5..7edc4b1685118b7122237625fb3f84c6f88fa89b 100644 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties +++ b/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,21 +24,21 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Verwendung: {0} [Optionen] [args...]\n (zur Ausf\u00FChrung einer Klasse)\n oder {0} [Optionen] -jar [args...]\n (zur Ausf\u00FChrung einer JAR-Datei)\n oder {0} [Optionen] -m [/] [args...]\n {0} [Optionen] --module [/] [args...]\n (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\n\n Argumente, die auf die Hauptklasse folgen, -jar , -m oder --module\n / werden als Argumente f\u00FCr die Hauptklasse \u00FCbergeben.\n\n wobei "Optionen" Folgendes umfasst:\n\n +java.launcher.opt.header = Verwendung: {0} [Optionen] [args...]\n (zur Ausf\u00FChrung einer Klasse)\n oder {0} [Optionen] -jar [args...]\n (zur Ausf\u00FChrung einer JAR-Datei)\n oder {0} [Optionen] -m [/] [args...]\n {0} [Optionen] --module [/] [args...]\n (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\n oder {0} [Optionen] [args]\n (zur Ausf\u00FChrung eines Programms mit einer einzelnen Quelldatei)\n\n Argumente, die auf die Hauptklasse, die Quelldatei, -jar , -m oder --module\n / folgen, werden als Argumente f\u00FCr die\nHauptklasse \u00FCbergeben.\n\n Dabei umfasst "Optionen" Folgendes:\n\n java.launcher.opt.vmselect =\ {0}\t zur Auswahl der "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t ist ein Synonym f\u00FCr die "{1}" VM [verworfen]\n # Translators please note do not translate the options themselves -java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven, in denen nach Klassendateien gesucht wird.\n -p \n --module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n ein Verzeichnis mit Modulen ist.\n --upgrade-module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n Module im Laufzeitimage ersetzen\n --add-modules [,...]\n Root-Module, die zus\u00E4tzlich zum anf\u00E4nglichen Modul aufgel\u00F6st werden sollen.\n kann auch wie folgt lauten: ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n Listet beobachtbare Module auf und beendet den Vorgang\n -d \n --describe-module \n Beschreibt ein Modul und beendet den Vorgang\n --dry-run Erstellt eine VM und l\u00E4dt die Hauptklasse, f\u00FChrt aber nicht die Hauptmethode aus.\n Die Option "--dry-run" kann n\u00FCtzlich sein, um die\n Befehlszeilenoptionen, wie die Modulsystemkonfiguration, zu validieren.\n --validate-modules\n Validiert alle Module und beendet den Vorgang\n Die Option "--validate-modules" kann n\u00FCtzlich sein, um\n Konflikte und andere Fehler mit Modulen auf dem Modulpfad zu ermitteln.\n -D=\n Legt eine Systemeigenschaft fest\n -verbose:[class|module|gc|jni]\n Ausgabe im Verbose-Modus aktivieren\n -version Gibt die Produktversion an den Fehlerstream aus und beendet den Vorgang\n --version Gibt die Produktversion an den Outputstream aus und beendet den Vorgang\n -showversion Gibt die Produktversion an den Fehlerstream aus und setzt den Vorgang fort\n --show-version\n Gibt die Produktversion an den Outputstream aus und setzt den Vorgang fort\n --show-module-resolution\n Zeigt die Modulaufl\u00F6sungsausgabe beim Start an\n -? -h -help\n Gibt diese Hilfemeldung an den Fehlerstream aus\n --help Gibt diese Hilfemeldung an den Outputstream aus\n -X Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Fehlerstream aus\n --help-extra Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Outputstream aus\n -ea[:...|:]\n -enableassertions[:...|:]\n Aktiviert Assertions mit angegebener Granularit\u00E4t\n -da[:...|:]\n -disableassertions[:...|:]\n Deaktiviert Assertions mit angegebener Granularit\u00E4t\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:[=]\n L\u00E4dt die native Agent Library . Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:[=]\n L\u00E4dt die native Agent Library mit dem vollst\u00E4ndigen Pfadnamen\n -javaagent:[=]\n L\u00E4dt den Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:\n Zeigt den Startbildschirm mit einem angegebenen Bild an\n Skalierte HiDPI-Bilder werden automatisch \ -unterst\u00FCtzt und verwendet,\n falls verf\u00FCgbar. Der nicht skalierte Bilddateiname (Beispiel: image.ext)\n muss immer als Argument an die Option "-splash" \u00FCbergeben werden.\n Das am besten geeignete angegebene skalierte Bild wird\n automatisch ausgew\u00E4hlt.\n Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API\n @argument files\n Eine oder mehrere Argumentdateien mit Optionen\n -disable-@files\n Verhindert die weitere Erweiterung von Argumentdateien\nUm ein Argument f\u00FCr eine lange Option anzugeben, k\u00F6nnen Sie --= oder\n-- verwenden.\n +java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven, in denen nach Klassendateien gesucht wird.\n -p \n --module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n ein Verzeichnis mit Modulen ist.\n --upgrade-module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n Module im Laufzeitimage ersetzen\n --add-modules [,...]\n Root-Module, die zus\u00E4tzlich zum anf\u00E4nglichen Modul aufgel\u00F6st werden sollen.\n kann auch wie folgt lauten: ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --enable-native-access [,...]\n Module, die eingeschr\u00E4nkte native Vorg\u00E4nge ausf\u00FChren d\u00FCrfen.\n kann auch ALL-UNNAMED lauten.\n --list-modules\n Listet beobachtbare Module auf und beendet den Vorgang\n -d \n --describe-module \n Beschreibt ein Modul und beendet den Vorgang\n --dry-run Erstellt eine VM und l\u00E4dt die Hauptklasse, f\u00FChrt aber nicht die Hauptmethode aus.\n Die Option "--dry-run" kann n\u00FCtzlich sein, um die\n Befehlszeilenoptionen, wie die Modulsystemkonfiguration, zu validieren.\n --validate-modules\n Validiert alle Module und beendet den Vorgang\n Die Option "--validate-modules" kann n\u00FCtzlich sein, um\n Konflikte und andere Fehler mit Modulen auf dem Modulpfad zu ermitteln.\n -D=\n Legt eine Systemeigenschaft fest\n -verbose:[class|module|gc|jni]\n Aktiviert die Verbose-Ausgabe f\u00FCr das angegebene Subsystem\n -version Gibt die Produktversion an den Fehlerstream aus und beendet den Vorgang\n --version Gibt die Produktversion an den Outputstream aus und beendet den Vorgang\n -showversion Gibt die Produktversion an den Fehlerstream aus und setzt den Vorgang fort\n --show-version\n Gibt die Produktversion an den Outputstream aus und setzt den Vorgang fort\n --show-module-resolution\n Zeigt die Modulaufl\u00F6sungsausgabe beim Start an\n -? -h -help\n Gibt diese Hilfemeldung an den Fehlerstream aus\n --help Gibt diese Hilfemeldung an den Outputstream aus\n -X Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Fehlerstream aus\n --help-extra Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Outputstream aus\n -ea[:...|:]\n -enableassertions[:...|:]\n Aktiviert Assertions mit angegebener Granularit\u00E4t\n -da[:...|:]\n -disableassertions[:...|:]\n Deaktiviert Assertions mit angegebener Granularit\u00E4t\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:[=]\n L\u00E4dt die native Agent Library . Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:[=]\n L\u00E4dt die native Agent Library mit dem vollst\u00E4ndigen Pfadnamen\n -javaagent:[=]\n \ +L\u00E4dt den Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:\n Zeigt den Startbildschirm mit einem angegebenen Bild an\n Skalierte HiDPI-Bilder werden automatisch unterst\u00FCtzt und verwendet,\n falls verf\u00FCgbar. Der nicht skalierte Bilddateiname (Beispiel: image.ext)\n muss immer als Argument an die Option "-splash" \u00FCbergeben werden.\n Das am besten geeignete angegebene skalierte Bild wird\n automatisch ausgew\u00E4hlt.\n Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API\n @argument files\n Eine oder mehrere Argumentdateien mit Optionen\n -disable-@files\n Verhindert die weitere Erweiterung von Argumentdateien\n --enable-preview\n L\u00E4sst zu, das Klassen von Vorschaufeatures dieses Release abh\u00E4ngig sind\nUm ein Argument f\u00FCr eine lange Option anzugeben, k\u00F6nnen Sie --= oder\n-- verwenden.\n # Translators please note do not translate the options themselves -java.launcher.X.usage=\n -Xbatch Deaktiviert Hintergrundkompilierung\n -Xbootclasspath/a:\n an Ende von Bootstrap Classpath anh\u00E4ngen\n -Xcheck:jni F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n -Xcomp Erzwingt Kompilierung von Methoden beim ersten Aufruf\n -Xdebug Wird zur Abw\u00E4rtskompatibilit\u00E4t bereitgestellt\n -Xdiag Zeigt zus\u00E4tzliche Diagnosemeldungen an\n -Xfuture Aktiviert strengste Pr\u00FCfungen, wird als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet\n -Xint Nur Ausf\u00FChrung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n Option "-version"\n -Xloggc: Protokolliert GC-Status in einer Datei mit Zeitstempeln\n -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xmn Legt die anf\u00E4ngliche und die maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n f\u00FCr die Young Generation (Nursery) fest\n -Xms Legt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe fest\n -Xmx Legt die maximale Java-Heap-Gr\u00F6\u00DFe fest\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet, wenn m\u00F6glich, freigegebene Klassendaten (Standard)\n -Xshare:off Versucht nicht freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung von freigegebenen Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n -XshowSettings Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen an und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen an und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen an und f\u00E4hrt fort\n -Xss Legt Stackgr\u00F6\u00DFe des Java-Threads fest\n -Xverify Legt den Modus der Bytecodeverifizierung fest\n --add-reads =(,)*\n Aktualisiert , damit ungeachtet der\n Moduldeklaration gelesen wird.\n kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports /=(,)*\n Aktualisiert , um ungeachtet der Moduldeklaration in \n zu exportieren.\n kann ALL-UNNAMED sein, um in alle\n unbenannten Module zu exportieren.\n --add-opens /=(,)*\n Aktualisiert , um ungeachtet der Moduldeklaration in\n zu \u00F6ffnen.\n --illegal-access=\n L\u00E4sst Zugriff f\u00FCr Mitglieder mit den Typen in den benannten Modulen\n nach Code in unbenannten Modulen zu oder lehnt ihn ab.\n ist entweder "deny", "permit", "warn" oder "debug"\n Diese Option wird in einem zuk\u00FCnftigen Release entfernt.\n --limit-modules [,...]\n Grenzt die Gesamtmenge der beobachtbaren Module ein\n --patch-module =({0})*\n \u00DCberschreibt oder erweitert ein Modul in JAR-Dateien\n oder -Verzeichnissen mit \ -Klassen und Ressourcen.\n --disable-@files Deaktiviert die weitere Erweiterung von Argumentdateien\n\nDiese zus\u00E4tzlichen Optionen k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.\n +java.launcher.X.usage=\n -Xbatch Deaktiviert die Hintergrundkompilierung\n -Xbootclasspath/a:\n An das Ende des Bootstrap Classpaths anh\u00E4ngen\n -Xcheck:jni F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n -Xcomp Erzwingt die Kompilierung von Methoden beim ersten Aufruf\n -Xdebug F\u00FChrt nichts aus. Wird aus Gr\u00FCnden der Abw\u00E4rtskompatibilit\u00E4t bereitgestellt.\n -Xdiag Zeigt zus\u00E4tzliche Diagnosemeldungen an\n -Xfuture Aktiviert strengste Pr\u00FCfungen, als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet.\n Diese Option ist veraltet und kann in einem\n zuk\u00FCnftigen Release entfernt werden.\n -Xint Nur Ausf\u00FChrung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n Option -version\n -Xlog: Konfiguriert oder aktiviert Logging mit dem einheitlichen Java Virtual\n Machine-(JVM-)Logging-Framework. Verwenden Sie -Xlog:help\n f\u00FCr weitere Einzelheiten.\n -Xloggc: Protokolliert den GC-Status in einer Datei mit Zeitstempeln.\n Diese Option ist veraltet und kann in einem\n zuk\u00FCnftigen Release entfernt werden. Wird durch -Xlog:gc: ersetzt.\n -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xmn Legt die anf\u00E4ngliche und maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n f\u00FCr die Young Generation (Nursery) fest\n -Xms Legt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe fest\n -Xmx Legt die maximale Java-Heap-Gr\u00F6\u00DFe fest\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet freigegebene Klassendaten, wenn m\u00F6glich (Standard)\n -Xshare:off Versucht nicht, freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung freigegebener Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n Diese Testoption kann zeitweise zu\n Fehlern f\u00FChren. Sie darf nicht in Produktionsumgebungen verwendet werden.\n -XshowSettings Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen an und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen an und f\u00E4hrt fort\n -XshowSettings:vm\n Zeigt alle VM-bezogenen Einstellungen an und f\u00E4hrt fort\n -XshowSettings:system\n (Nur Linux) Zeigt die Konfiguration des Hostsystems oder Containers an\n und f\u00E4hrt fort\n -Xss Legt die Stackgr\u00F6\u00DFe des Java-Threads fest\n -Xverify Legt den Modus der Bytecodeverifizierung fest\n Beachten Sie, dass die Option -Xverify:none veraltet ist und\n in einem zuk\u00FCnftigen Release entfernt werden kann.\n --add-reads =(,)*\n Aktualisiert , damit gelesen wird, ungeachtet\n der Moduldeklaration. \n kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports /=(,)*\n Aktualisiert , um in \ + zu exportieren,\n ungeachtet der Moduldeklaration.\n kann ALL-UNNAMED sein, um in alle\n unbenannten Module zu exportieren.\n --add-opens /=(,)*\n Aktualisiert , um in\n zu \u00F6ffnen, ungeachtet der Moduldeklaration.\n --limit-modules [,...]\n Grenzt die Gesamtmenge der beobachtbaren Module ein\n --patch-module =({0})*\n \u00DCberschreibt oder erweitert ein Modul mit Klassen und Ressourcen\n in JAR-Dateien oder Verzeichnissen.\n --source \n Legt die Version der Quelle im Quelldateimodus fest.\n --finalization=\n Steuert, ob die JVM Objekte finalisiert.\n Dabei ist entweder "enabled" oder "disabled".\n Die Finalisierung ist standardm\u00E4\u00DFig aktiviert.\n\nDiese zus\u00E4tzlichen Optionen k\u00F6nnen jederzeit ohne vorherige Ank\u00FCndigung ge\u00E4ndert werden.\n # Translators please note do not translate the options themselves -java.launcher.X.macosx.usage=\nDie folgenden Optionen sind f\u00FCr Mac OS X spezifisch:\n -XstartOnFirstThread\n main()-Methode f\u00FCr den ersten (AppKit) Thread ausf\u00FChren\n -Xdock:name=\n Den im Dock angezeigten Standardanwendungsnamen \u00FCberschreiben\n -Xdock:icon=\n Das im Dock angezeigte Standardsymbol \u00FCberschreiben\n\n +java.launcher.X.macosx.usage=\nDie folgenden Optionen sind f\u00FCr macOS spezifisch:\n -XstartOnFirstThread\n F\u00FChrt die main()-Methode f\u00FCr den ersten (AppKit-)Thread aus\n -Xdock:name=\n Setzt den im Dock angezeigten Standardanwendungsnamen au\u00DFer Kraft\n -Xdock:icon=\n Setzt das im Dock angezeigte Standardsymbol au\u00DFer Kraft\n\n java.launcher.cls.error1=Fehler: Hauptklasse {0} konnte nicht gefunden oder geladen werden\nUrsache: {1}: {2} java.launcher.cls.error2=Fehler: Hauptmethode ist nicht {0} in Klasse {1}. Definieren Sie die Hauptmethode als:\n public static void main(String[] args) @@ -53,8 +53,8 @@ java.launcher.jar.error3=kein Hauptmanifestattribut, in {0} java.launcher.jar.error4=Fehler beim Laden des Java-Agents in {0} java.launcher.init.error=Initialisierungsfehler java.launcher.javafx.error1=Fehler: Die JavaFX-Methode launchApplication hat die falsche Signatur, sie\nmuss als statisch deklariert werden und einen Wert vom Typ VOID zur\u00FCckgeben -java.launcher.module.error1=Modul {0} weist kein MainClass-Attribut auf. Verwenden Sie -m / +java.launcher.module.error1=Modul {0} weist kein ModuleMainClass-Attribut auf. Verwenden Sie -m / java.launcher.module.error2=Fehler: Hauptklasse {0} konnte in Modul {1} nicht gefunden oder geladen werden java.launcher.module.error3=Fehler: Hauptklasse {0} kann nicht in Modul {1} geladen werden\n\t{2} java.launcher.module.error4={0} nicht gefunden -java.launcher.module.error5=Fehler: Hauptklasse {0} kann nicht in Modul {1} initialisiert werden\nUrsache: {1}: {2} +java.launcher.module.error5=Fehler: Hauptklasse {0} kann nicht in Modul {1} initialisiert werden\nUrsache: {2}: {3} diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties index 32d28144dff7602fa351aa8ac684267002544d8e..542145ccbb04f2844828475188f5d7edee68f360 100644 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties +++ b/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -30,14 +30,14 @@ java.launcher.opt.vmselect =\ {0}\t "{1}" VM\u3092\u9078\u629E\u3059\u308B java.launcher.opt.hotspot =\ {0}\t \u306F"{1}" VM\u306E\u30B7\u30CE\u30CB\u30E0\u3067\u3059 [\u975E\u63A8\u5968]\n # Translators please note do not translate the options themselves -java.launcher.opt.footer = \ -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n {0}\u533A\u5207\u308A\u30EA\u30B9\u30C8(\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u3001\n ZIP\u30A2\u30FC\u30AB\u30A4\u30D6)\u3067\u3001\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u691C\u7D22\u7528\u3002\n -p \n --module-path ...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n \u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n --upgrade-module-path ...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n \u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u5185\u306E\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7F6E\u63DB\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n --add-modules [,...]\n \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n \u306B\u306F\u6B21\u3082\u6307\u5B9A\u3067\u304D\u307E\u3059: ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH.\n --list-modules\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30EA\u30B9\u30C8\u3057\u7D42\u4E86\u3057\u307E\u3059\n -d \n --describe-module \n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u8AAC\u660E\u3057\u7D42\u4E86\u3057\u307E\u3059\n --dry-run VM\u3092\u4F5C\u6210\u3057\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u307E\u305B\u3093\u3002\n --dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u8A3C\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\u30B3\u30DE\u30F3\u30C9\u884C\u30AA\u30D7\u30B7\u30E7\u30F3\u3002\n --validate-modules\n \u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u691C\u8A3C\u3057\u7D42\u4E86\u3057\u307E\u3059\n --validate-modules\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u7D22\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u4E0A\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u306E\u7AF6\u5408\u304A\u3088\u3073\u305D\u306E\u4ED6\u306E\u30A8\u30E9\u30FC\u3002\n -D=\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n -verbose:[class|module|gc|jni]\n \u7279\u5B9A\u306E\u30B5\u30D6\u30B7\u30B9\u30C6\u30E0\u3067\u8A73\u7D30\u51FA\u529B\u3092\u6709\u52B9\u306B\u3059\u308B\n -version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n --version \ -\u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n -showversion \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n --show-version\n \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n --show-module-resolution\n \u8D77\u52D5\u6642\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u89E3\u6C7A\u51FA\u529B\u3092\u8868\u793A\u3057\u307E\u3059\n -? -h -help\n \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n --help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n -X \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n --help-extra \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n -ea[:...|:]\n -enableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n -da[:...|:]\n -disableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n -esa | -enablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n -dsa | -disablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n -agentlib:[=]\n \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\u4F8B: -agentlib:jdwp\n -agentlib:jdwp=help\u3082\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n -agentpath:[=]\n \u30D5\u30EB\u30D1\u30B9\u540D\u3092\u4F7F\u7528\u3057\u3066\u3001\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\n -javaagent:[=]\n Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002java.lang.instrument\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n -splash:\n \u6307\u5B9A\u3055\u308C\u305F\u30A4\u30E1\u30FC\u30B8\u3092\u542B\u3080\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3057\u307E\u3059\n HiDPI\u30B9\u30B1\u30FC\u30EB\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\n (\u53EF\u80FD\u306A\u5834\u5408)\u3002\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u3055\u308C\u306A\u3044\u30A4\u30E1\u30FC\u30B8\u306E\u30D5\u30A1\u30A4\u30EB\u540D(image.ext\u306A\u3069)\u3092\n \u5F15\u6570\u3068\u3057\u3066-splash\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5FC5\u305A\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n \ -\u6307\u5B9A\u3055\u308C\u305F\u6700\u3082\u9069\u5207\u306A\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u6E08\u30A4\u30E1\u30FC\u30B8\u304C\u9078\u629E\u3055\u308C\u307E\u3059\n (\u81EA\u52D5\u7684)\u3002\n \u8A73\u7D30\u306F\u3001SplashScreen API\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n @argument\u30D5\u30A1\u30A4\u30EB\n \u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u542B\u30801\u3064\u4EE5\u4E0A\u306E\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\n -disable-@files\n \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n --enable-preview\n \u30AF\u30E9\u30B9\u3092\u3053\u306E\u30EA\u30EA\u30FC\u30B9\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u6A5F\u80FD\u306B\u4F9D\u5B58\u3055\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\n\u9577\u3044\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u5834\u5408\u3001--=\u307E\u305F\u306F\n-- \u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n +java.launcher.opt.footer = \ -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n {0}\u533A\u5207\u308A\u30EA\u30B9\u30C8(\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u3001\n ZIP\u30A2\u30FC\u30AB\u30A4\u30D6)\u3067\u3001\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u691C\u7D22\u7528\u3002\n -p \n --module-path ...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n \u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n --upgrade-module-path ...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n \u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u5185\u306E\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7F6E\u63DB\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n --add-modules [,...]\n \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n \u306B\u306F\u6B21\u3082\u6307\u5B9A\u3067\u304D\u307E\u3059: ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH.\n --enable-native-access [,...]\n \u5236\u9650\u3055\u308C\u305F\u30CD\u30A4\u30C6\u30A3\u30D6\u64CD\u4F5C\u306E\u5B9F\u884C\u3092\u8A31\u53EF\u3055\u308C\u3066\u3044\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n \u306FALL-UNNAMED\u306B\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002\n --list-modules\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30EA\u30B9\u30C8\u3057\u7D42\u4E86\u3057\u307E\u3059\n -d \n --describe-module \n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u8AAC\u660E\u3057\u7D42\u4E86\u3057\u307E\u3059\n --dry-run VM\u3092\u4F5C\u6210\u3057\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u307E\u305B\u3093\u3002\n --dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u8A3C\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\u30B3\u30DE\u30F3\u30C9\u884C\u30AA\u30D7\u30B7\u30E7\u30F3\u3002\n --validate-modules\n \u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u691C\u8A3C\u3057\u7D42\u4E86\u3057\u307E\u3059\n --validate-modules\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u7D22\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u4E0A\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u306E\u7AF6\u5408\u304A\u3088\u3073\u305D\u306E\u4ED6\u306E\u30A8\u30E9\u30FC\u3002\n -D=\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n -verbose:[class|module|gc|jni]\n \ +\u7279\u5B9A\u306E\u30B5\u30D6\u30B7\u30B9\u30C6\u30E0\u3067\u8A73\u7D30\u51FA\u529B\u3092\u6709\u52B9\u306B\u3059\u308B\n -version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n --version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n -showversion \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n --show-version\n \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n --show-module-resolution\n \u8D77\u52D5\u6642\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u89E3\u6C7A\u51FA\u529B\u3092\u8868\u793A\u3057\u307E\u3059\n -? -h -help\n \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n --help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n -X \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n --help-extra \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n -ea[:...|:]\n -enableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n -da[:...|:]\n -disableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n -esa | -enablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n -dsa | -disablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n -agentlib:[=]\n \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\u4F8B: -agentlib:jdwp\n -agentlib:jdwp=help\u3082\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n -agentpath:[=]\n \u30D5\u30EB\u30D1\u30B9\u540D\u3092\u4F7F\u7528\u3057\u3066\u3001\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\n -javaagent:[=]\n Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002java.lang.instrument\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n -splash:\n \u6307\u5B9A\u3055\u308C\u305F\u30A4\u30E1\u30FC\u30B8\u3092\u542B\u3080\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3057\u307E\u3059\n HiDPI\u30B9\u30B1\u30FC\u30EB\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\n \ +(\u53EF\u80FD\u306A\u5834\u5408)\u3002\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u3055\u308C\u306A\u3044\u30A4\u30E1\u30FC\u30B8\u306E\u30D5\u30A1\u30A4\u30EB\u540D(image.ext\u306A\u3069)\u3092\n \u5F15\u6570\u3068\u3057\u3066-splash\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5FC5\u305A\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n \u6307\u5B9A\u3055\u308C\u305F\u6700\u3082\u9069\u5207\u306A\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u6E08\u30A4\u30E1\u30FC\u30B8\u304C\u9078\u629E\u3055\u308C\u307E\u3059\n (\u81EA\u52D5\u7684)\u3002\n \u8A73\u7D30\u306F\u3001SplashScreen API\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n @argument\u30D5\u30A1\u30A4\u30EB\n \u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u542B\u30801\u3064\u4EE5\u4E0A\u306E\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\n -disable-@files\n \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n --enable-preview\n \u30AF\u30E9\u30B9\u3092\u3053\u306E\u30EA\u30EA\u30FC\u30B9\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u6A5F\u80FD\u306B\u4F9D\u5B58\u3055\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\n\u9577\u3044\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u5834\u5408\u3001--=\u307E\u305F\u306F\n-- \u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n # Translators please note do not translate the options themselves java.launcher.X.usage=\n -Xbatch \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u30FB\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n -Xbootclasspath/a:\n \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3057\u307E\u3059\n -Xcheck:jni JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3057\u307E\u3059\n -Xcomp \u521D\u56DE\u547C\u51FA\u3057\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5F37\u5236\u3057\u307E\u3059\n -Xdebug \u4F55\u3082\u884C\u3044\u307E\u305B\u3093\u3002\u4E0B\u4F4D\u4E92\u63DB\u6027\u306E\u305F\u3081\u306B\u7528\u610F\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n -Xdiag \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u307E\u3059\n -Xfuture \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u975E\u63A8\u5968\u3067\u3042\u308A\u3001\u5C06\u6765\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\n \u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\n -Xint \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n -Xinternalversion\n -version\u30AA\u30D7\u30B7\u30E7\u30F3\u3088\u308A\u8A73\u7D30\u306AJVM\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\n \u8868\u793A\u3057\u307E\u3059\n -Xlog: Java Virtual Machine (JVM)\u7D71\u5408\u30ED\u30AE\u30F3\u30B0\u30FB\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u3067\u306E\n \u30ED\u30AE\u30F3\u30B0\u3092\u69CB\u6210\u307E\u305F\u306F\u6709\u52B9\u5316\u3057\u307E\u3059\u3002\u8A73\u7D30\u306F\u3001-Xlog:help\u3092\n \u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n -Xloggc: \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3057\u307E\u3059\n \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u975E\u63A8\u5968\u3067\u3042\u308A\u3001\u5C06\u6765\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\n \u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002-Xlog:gc:\u3067\u7F6E\u63DB\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n -Xmixed \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xmn \u82E5\u3044\u4E16\u4EE3(\u30CA\u30FC\u30B5\u30EA)\u306E\u30D2\u30FC\u30D7\u306E\u521D\u671F\u30B5\u30A4\u30BA\u304A\u3088\u3073\u6700\u5927\u30B5\u30A4\u30BA\n (\u30D0\u30A4\u30C8\u5358\u4F4D)\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n -Xms Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n -Xmx Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n -Xnoclassgc \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n -Xrs Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3057\u307E\u3059(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n -Xshare:auto \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u307E\u3059(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xshare:off \ -\u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u8A66\u307F\u307E\u305B\u3093\n -Xshare:on \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3057\u307E\u3059\u3002\n \u3053\u308C\u306F\u30C6\u30B9\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u3001\u65AD\u7D9A\u7684\u306A\u5931\u6557\u306B\u3064\u306A\u304C\u308B\n \u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u672C\u756A\u74B0\u5883\u3067\u306F\u4F7F\u7528\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\n -XshowSettings \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -XshowSettings:all\n \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -XshowSettings:locale\n \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -XshowSettings:properties\n \u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -XshowSettings:vm\n \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -XshowSettings:system\n (Linux\u306E\u307F)\u30DB\u30B9\u30C8\u30FB\u30B7\u30B9\u30C6\u30E0\u307E\u305F\u306F\u30B3\u30F3\u30C6\u30CA\u3092\u8868\u793A\u3057\u307E\u3059\n \u69CB\u6210\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -Xss java\u30B9\u30EC\u30C3\u30C9\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n -Xverify \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u30FB\u30D9\u30EA\u30D5\u30A1\u30A4\u30A2\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n \u30AA\u30D7\u30B7\u30E7\u30F3-Xverify:none\u306F\u975E\u63A8\u5968\u306B\u306A\u308A\u3001\n \u5C06\u6765\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\n --add-reads =(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\n \u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u8AAD\u307F\u53D6\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\n --add-exports /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n --add-opens /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\n \u306B\u958B\u304D\u307E\u3059\u3002\n --illegal-access=\n \ -\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u5185\u306E\u30B3\u30FC\u30C9\u306B\u3088\u308B\u3001\u540D\u524D\u306E\u3042\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u5185\u306E\u30BF\u30A4\u30D7\u306E\u30E1\u30F3\u30D0\u30FC\u3078\u306E\u4E0D\u6B63\u30A2\u30AF\u30BB\u30B9\u3092\n \u8A31\u53EF\u307E\u305F\u306F\u62D2\u5426\u3057\u307E\u3059\u3002\n \u306F"deny"\u3001"permit"\u3001"warn"\u307E\u305F\u306F"debug"\u306E\u3044\u305A\u308C\u304B\u3067\u3059\n \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u5C06\u6765\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u4E88\u5B9A\u3067\u3059\u3002\n --limit-modules [,...]\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3057\u307E\u3059\n --patch-module =({0})*\n JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3057\u307E\u3059\u3002\n --source \n \u30BD\u30FC\u30B9\u30D5\u30A1\u30A4\u30EB\u30FB\u30E2\u30FC\u30C9\u3067\u30BD\u30FC\u30B9\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002\n\n\u3053\u306E\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n +\u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u8A66\u307F\u307E\u305B\u3093\n -Xshare:on \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3057\u307E\u3059\u3002\n \u3053\u308C\u306F\u30C6\u30B9\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u3001\u65AD\u7D9A\u7684\u306A\u5931\u6557\u306B\u3064\u306A\u304C\u308B\n \u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u672C\u756A\u74B0\u5883\u3067\u306F\u4F7F\u7528\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\n -XshowSettings \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -XshowSettings:all\n \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -XshowSettings:locale\n \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -XshowSettings:properties\n \u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -XshowSettings:vm\n \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -XshowSettings:system\n (Linux\u306E\u307F)\u30DB\u30B9\u30C8\u30FB\u30B7\u30B9\u30C6\u30E0\u307E\u305F\u306F\u30B3\u30F3\u30C6\u30CA\u3092\u8868\u793A\u3057\u307E\u3059\n \u69CB\u6210\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n -Xss java\u30B9\u30EC\u30C3\u30C9\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n -Xverify \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u30FB\u30D9\u30EA\u30D5\u30A1\u30A4\u30A2\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n \u30AA\u30D7\u30B7\u30E7\u30F3-Xverify:none\u306F\u975E\u63A8\u5968\u306B\u306A\u308A\u3001\n \u5C06\u6765\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\n --add-reads =(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\n \u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u8AAD\u307F\u53D6\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\n --add-exports /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n --add-opens /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\n \u306B\u958B\u304D\u307E\u3059\u3002\n --limit-modules [,...]\n \ +\u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3057\u307E\u3059\n --patch-module =({0})*\n JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3057\u307E\u3059\u3002\n --source \n \u30BD\u30FC\u30B9\u30D5\u30A1\u30A4\u30EB\u30FB\u30E2\u30FC\u30C9\u3067\u30BD\u30FC\u30B9\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002\n --finalization=\n JVM\u304C\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u30D5\u30A1\u30A4\u30CA\u30E9\u30A4\u30BA\u3092\u5B9F\u884C\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\n \u306F"enabled"\u307E\u305F\u306F"disabled"\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002\n \u30D5\u30A1\u30A4\u30CA\u30E9\u30A4\u30BA\u306F\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002\n\n\u3053\u306E\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\u6B21\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306FmacOS\u56FA\u6709\u3067\u3059:\n -XstartOnFirstThread\n main()\u30E1\u30BD\u30C3\u30C9\u3092\u6700\u521D(AppKit)\u306E\u30B9\u30EC\u30C3\u30C9\u3067\u5B9F\u884C\u3059\u308B\n -Xdock:name=\n Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n -Xdock:icon=\n Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30A4\u30B3\u30F3\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\n diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties index cdf9e09633d62117a527d1107022d0a23f0db922..35ec035c8d7d638e29f2f7eebc92adc4020678be 100644 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties +++ b/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -30,12 +30,12 @@ java.launcher.opt.vmselect =\ {0}\t \u9009\u62E9 "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t \u662F "{1}" VM \u7684\u540C\u4E49\u8BCD [\u5DF2\u8FC7\u65F6]\n # Translators please note do not translate the options themselves -java.launcher.opt.footer = \ -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n \u4F7F\u7528 {0} \u5206\u9694\u7684, \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n \u548C ZIP \u6863\u6848\u5217\u8868\u3002\n -p <\u6A21\u5757\u8DEF\u5F84>\n --module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n -d \n --describe-module <\u6A21\u5757\u540D\u79F0>\n \u63CF\u8FF0\u6A21\u5757\u5E76\u9000\u51FA\n --dry-run \u521B\u5EFA VM \u5E76\u52A0\u8F7D\u4E3B\u7C7B, \u4F46\u4E0D\u6267\u884C main \u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n --validate-modules\n \u9A8C\u8BC1\u6240\u6709\u6A21\u5757\u5E76\u9000\u51FA\n --validate-modules \u9009\u9879\u5BF9\u4E8E\u67E5\u627E\n \u6A21\u5757\u8DEF\u5F84\u4E2D\u6A21\u5757\u7684\u51B2\u7A81\u53CA\u5176\u4ED6\u9519\u8BEF\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n -D<\u540D\u79F0>=<\u503C>\n \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n -verbose:[class|module|gc|jni]\n \u4E3A\u7ED9\u5B9A\u5B50\u7CFB\u7EDF\u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n -version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u9000\u51FA\n --version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u9000\u51FA\n -showversion \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u7EE7\u7EED\n --show-version\n \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u7EE7\u7EED\n --show-module-resolution\n \u5728\u542F\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u6A21\u5757\u89E3\u6790\u8F93\u51FA\n -? -h -help\n \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -X \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help-extra \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \ -\u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n -esa | -enablesystemassertions\n \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n -dsa | -disablesystemassertions\n \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n -javaagent:[=<\u9009\u9879>]\n \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n -splash:<\u56FE\u50CF\u8DEF\u5F84>\n \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n (\u5982\u679C\u53EF\u7528)\u3002\u5E94\u59CB\u7EC8\u5C06\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n \u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u5408\u9002\u7684\u7F29\u653E\n \u56FE\u50CF\u3002\n \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\n @argument \u6587\u4EF6\n \u4E00\u4E2A\u6216\u591A\u4E2A\u5305\u542B\u9009\u9879\u7684\u53C2\u6570\u6587\u4EF6\n -disable-@files\n \u963B\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n --enable-preview\n \u5141\u8BB8\u7C7B\u4F9D\u8D56\u4E8E\u6B64\u53D1\u884C\u7248\u7684\u9884\u89C8\u529F\u80FD\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n +java.launcher.opt.footer = \ -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n \u4F7F\u7528 {0} \u5206\u9694\u7684, \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n \u548C ZIP \u6863\u6848\u5217\u8868\u3002\n -p <\u6A21\u5757\u8DEF\u5F84>\n --module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --enable-native-access [,...]\n \u5141\u8BB8\u6267\u884C\u53D7\u9650\u672C\u673A\u64CD\u4F5C\u7684\u6A21\u5757\u3002\n \u8FD8\u53EF\u4EE5\u4E3A ALL-UNNAMED\u3002\n --list-modules\n \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n -d \n --describe-module <\u6A21\u5757\u540D\u79F0>\n \u63CF\u8FF0\u6A21\u5757\u5E76\u9000\u51FA\n --dry-run \u521B\u5EFA VM \u5E76\u52A0\u8F7D\u4E3B\u7C7B, \u4F46\u4E0D\u6267\u884C main \u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n --validate-modules\n \u9A8C\u8BC1\u6240\u6709\u6A21\u5757\u5E76\u9000\u51FA\n --validate-modules \u9009\u9879\u5BF9\u4E8E\u67E5\u627E\n \u6A21\u5757\u8DEF\u5F84\u4E2D\u6A21\u5757\u7684\u51B2\u7A81\u53CA\u5176\u4ED6\u9519\u8BEF\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n -D<\u540D\u79F0>=<\u503C>\n \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n -verbose:[class|module|gc|jni]\n \u4E3A\u7ED9\u5B9A\u5B50\u7CFB\u7EDF\u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n -version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u9000\u51FA\n --version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u9000\u51FA\n -showversion \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u7EE7\u7EED\n --show-version\n \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u7EE7\u7EED\n --show-module-resolution\n \u5728\u542F\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u6A21\u5757\u89E3\u6790\u8F93\u51FA\n -? -h -help\n \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -X \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help-extra \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \ +\u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n -esa | -enablesystemassertions\n \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n -dsa | -disablesystemassertions\n \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n -javaagent:[=<\u9009\u9879>]\n \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n -splash:<\u56FE\u50CF\u8DEF\u5F84>\n \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n (\u5982\u679C\u53EF\u7528)\u3002\u5E94\u59CB\u7EC8\u5C06\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n \u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u5408\u9002\u7684\u7F29\u653E\n \u56FE\u50CF\u3002\n \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\n @argument \u6587\u4EF6\n \u4E00\u4E2A\u6216\u591A\u4E2A\u5305\u542B\u9009\u9879\u7684\u53C2\u6570\u6587\u4EF6\n -disable-@files\n \u963B\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n --enable-preview\n \u5141\u8BB8\u7C7B\u4F9D\u8D56\u4E8E\u6B64\u53D1\u884C\u7248\u7684\u9884\u89C8\u529F\u80FD\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n # Translators please note do not translate the options themselves java.launcher.X.usage=\n -Xbatch \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n -Xbootclasspath/a:<\u4EE5 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n -Xcheck:jni \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n -Xcomp \u5F3A\u5236\u5728\u9996\u6B21\u8C03\u7528\u65F6\u7F16\u8BD1\u65B9\u6CD5\n -Xdebug \u4E0D\u6267\u884C\u4EFB\u4F55\u64CD\u4F5C\u3002\u4E3A\u5B9E\u73B0\u5411\u540E\u517C\u5BB9\u800C\u63D0\u4F9B\u3002\n -Xdiag \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n -Xfuture \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5\uFF0C\u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\u3002\n \u6B64\u9009\u9879\u5DF2\u8FC7\u65F6\uFF0C\u53EF\u80FD\u4F1A\u5728\n \u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u3002\n -Xint \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n -Xinternalversion\n \u663E\u793A\u6BD4 -version \u9009\u9879\u66F4\u8BE6\u7EC6\u7684\n JVM \u7248\u672C\u4FE1\u606F\n -Xlog: \u914D\u7F6E\u6216\u542F\u7528\u91C7\u7528 Java \u865A\u62DF\n \u673A (Java Virtual Machine, JVM) \u7EDF\u4E00\u8BB0\u5F55\u6846\u67B6\u8FDB\u884C\u4E8B\u4EF6\u8BB0\u5F55\u3002\u4F7F\u7528 -Xlog:help\n \u53EF\u4E86\u89E3\u8BE6\u7EC6\u4FE1\u606F\u3002\n -Xloggc: \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D\uFF08\u5E26\u65F6\u95F4\u6233\uFF09\u3002\n \u6B64\u9009\u9879\u5DF2\u8FC7\u65F6\uFF0C\u53EF\u80FD\u4F1A\u5728\n \u5C06\u6765\u7684\u53D1\u884C\u7248\u4E2D\u5220\u9664\u3002\u5B83\u5C06\u66FF\u6362\u4E3A -Xlog:gc:\u3002\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u6267\u884C\uFF08\u9ED8\u8BA4\u503C\uFF09\n -Xmn \u4E3A\u5E74\u8F7B\u4EE3\uFF08\u65B0\u751F\u4EE3\uFF09\u8BBE\u7F6E\u521D\u59CB\u548C\u6700\u5927\u5806\u5927\u5C0F\n \uFF08\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D\uFF09\n -Xms \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n -Xmx \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n -Xnoclassgc \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n -Xrs \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528\uFF08\u8BF7\u53C2\u89C1\u6587\u6863\uFF09\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\uFF08\u9ED8\u8BA4\u503C\uFF09\n -Xshare:off \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n -Xshare:on \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\uFF0C\u5426\u5219\u5C06\u5931\u8D25\u3002\n \u8FD9\u662F\u4E00\u4E2A\u6D4B\u8BD5\u9009\u9879\uFF0C\u53EF\u80FD\u5BFC\u81F4\u95F4\u6B47\u6027\n \u6545\u969C\u3002\u4E0D\u5E94\u5728\u751F\u4EA7\u73AF\u5883\u4E2D\u4F7F\u7528\u5B83\u3002\n -XshowSettings \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:all\n \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:locale\n \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:properties\n \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:vm\n \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:system\n \uFF08\u4EC5 Linux\uFF09\u663E\u793A\u4E3B\u673A\u7CFB\u7EDF\u6216\u5BB9\u5668\n \u914D\u7F6E\u5E76\u7EE7\u7EED\n -Xss \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n -Xverify \ -\u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n \u8BF7\u6CE8\u610F\uFF0C\u9009\u9879 -Xverify:none \u5DF2\u8FC7\u65F6\uFF0C\n \u53EF\u80FD\u4F1A\u5728\u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u3002\n --add-reads =(,)*\n \u66F4\u65B0 \u4EE5\u8BFB\u53D6 \uFF0C\u800C\u65E0\u8BBA\n \u6A21\u5757\u5982\u4F55\u58F0\u660E\u3002 \n \u53EF\u4EE5\u662F ALL-UNNAMED\uFF0C\u5C06\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n \u6A21\u5757\u3002\n --add-exports /=(,)*\n \u66F4\u65B0 \u4EE5\u5C06 \u5BFC\u51FA\u5230 \uFF0C\n \u800C\u65E0\u8BBA\u6A21\u5757\u5982\u4F55\u58F0\u660E\u3002\n \u53EF\u4EE5\u662F ALL-UNNAMED\uFF0C\u5C06\u5BFC\u51FA\u5230\u6240\u6709\n \u672A\u547D\u540D\u6A21\u5757\u3002\n --add-opens /=(,)*\n \u66F4\u65B0 \u4EE5\u5728 \u4E2D\u6253\u5F00\n \uFF0C\u800C\u65E0\u8BBA\u6A21\u5757\u5982\u4F55\u58F0\u660E\u3002\n --illegal-access=\n \u5141\u8BB8\u6216\u62D2\u7EDD\u901A\u8FC7\u672A\u547D\u540D\u6A21\u5757\u4E2D\u7684\u4EE3\u7801\u5BF9\u547D\u540D\u6A21\u5757\u4E2D\u7684\n \u7C7B\u578B\u6210\u5458\u8FDB\u884C\u8BBF\u95EE\u3002\n \u4E3A "deny"\u3001"permit"\u3001"warn" \u6216 "debug" \u4E4B\u4E00\n \u6B64\u9009\u9879\u5C06\u5728\u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u3002\n --limit-modules [,...]\n \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n --patch-module =({0})*\n \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n --source \n \u8BBE\u7F6E\u6E90\u6587\u4EF6\u6A21\u5F0F\u4E2D\u6E90\u7684\u7248\u672C\u3002\n\n\u8FD9\u4E9B\u989D\u5916\u9009\u9879\u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n +\u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n \u8BF7\u6CE8\u610F\uFF0C\u9009\u9879 -Xverify:none \u5DF2\u8FC7\u65F6\uFF0C\n \u53EF\u80FD\u4F1A\u5728\u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u3002\n --add-reads =(,)*\n \u66F4\u65B0 \u4EE5\u8BFB\u53D6 \uFF0C\u800C\u65E0\u8BBA\n \u6A21\u5757\u5982\u4F55\u58F0\u660E\u3002 \n \u53EF\u4EE5\u662F ALL-UNNAMED\uFF0C\u5C06\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n \u6A21\u5757\u3002\n --add-exports /=(,)*\n \u66F4\u65B0 \u4EE5\u5C06 \u5BFC\u51FA\u5230 \uFF0C\n \u800C\u65E0\u8BBA\u6A21\u5757\u5982\u4F55\u58F0\u660E\u3002\n \u53EF\u4EE5\u662F ALL-UNNAMED\uFF0C\u5C06\u5BFC\u51FA\u5230\u6240\u6709\n \u672A\u547D\u540D\u6A21\u5757\u3002\n --add-opens /=(,)*\n \u66F4\u65B0 \u4EE5\u5728 \u4E2D\u6253\u5F00\n \uFF0C\u800C\u65E0\u8BBA\u6A21\u5757\u5982\u4F55\u58F0\u660E\u3002\n --limit-modules [,...]\n \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n --patch-module =({0})*\n \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n --source \n \u8BBE\u7F6E\u6E90\u6587\u4EF6\u6A21\u5F0F\u4E2D\u6E90\u7684\u7248\u672C\u3002\n --finalization=\n \u63A7\u5236 JVM \u662F\u5426\u6267\u884C\u5BF9\u8C61\u6700\u7EC8\u5904\u7406\uFF0C\n \u5176\u4E2D \u4E3A "enabled" \u6216 "disabled" \u4E4B\u4E00\u3002\n \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u6700\u7EC8\u5904\u7406\u5904\u4E8E\u542F\u7528\u72B6\u6001\u3002\n\n\u8FD9\u4E9B\u989D\u5916\u9009\u9879\u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\u4EE5\u4E0B\u9009\u9879\u662F\u7279\u5B9A\u4E8E macOS \u7684\u9009\u9879\uFF1A\n -XstartOnFirstThread\n \u5728\u7B2C\u4E00\u4E2A (AppKit) \u7EBF\u7A0B\u4E0A\u8FD0\u884C main() \u65B9\u6CD5\n -Xdock:name=\n \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\n -Xdock:icon=\n \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u56FE\u6807\n\n diff --git a/src/java.base/share/classes/sun/net/dns/ResolverConfiguration.java b/src/java.base/share/classes/sun/net/dns/ResolverConfiguration.java index e0048d80d3ebd9b257add0634ffe0c57949ba7c4..ecd2dddf35799c7d94e63886689de42b27041b44 100644 --- a/src/java.base/share/classes/sun/net/dns/ResolverConfiguration.java +++ b/src/java.base/share/classes/sun/net/dns/ResolverConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,7 @@ import java.util.List; * @since 1.4 */ -public abstract class ResolverConfiguration { +public sealed abstract class ResolverConfiguration permits ResolverConfigurationImpl { private static final Object lock = new Object(); diff --git a/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java b/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java index 843baea872caaae2c02d8a09abef31b9faa29ebb..151a28cd4dba38fceafe8d80e368839bb27162b4 100644 --- a/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java +++ b/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java @@ -29,17 +29,32 @@ import java.io.*; import java.net.PasswordAuthentication; import java.net.ProtocolException; import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.StandardCharsets; import java.security.AccessController; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.PrivilegedAction; +import java.security.Security; +import java.text.Normalizer; import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.Locale; import java.util.Objects; import java.util.Random; +import java.util.Set; +import java.util.function.BiConsumer; import sun.net.NetProperties; import sun.net.www.HeaderParser; import sun.nio.cs.ISO_8859_1; +import sun.security.util.KnownOIDs; +import sun.util.logging.PlatformLogger; import static sun.net.www.protocol.http.HttpURLConnection.HTTP_CONNECT; @@ -57,22 +72,67 @@ class DigestAuthentication extends AuthenticationInfo { private String authMethod; - private static final String compatPropName = "http.auth.digest." + + private static final String propPrefix = "http.auth.digest."; + + private static final String compatPropName = propPrefix + "quoteParameters"; + // Takes a set and input string containing comma separated values. converts to upper + // case, and trims each value, then applies given function to set and value + // (either add or delete element from set) + private static void processPropValue(String input, + Set theSet, + BiConsumer,String> consumer) + { + if (input == null) { + return; + } + String[] values = input.toUpperCase(Locale.ROOT).split(","); + for (String v : values) { + consumer.accept(theSet, v.trim()); + } + } + + private static final String secPropName = + propPrefix + "disabledAlgorithms"; + + // A net property which overrides the disabled set above. + private static final String enabledAlgPropName = + propPrefix + "reEnabledAlgorithms"; + + // Set of disabled message digest algorithms + private static final Set disabledDigests; + // true if http.auth.digest.quoteParameters Net property is true private static final boolean delimCompatFlag; + private static final PlatformLogger logger = + HttpURLConnection.getHttpLogger(); + static { @SuppressWarnings("removal") Boolean b = AccessController.doPrivileged( - new PrivilegedAction<>() { - public Boolean run() { - return NetProperties.getBoolean(compatPropName); - } - } + (PrivilegedAction) () -> NetProperties.getBoolean(compatPropName) ); delimCompatFlag = (b == null) ? false : b.booleanValue(); + + @SuppressWarnings("removal") + String secprops = AccessController.doPrivileged( + (PrivilegedAction) () -> Security.getProperty(secPropName) + ); + + Set algs = new HashSet<>(); + + // add the default insecure algorithms to set + processPropValue(secprops, algs, (set, elem) -> set.add(elem)); + + @SuppressWarnings("removal") + String netprops = AccessController.doPrivileged( + (PrivilegedAction) () -> NetProperties.get(enabledAlgPropName) + ); + // remove any algorithms from disabled set that were opted-in by user + processPropValue(netprops, algs, (set, elem) -> set.remove(elem)); + disabledDigests = Set.copyOf(algs); } // Authentication parameters defined in RFC2617. @@ -90,9 +150,18 @@ class DigestAuthentication extends AuthenticationInfo { private String cnonce; private String nonce; private String algorithm; + // Normally same as algorithm, but excludes the -SESS suffix if present + private String digestName; + private String charset; private int NCcount=0; - // The H(A1) string used for MD5-sess + // true if the server supports user hashing + // in which case the username returned to server + // will be H(unq(username) ":" unq(realm)) + // meaning the username doesn't appear in the clear + private boolean userhash; + + // The H(A1) string used for XXX-sess private String cachedHA1; // Force the HA1 value to be recalculated because the nonce has changed @@ -112,8 +181,10 @@ class DigestAuthentication extends AuthenticationInfo { serverQop = false; opaque = null; algorithm = null; + digestName = null; cachedHA1 = null; nonce = null; + charset = null; setNewCnonce(); } @@ -151,6 +222,24 @@ class DigestAuthentication extends AuthenticationInfo { redoCachedHA1 = true; } + synchronized boolean getUserhash() { + return userhash; + } + + synchronized void setUserhash(boolean userhash) { + this.userhash = userhash; + } + + synchronized Charset getCharset() { + return "UTF-8".equals(charset) + ? StandardCharsets.UTF_8 + : StandardCharsets.ISO_8859_1; + } + + synchronized void setCharset(String charset) { + this.charset = charset; + } + synchronized void setQop (String qop) { if (qop != null) { String items[] = qop.split(","); @@ -191,7 +280,13 @@ class DigestAuthentication extends AuthenticationInfo { } synchronized String getAlgorithm () { return algorithm;} + synchronized String getDigestName () { + return digestName; + } synchronized void setAlgorithm (String s) { algorithm=s;} + synchronized void setDigestName (String s) { + this.digestName = s; + } } Parameters params; @@ -309,6 +404,16 @@ class DigestAuthentication extends AuthenticationInfo { params.setNonce (p.findValue("nonce")); params.setOpaque (p.findValue("opaque")); params.setQop (p.findValue("qop")); + params.setUserhash (Boolean.valueOf(p.findValue("userhash"))); + String charset = p.findValue("charset"); + if (charset == null) { + charset = "ISO_8859_1"; + } else if (!charset.equalsIgnoreCase("UTF-8")) { + // UTF-8 is only valid value. ISO_8859_1 represents default behavior + // when the parameter is not set. + return false; + } + params.setCharset(charset.toUpperCase(Locale.ROOT)); String uri=""; String method; @@ -333,11 +438,9 @@ class DigestAuthentication extends AuthenticationInfo { authMethod = Character.toUpperCase(authMethod.charAt(0)) + authMethod.substring(1).toLowerCase(); } - String algorithm = p.findValue("algorithm"); - if (algorithm == null || algorithm.isEmpty()) { - algorithm = "MD5"; // The default, accoriding to rfc2069 - } - params.setAlgorithm (algorithm); + + if (!setAlgorithmNames(p, params)) + return false; // If authQop is true, then the server is doing RFC2617 and // has offered qop=auth. We do not support any other modes @@ -356,6 +459,38 @@ class DigestAuthentication extends AuthenticationInfo { } } + // Algorithm name is stored in two separate fields (of Paramaeters) + // This allows for variations in digest algorithm name (aliases) + // and also allow for the -sess variant defined in HTTP Digest protocol + // returns false if algorithm not supported + private static boolean setAlgorithmNames(HeaderParser p, Parameters params) { + String algorithm = p.findValue("algorithm"); + String digestName = algorithm; + if (algorithm == null || algorithm.isEmpty()) { + algorithm = "MD5"; // The default, accoriding to rfc2069 + digestName = "MD5"; + } else { + algorithm = algorithm.toUpperCase(Locale.ROOT); + digestName = algorithm; + } + if (algorithm.endsWith("-SESS")) { + digestName = algorithm.substring(0, algorithm.length() - 5); + algorithm = digestName + "-sess"; // suffix lower case + } + if (digestName.equals("SHA-512-256")) { + digestName = "SHA-512/256"; + } + var oid = KnownOIDs.findMatch(digestName); + if (oid == null) { + log("unknown algorithm: " + algorithm); + return false; + } + digestName = oid.stdName(); + params.setAlgorithm (algorithm); + params.setDigestName (digestName); + return true; + } + /* Calculate the Authorization header field given the request URI * and based on the authorization information in params */ @@ -367,6 +502,14 @@ class DigestAuthentication extends AuthenticationInfo { String cnonce = params.getCnonce (); String nonce = params.getNonce (); String algorithm = params.getAlgorithm (); + String digest = params.getDigestName (); + try { + validateDigest(digest); + } catch (IOException e) { + return null; + } + Charset charset = params.getCharset(); + boolean userhash = params.getUserhash (); params.incrementNC (); int nccount = params.getNCCount (); String ncstring=null; @@ -378,10 +521,14 @@ class DigestAuthentication extends AuthenticationInfo { ncstring = zeroPad [len] + ncstring; } + boolean session = algorithm.endsWith ("-sess"); + try { response = computeDigest(true, pw.getUserName(),passwd,realm, - method, uri, nonce, cnonce, ncstring); - } catch (NoSuchAlgorithmException ex) { + method, uri, nonce, cnonce, ncstring, + digest, session, charset); + } catch (CharacterCodingException | NoSuchAlgorithmException ex) { + log(ex.getMessage()); return null; } @@ -402,11 +549,24 @@ class DigestAuthentication extends AuthenticationInfo { qopS = ", qop=auth"; } + String user = pw.getUserName(); + String userhashField = ""; + try { + if (userhash) { + user = computeUserhash(digest, user, realm, charset); + userhashField = ", userhash=true"; + } + } catch (CharacterCodingException | NoSuchAlgorithmException ex) { + log(ex.getMessage()); + return null; + } + String value = authMethod - + " username=\"" + pw.getUserName() + + " username=\"" + user + "\", realm=\"" + realm + "\", nonce=\"" + nonce + ncfield + + userhashField + ", uri=\"" + uri + "\", response=\"" + response + "\"" + algoS; @@ -427,6 +587,27 @@ class DigestAuthentication extends AuthenticationInfo { checkResponse (header, method, url.getFile()); } + private static void log(String msg) { + if (logger.isLoggable(PlatformLogger.Level.INFO)) { + logger.info(msg); + } + } + + private void validateDigest(String name) throws IOException { + if (getAuthType() == AuthCacheValue.Type.Server && + getProtocolScheme().equals("https")) { + // HTTPS server authentication can use any algorithm + return; + } + if (disabledDigests.contains(name)) { + String msg = "Rejecting digest authentication with insecure algorithm: " + + name; + log(msg + " This constraint may be relaxed by setting " + + "the \"http.auth.digest.reEnabledAlgorithms\" system property."); + throw new IOException(msg); + } + } + public void checkResponse (String header, String method, String uri) throws IOException { char[] passwd = pw.getPassword(); @@ -436,6 +617,9 @@ class DigestAuthentication extends AuthenticationInfo { String cnonce = params.cnonce; String nonce = params.getNonce (); String algorithm = params.getAlgorithm (); + String digest = params.getDigestName (); + Charset charset = params.getCharset(); + validateDigest(digest); int nccount = params.getNCCount (); String ncstring=null; @@ -443,15 +627,21 @@ class DigestAuthentication extends AuthenticationInfo { throw new ProtocolException ("No authentication information in response"); } + boolean session = algorithm.endsWith ("-SESS"); + if (session) { + algorithm = algorithm.substring(0, algorithm.length() - 5); + } + if (nccount != -1) { - ncstring = Integer.toHexString (nccount).toUpperCase(); + ncstring = Integer.toHexString (nccount).toUpperCase(Locale.ROOT); int len = ncstring.length(); if (len < 8) ncstring = zeroPad [len] + ncstring; } try { - String expected = computeDigest(false, username,passwd,realm, - method, uri, nonce, cnonce, ncstring); + String expected = computeDigest(false, username,passwd,realm, method, uri, + nonce, cnonce, ncstring, digest, + session, charset); HeaderParser p = new HeaderParser (header); String rspauth = p.findValue ("rspauth"); if (rspauth == null) { @@ -468,34 +658,45 @@ class DigestAuthentication extends AuthenticationInfo { } catch (NoSuchAlgorithmException ex) { throw new ProtocolException ("Unsupported algorithm in response"); + } catch (CharacterCodingException ex) { + throw new ProtocolException ("Invalid characters in username or password"); } } + private String computeUserhash(String digest, String user, + String realm, Charset charset) + throws NoSuchAlgorithmException, CharacterCodingException + { + MessageDigest md = MessageDigest.getInstance(digest); + String s = user + ":" + realm; + return encode(s, null, md, charset); + } + private String computeDigest( boolean isRequest, String userName, char[] password, String realm, String connMethod, String requestURI, String nonceString, - String cnonce, String ncValue - ) throws NoSuchAlgorithmException + String cnonce, String ncValue, + String algorithm, boolean session, + Charset charset + ) throws NoSuchAlgorithmException, CharacterCodingException { String A1, HashA1; - String algorithm = params.getAlgorithm (); - boolean md5sess = algorithm.equalsIgnoreCase ("MD5-sess"); - MessageDigest md = MessageDigest.getInstance(md5sess?"MD5":algorithm); + MessageDigest md = MessageDigest.getInstance(algorithm); - if (md5sess) { + if (session) { if ((HashA1 = params.getCachedHA1 ()) == null) { String s = userName + ":" + realm + ":"; - String s1 = encode (s, password, md); + String s1 = encode (s, password, md, charset); A1 = s1 + ":" + nonceString + ":" + cnonce; - HashA1 = encode(A1, null, md); + HashA1 = encode(A1, null, md, charset); params.setCachedHA1 (HashA1); } } else { A1 = userName + ":" + realm + ":"; - HashA1 = encode(A1, password, md); + HashA1 = encode(A1, password, md, charset); } String A2; @@ -504,7 +705,7 @@ class DigestAuthentication extends AuthenticationInfo { } else { A2 = ":" + requestURI; } - String HashA2 = encode(A2, null, md); + String HashA2 = encode(A2, null, md, ISO_8859_1.INSTANCE); String combo, finalHash; if (params.authQop()) { /* RRC2617 when qop=auth */ @@ -516,7 +717,7 @@ class DigestAuthentication extends AuthenticationInfo { nonceString + ":" + HashA2; } - finalHash = encode(combo, null, md); + finalHash = encode(combo, null, md, ISO_8859_1.INSTANCE); return finalHash; } @@ -530,17 +731,28 @@ class DigestAuthentication extends AuthenticationInfo { "00000000", "0000000", "000000", "00000", "0000", "000", "00", "0" }; - private String encode(String src, char[] passwd, MessageDigest md) { - md.update(src.getBytes(ISO_8859_1.INSTANCE)); + private String encode(String src, char[] passwd, MessageDigest md, Charset charset) + throws CharacterCodingException + { + boolean isUtf8 = charset.equals(StandardCharsets.UTF_8); + + if (isUtf8) { + src = Normalizer.normalize(src, Normalizer.Form.NFC); + } + md.update(src.getBytes(charset)); if (passwd != null) { - byte[] passwdBytes = new byte[passwd.length]; - for (int i=0; i>> 4) & 0xf); @@ -550,4 +762,15 @@ class DigestAuthentication extends AuthenticationInfo { } return res.toString(); } + + private static byte[] getUtf8Bytes(char[] passwd) throws CharacterCodingException { + CharBuffer cb = CharBuffer.wrap(passwd); + CharsetEncoder encoder = StandardCharsets.UTF_8.newEncoder(); + ByteBuffer bb = encoder.encode(cb); + byte[] buf = new byte[bb.remaining()]; + bb.get(buf); + if (bb.hasArray()) + Arrays.fill(bb.array(), bb.arrayOffset(), bb.capacity(), (byte)0); + return buf; + } } diff --git a/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java b/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java index 7ed4381dda6e6c231fb2542a7694beacbf8ab120..ff54e474b8e696d2b93c0ff6e13f103617e2ff0b 100644 --- a/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java +++ b/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java @@ -332,10 +332,11 @@ public abstract class AbstractDelegateHttpsURLConnection extends if (prop.startsWith("domain:")) { String[] domains = prop.substring(7).split(","); for (String domain : domains) { - if (target.equals(domain)) { + if (target.equalsIgnoreCase(domain)) { return true; } - if (domain.startsWith("*.") && target.endsWith(domain.substring(1))) { + if (domain.startsWith("*.") && target.regionMatches( + true, target.length() - domain.length() + 1, domain, 1, domain.length() - 1)) { return true; } } diff --git a/src/java.base/share/classes/sun/nio/fs/Reflect.java b/src/java.base/share/classes/sun/nio/fs/Reflect.java deleted file mode 100644 index 1f995543b6490b2f867b6deb4bed9aea21a9a4b4..0000000000000000000000000000000000000000 --- a/src/java.base/share/classes/sun/nio/fs/Reflect.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute 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.nio.fs; - -import java.lang.reflect.*; -import java.security.AccessController; -import java.security.PrivilegedAction; - -/** - * Utility class for reflection. - */ - -class Reflect { - private Reflect() {} - - @SuppressWarnings("removal") - private static void setAccessible(final AccessibleObject ao) { - AccessController.doPrivileged(new PrivilegedAction() { - @Override - public Object run() { - ao.setAccessible(true); - return null; - }}); - } - - /** - * Lookup the field of a given class. - */ - static Field lookupField(String className, String fieldName) { - try { - Class cl = Class.forName(className); - Field f = cl.getDeclaredField(fieldName); - setAccessible(f); - return f; - } catch (ClassNotFoundException x) { - throw new AssertionError(x); - } catch (NoSuchFieldException x) { - throw new AssertionError(x); - } - } -} diff --git a/src/java.base/share/classes/sun/reflect/generics/repository/GenericDeclRepository.java b/src/java.base/share/classes/sun/reflect/generics/repository/GenericDeclRepository.java index 5a34ab1749ad980ead70fa2d8aafbd40c5e571eb..841526320474e2989a957ca5ad0578a68cbe3853 100644 --- a/src/java.base/share/classes/sun/reflect/generics/repository/GenericDeclRepository.java +++ b/src/java.base/share/classes/sun/reflect/generics/repository/GenericDeclRepository.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,6 +42,8 @@ import sun.reflect.generics.visitor.Reifier; public abstract class GenericDeclRepository extends AbstractRepository { + public static final TypeVariable[] EMPTY_TYPE_VARS = new TypeVariable[0]; + /** The formal type parameters. Lazily initialized. */ private volatile TypeVariable[] typeParameters; @@ -77,6 +79,9 @@ public abstract class GenericDeclRepository FormalTypeParameter[] ftps = getTree().getFormalTypeParameters(); // create array to store reified subtree(s) int length = ftps.length; + if (length == 0) { + return EMPTY_TYPE_VARS; + } TypeVariable[] typeParameters = new TypeVariable[length]; // reify all subtrees for (int i = 0; i < length; i++) { diff --git a/src/java.base/share/classes/sun/security/pkcs/PKCS7.java b/src/java.base/share/classes/sun/security/pkcs/PKCS7.java index 3484bd04c32d3bfc4bde87ff94c7e3326f8bbb3e..da6d1687a6d5426ffd5b6873471f59beccb3944c 100644 --- a/src/java.base/share/classes/sun/security/pkcs/PKCS7.java +++ b/src/java.base/share/classes/sun/security/pkcs/PKCS7.java @@ -940,7 +940,7 @@ public class PKCS7 { /** * Examine the certificate for a Subject Information Access extension - * (RFC 5280). + * (RFC 5280). * The extension's {@code accessMethod} field should contain the object * identifier defined for timestamping: 1.3.6.1.5.5.7.48.3 and its * {@code accessLocation} field should contain an HTTP or HTTPS URL. diff --git a/src/java.base/share/classes/sun/security/rsa/PSSParameters.java b/src/java.base/share/classes/sun/security/rsa/PSSParameters.java index 5a1584b0a9ea1244820d800597329c995cf5663c..1a317a3ed146d3e9cd7707ebfe5eb1306fbcf4eb 100644 --- a/src/java.base/share/classes/sun/security/rsa/PSSParameters.java +++ b/src/java.base/share/classes/sun/security/rsa/PSSParameters.java @@ -34,7 +34,6 @@ import java.security.spec.AlgorithmParameterSpec; import java.security.spec.InvalidParameterSpecException; import java.security.spec.MGF1ParameterSpec; import java.security.spec.PSSParameterSpec; -import static java.security.spec.PSSParameterSpec.DEFAULT; /** * This class implements the PSS parameters used with the RSA @@ -81,12 +80,12 @@ public final class PSSParameters extends AlgorithmParametersSpi { @Override protected void engineInit(byte[] encoded) throws IOException { - // first initialize with the DEFAULT values before - // retrieving from the encoding bytes - String mdName = DEFAULT.getDigestAlgorithm(); - MGF1ParameterSpec mgfSpec = (MGF1ParameterSpec) DEFAULT.getMGFParameters(); - int saltLength = DEFAULT.getSaltLength(); - int trailerField = DEFAULT.getTrailerField(); + // first initialize with the ASN.1 DEFAULT values defined in PKCS #1 + // v2.2 since the encoding bytes may not define all fields + String mdName = "SHA-1"; + MGF1ParameterSpec mgfSpec = MGF1ParameterSpec.SHA1; + int saltLength = 20; + int trailerField = PSSParameterSpec.TRAILER_FIELD_BC; DerInputStream der = new DerInputStream(encoded); DerValue[] datum = der.getSequence(4); diff --git a/src/java.base/share/classes/sun/security/ssl/Alert.java b/src/java.base/share/classes/sun/security/ssl/Alert.java index bc034dc8c3bcfbc0eae58c61e75d7017a5b4e3eb..922937887aaaceb25a202578dda1eecc191e6fc9 100644 --- a/src/java.base/share/classes/sun/security/ssl/Alert.java +++ b/src/java.base/share/classes/sun/security/ssl/Alert.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -122,22 +122,15 @@ enum Alert { reason = (cause != null) ? cause.getMessage() : ""; } - SSLException ssle; if (cause instanceof IOException) { - ssle = new SSLException(reason); + return new SSLException(reason, cause); } else if ((this == UNEXPECTED_MESSAGE)) { - ssle = new SSLProtocolException(reason); + return new SSLProtocolException(reason, cause); } else if (handshakeOnly) { - ssle = new SSLHandshakeException(reason); + return new SSLHandshakeException(reason, cause); } else { - ssle = new SSLException(reason); + return new SSLException(reason, cause); } - - if (cause != null) { - ssle.initCause(cause); - } - - return ssle; } /** diff --git a/src/java.base/share/classes/sun/security/ssl/CipherSuite.java b/src/java.base/share/classes/sun/security/ssl/CipherSuite.java index 8500ae7e188ee0c750a01f647eaf6b6ae8fd22dd..d957d7b20bdda7ee183a916f0fd2d01c687bbd6a 100644 --- a/src/java.base/share/classes/sun/security/ssl/CipherSuite.java +++ b/src/java.base/share/classes/sun/security/ssl/CipherSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,9 +54,9 @@ enum CipherSuite { // changed later, see below). // 2. Prefer forward secrecy cipher suites. // 3. Prefer the stronger bulk cipher, in the order of AES_256(GCM), - // AES_128(GCM), AES_256, AES_128, 3DES-EDE. + // AES_128(GCM), AES_256, AES_128. // 4. Prefer the stronger MAC algorithm, in the order of SHA384, - // SHA256, SHA, MD5. + // SHA256, SHA. // 5. Prefer the better performance of key exchange and digital // signature algorithm, in the order of ECDHE-ECDSA, ECDHE-RSA, // DHE-RSA, DHE-DSS, ECDH-ECDSA, ECDH-RSA, RSA. @@ -327,41 +327,6 @@ enum CipherSuite { ProtocolVersion.PROTOCOLS_TO_12, K_RSA, B_AES_128, M_SHA, H_SHA256), - // 3DES_EDE, forward secrecy. - TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA( - 0xC008, true, "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", "", - ProtocolVersion.PROTOCOLS_TO_12, - K_ECDHE_ECDSA, B_3DES, M_SHA, H_SHA256), - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA( - 0xC012, true, "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", "", - ProtocolVersion.PROTOCOLS_TO_12, - K_ECDHE_RSA, B_3DES, M_SHA, H_SHA256), - SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA( - 0x0016, true, "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA", - "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA", - ProtocolVersion.PROTOCOLS_TO_12, - K_DHE_RSA, B_3DES, M_SHA, H_SHA256), - SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA( - 0x0013, true, "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA", - "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA", - ProtocolVersion.PROTOCOLS_TO_12, - K_DHE_DSS, B_3DES, M_SHA, H_SHA256), - - // 3DES_EDE, not forward secrecy. - TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA( - 0xC003, true, "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA", "", - ProtocolVersion.PROTOCOLS_TO_12, - K_ECDH_ECDSA, B_3DES, M_SHA, H_SHA256), - TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA( - 0xC00D, true, "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA", "", - ProtocolVersion.PROTOCOLS_TO_12, - K_ECDH_RSA, B_3DES, M_SHA, H_SHA256), - SSL_RSA_WITH_3DES_EDE_CBC_SHA( - 0x000A, true, "SSL_RSA_WITH_3DES_EDE_CBC_SHA", - "TLS_RSA_WITH_3DES_EDE_CBC_SHA", - ProtocolVersion.PROTOCOLS_TO_12, - K_RSA, B_3DES, M_SHA, H_SHA256), - // Renegotiation protection request Signalling Cipher Suite Value (SCSV). TLS_EMPTY_RENEGOTIATION_INFO_SCSV( // RFC 5746, TLS 1.2 and prior 0x00FF, true, "TLS_EMPTY_RENEGOTIATION_INFO_SCSV", "", @@ -413,6 +378,41 @@ enum CipherSuite { 0x0034, false, "TLS_DH_anon_WITH_AES_128_CBC_SHA", "", ProtocolVersion.PROTOCOLS_TO_12, K_DH_ANON, B_AES_128, M_SHA, H_SHA256), + + // 3DES_EDE, forward secrecy. + TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA( + 0xC008, false, "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", "", + ProtocolVersion.PROTOCOLS_TO_12, + K_ECDHE_ECDSA, B_3DES, M_SHA, H_SHA256), + TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA( + 0xC012, false, "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", "", + ProtocolVersion.PROTOCOLS_TO_12, + K_ECDHE_RSA, B_3DES, M_SHA, H_SHA256), + SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA( + 0x0016, false, "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA", + "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA", + ProtocolVersion.PROTOCOLS_TO_12, + K_DHE_RSA, B_3DES, M_SHA, H_SHA256), + SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA( + 0x0013, false, "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA", + "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA", + ProtocolVersion.PROTOCOLS_TO_12, + K_DHE_DSS, B_3DES, M_SHA, H_SHA256), + + // 3DES_EDE, not forward secrecy. + TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA( + 0xC003, false, "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA", "", + ProtocolVersion.PROTOCOLS_TO_12, + K_ECDH_ECDSA, B_3DES, M_SHA, H_SHA256), + TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA( + 0xC00D, false, "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA", "", + ProtocolVersion.PROTOCOLS_TO_12, + K_ECDH_RSA, B_3DES, M_SHA, H_SHA256), + SSL_RSA_WITH_3DES_EDE_CBC_SHA( + 0x000A, false, "SSL_RSA_WITH_3DES_EDE_CBC_SHA", + "TLS_RSA_WITH_3DES_EDE_CBC_SHA", + ProtocolVersion.PROTOCOLS_TO_12, + K_RSA, B_3DES, M_SHA, H_SHA256), TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA( 0xC017, false, "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA", "", ProtocolVersion.PROTOCOLS_TO_12, diff --git a/src/java.base/share/classes/sun/security/ssl/DHClientKeyExchange.java b/src/java.base/share/classes/sun/security/ssl/DHClientKeyExchange.java index f9753ffe078b6c13f813e23500aa9556c75e27b0..996e3f78ec162b97f95b3abbe150f7a8d942f120 100644 --- a/src/java.base/share/classes/sun/security/ssl/DHClientKeyExchange.java +++ b/src/java.base/share/classes/sun/security/ssl/DHClientKeyExchange.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -295,8 +295,8 @@ final class DHClientKeyExchange { shc.handshakeCredentials.add( new DHECredentials(peerPublicKey, namedGroup)); } catch (GeneralSecurityException | java.io.IOException e) { - throw (SSLHandshakeException)(new SSLHandshakeException( - "Could not generate DHPublicKey").initCause(e)); + throw new SSLHandshakeException( + "Could not generate DHPublicKey", e); } // update the states diff --git a/src/java.base/share/classes/sun/security/ssl/ECDHKeyExchange.java b/src/java.base/share/classes/sun/security/ssl/ECDHKeyExchange.java index 59bc40411ce86580ebfefd2a6daf62d985aa4cc9..9833ea94e8d48ec3aa80f87226fbf16515c275da 100644 --- a/src/java.base/share/classes/sun/security/ssl/ECDHKeyExchange.java +++ b/src/java.base/share/classes/sun/security/ssl/ECDHKeyExchange.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -160,8 +160,7 @@ final class ECDHKeyExchange { ka.doPhase(peerPublicKey, true); return ka.generateSecret("TlsPremasterSecret"); } catch (GeneralSecurityException e) { - throw (SSLHandshakeException) new SSLHandshakeException( - "Could not generate secret").initCause(e); + throw new SSLHandshakeException("Could not generate secret", e); } } @@ -177,8 +176,7 @@ final class ECDHKeyExchange { PublicKey peerPublicKey = kf.generatePublic(spec); return getAgreedSecret(peerPublicKey); } catch (GeneralSecurityException | java.io.IOException e) { - throw (SSLHandshakeException) new SSLHandshakeException( - "Could not generate secret").initCause(e); + throw new SSLHandshakeException("Could not generate secret", e); } } @@ -202,8 +200,8 @@ final class ECDHKeyExchange { "ECPublicKey does not comply to algorithm constraints"); } } catch (GeneralSecurityException | java.io.IOException e) { - throw (SSLHandshakeException) new SSLHandshakeException( - "Could not generate ECPublicKey").initCause(e); + throw new SSLHandshakeException( + "Could not generate ECPublicKey", e); } } diff --git a/src/java.base/share/classes/sun/security/ssl/KAKeyDerivation.java b/src/java.base/share/classes/sun/security/ssl/KAKeyDerivation.java index 7c791e85f773481a632d3313fc62bde60637c353..b76da75c763cca16cb8933af724c3ac86a371e6c 100644 --- a/src/java.base/share/classes/sun/security/ssl/KAKeyDerivation.java +++ b/src/java.base/share/classes/sun/security/ssl/KAKeyDerivation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -88,8 +88,7 @@ public class KAKeyDerivation implements SSLKeyDerivation { context, preMasterSecret); return kd.deriveKey("MasterSecret", params); } catch (GeneralSecurityException gse) { - throw (SSLHandshakeException) new SSLHandshakeException( - "Could not generate secret").initCause(gse); + throw new SSLHandshakeException("Could not generate secret", gse); } } @@ -125,8 +124,7 @@ public class KAKeyDerivation implements SSLKeyDerivation { // derive handshake secret return hkdf.extract(saltSecret, sharedSecret, algorithm); } catch (GeneralSecurityException gse) { - throw (SSLHandshakeException) new SSLHandshakeException( - "Could not generate secret").initCause(gse); + throw new SSLHandshakeException("Could not generate secret", gse); } } } diff --git a/src/java.base/share/classes/sun/security/ssl/NewSessionTicket.java b/src/java.base/share/classes/sun/security/ssl/NewSessionTicket.java index 50f19dbf715c1e101a92923f098b54edb0b68eff..337c83849915be30a3e27e862ef571cc3dc0406b 100644 --- a/src/java.base/share/classes/sun/security/ssl/NewSessionTicket.java +++ b/src/java.base/share/classes/sun/security/ssl/NewSessionTicket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -302,8 +302,7 @@ final class NewSessionTicket { return hkdf.expand(resumptionMasterSecret, hkdfInfo, hashAlg.hashLength, "TlsPreSharedKey"); } catch (GeneralSecurityException gse) { - throw (SSLHandshakeException) new SSLHandshakeException( - "Could not derive PSK").initCause(gse); + throw new SSLHandshakeException("Could not derive PSK", gse); } } diff --git a/src/java.base/share/classes/sun/security/ssl/SSLBasicKeyDerivation.java b/src/java.base/share/classes/sun/security/ssl/SSLBasicKeyDerivation.java index 7f6934006379551ad9c1fc220f71e67d78c284be..20fc711259379d262fcf866c30d425a23487b6bc 100644 --- a/src/java.base/share/classes/sun/security/ssl/SSLBasicKeyDerivation.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLBasicKeyDerivation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,8 +52,7 @@ final class SSLBasicKeyDerivation implements SSLKeyDerivation { return hkdf.expand(secret, hkdfInfo, ((SecretSizeSpec)keySpec).length, algorithm); } catch (GeneralSecurityException gse) { - throw (SSLHandshakeException) new SSLHandshakeException( - "Could not generate secret").initCause(gse); + throw new SSLHandshakeException("Could not generate secret", gse); } } diff --git a/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java b/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java index ca4a80c5a5c550706ab85692df6c7e5170f3a62e..990b91268324688d525e80c362bee1d74b5694be 100644 --- a/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,7 +48,7 @@ import javax.net.ssl.SSLProtocolException; import javax.net.ssl.SSLSession; /** - * Implementation of an non-blocking SSLEngine. + * Implementation of a non-blocking SSLEngine. * * @author Brad Wetmore */ @@ -270,7 +270,7 @@ final class SSLEngineImpl extends SSLEngine implements SSLTransport { if (ciphertext == null && !conContext.isNegotiated && conContext.isInboundClosed() && hsStatus == HandshakeStatus.NEED_WRAP) { - // Even the outboud is open, no futher data could be wrapped as: + // Even the outbound is open, no further data could be wrapped as: // 1. the outbound is empty // 2. no negotiated connection // 3. the inbound has closed, cannot complete the handshake @@ -789,17 +789,17 @@ final class SSLEngineImpl extends SSLEngine implements SSLTransport { // Is it ready to close inbound? // // No exception if the initial handshake is not started. - if (!conContext.isInputCloseNotified && - (conContext.isNegotiated || - conContext.handshakeContext != null)) { - - throw conContext.fatal(Alert.INTERNAL_ERROR, + if (!conContext.isInputCloseNotified && (conContext.isNegotiated + || conContext.handshakeContext != null)) { + throw new SSLException( "closing inbound before receiving peer's close_notify"); } - - conContext.closeInbound(); } finally { - engineLock.unlock(); + try { + conContext.closeInbound(); + } finally { + engineLock.unlock(); + } } } @@ -1167,17 +1167,13 @@ final class SSLEngineImpl extends SSLEngine implements SSLTransport { if (taskThrown instanceof RuntimeException) { throw new RuntimeException(msg, taskThrown); } else if (taskThrown instanceof SSLHandshakeException) { - return (SSLHandshakeException) - new SSLHandshakeException(msg).initCause(taskThrown); + return new SSLHandshakeException(msg, taskThrown); } else if (taskThrown instanceof SSLKeyException) { - return (SSLKeyException) - new SSLKeyException(msg).initCause(taskThrown); + return new SSLKeyException(msg, taskThrown); } else if (taskThrown instanceof SSLPeerUnverifiedException) { - return (SSLPeerUnverifiedException) - new SSLPeerUnverifiedException(msg).initCause(taskThrown); + return new SSLPeerUnverifiedException(msg, taskThrown); } else if (taskThrown instanceof SSLProtocolException) { - return (SSLProtocolException) - new SSLProtocolException(msg).initCause(taskThrown); + return new SSLProtocolException(msg, taskThrown); } else if (taskThrown instanceof SSLException) { return (SSLException)taskThrown; } else { diff --git a/src/java.base/share/classes/sun/security/ssl/SSLEngineInputRecord.java b/src/java.base/share/classes/sun/security/ssl/SSLEngineInputRecord.java index 938768aaf76bb26fd53b9342e9c5f5497b87bcb4..dc957ca141949a99d2c155cd445895091724f4cb 100644 --- a/src/java.base/share/classes/sun/security/ssl/SSLEngineInputRecord.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLEngineInputRecord.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -242,8 +242,7 @@ final class SSLEngineInputRecord extends InputRecord implements SSLRecord { } catch (BadPaddingException bpe) { throw bpe; } catch (GeneralSecurityException gse) { - throw (SSLProtocolException)(new SSLProtocolException( - "Unexpected exception")).initCause(gse); + throw new SSLProtocolException("Unexpected exception", gse); } finally { // consume a complete record packet.limit(srcLim); diff --git a/src/java.base/share/classes/sun/security/ssl/SSLSecretDerivation.java b/src/java.base/share/classes/sun/security/ssl/SSLSecretDerivation.java index a7ba9a5e566a5aeabfae7e0083d63ec4d42e4807..ff13948a67c20b65b4b5c2e48112ff17b3fd2b6e 100644 --- a/src/java.base/share/classes/sun/security/ssl/SSLSecretDerivation.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLSecretDerivation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * 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,8 +113,7 @@ final class SSLSecretDerivation implements SSLKeyDerivation { HKDF hkdf = new HKDF(hashAlg.name); return hkdf.expand(secret, hkdfInfo, hashAlg.hashLength, algorithm); } catch (GeneralSecurityException gse) { - throw (SSLHandshakeException) new SSLHandshakeException( - "Could not generate secret").initCause(gse); + throw new SSLHandshakeException("Could not generate secret", gse); } } diff --git a/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java b/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java index 842cef119113d02abe9fa9c6196b5dc8942cf633..879d3901e31ff009abc25bc5391519fd10a39901 100644 --- a/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -838,9 +838,10 @@ public final class SSLSocketImpl // No need to throw exception if the initial handshake is not started. try { if (checkCloseNotify && !conContext.isInputCloseNotified && - (conContext.isNegotiated || conContext.handshakeContext != null)) { - throw new SSLException( - "closing inbound before receiving peer's close_notify"); + (conContext.isNegotiated || + conContext.handshakeContext != null)) { + throw new SSLException( + "closing inbound before receiving peer's close_notify"); } } finally { conContext.closeInbound(); @@ -1709,19 +1710,13 @@ public final class SSLSocketImpl private Plaintext handleEOF(EOFException eofe) throws IOException { if (requireCloseNotify || conContext.handshakeContext != null) { - SSLException ssle; if (conContext.handshakeContext != null) { - ssle = new SSLHandshakeException( - "Remote host terminated the handshake"); + throw new SSLHandshakeException( + "Remote host terminated the handshake", eofe); } else { - ssle = new SSLProtocolException( - "Remote host terminated the connection"); - } - - if (eofe != null) { - ssle.initCause(eofe); + throw new SSLProtocolException( + "Remote host terminated the connection", eofe); } - throw ssle; } else { // treat as if we had received a close_notify conContext.isInputCloseNotified = true; diff --git a/src/java.base/share/classes/sun/security/ssl/SSLSocketInputRecord.java b/src/java.base/share/classes/sun/security/ssl/SSLSocketInputRecord.java index da189f4f3fff342abd2e53a47f642d25c22507b7..7afacb0f3d77c96e7d233428a54d1b0f086e1a93 100644 --- a/src/java.base/share/classes/sun/security/ssl/SSLSocketInputRecord.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLSocketInputRecord.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -263,8 +263,7 @@ final class SSLSocketInputRecord extends InputRecord implements SSLRecord { } catch (BadPaddingException bpe) { throw bpe; } catch (GeneralSecurityException gse) { - throw (SSLProtocolException)(new SSLProtocolException( - "Unexpected exception")).initCause(gse); + throw new SSLProtocolException("Unexpected exception", gse); } if (contentType != ContentType.HANDSHAKE.id && diff --git a/src/java.base/share/classes/sun/security/ssl/SSLTrafficKeyDerivation.java b/src/java.base/share/classes/sun/security/ssl/SSLTrafficKeyDerivation.java index ac39cbb16fbd930d0befc33522127fbd2f6dc11e..6e890c8818dc05228f50052cc5284fb707283b7b 100644 --- a/src/java.base/share/classes/sun/security/ssl/SSLTrafficKeyDerivation.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLTrafficKeyDerivation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -154,8 +154,8 @@ enum SSLTrafficKeyDerivation implements SSLKeyDerivationGenerator { ks.getKeyLength(cs), ks.getAlgorithm(cs, algorithm)); } catch (GeneralSecurityException gse) { - throw (SSLHandshakeException)(new SSLHandshakeException( - "Could not generate secret").initCause(gse)); + throw new SSLHandshakeException( + "Could not generate secret", gse); } } diff --git a/src/java.base/share/classes/sun/security/ssl/ServerHello.java b/src/java.base/share/classes/sun/security/ssl/ServerHello.java index 193a71cde861ebaac056b74caa2650051ce33a39..efbe860bfd6be6fc64dfe73a31c19e95039ad6c2 100644 --- a/src/java.base/share/classes/sun/security/ssl/ServerHello.java +++ b/src/java.base/share/classes/sun/security/ssl/ServerHello.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1205,8 +1205,7 @@ final class ServerHello { hc.handshakeKeyDerivation = new SSLSecretDerivation(hc, earlySecret); } catch (GeneralSecurityException gse) { - throw (SSLHandshakeException) new SSLHandshakeException( - "Could not generate secret").initCause(gse); + throw new SSLHandshakeException("Could not generate secret", gse); } } diff --git a/src/java.base/share/classes/sun/security/ssl/ServerNameExtension.java b/src/java.base/share/classes/sun/security/ssl/ServerNameExtension.java index 74f38bf5b56c448f84d0ca3bef6143c8e17b6404..eaf154af3bb4c989df54cc609d7d14f0f570039e 100644 --- a/src/java.base/share/classes/sun/security/ssl/ServerNameExtension.java +++ b/src/java.base/share/classes/sun/security/ssl/ServerNameExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -135,9 +135,8 @@ final class ServerNameExtension { nameType + "), name=" + (new String(encoded, StandardCharsets.UTF_8)) + ", value={" + - Utilities.toHexString(encoded) + "}"); - throw hc.conContext.fatal(Alert.ILLEGAL_PARAMETER, - (SSLProtocolException)spe.initCause(iae)); + Utilities.toHexString(encoded) + "}", iae); + throw hc.conContext.fatal(Alert.ILLEGAL_PARAMETER, spe); } } else { try { @@ -146,9 +145,8 @@ final class ServerNameExtension { SSLProtocolException spe = new SSLProtocolException( "Illegal server name, type=(" + nameType + "), value={" + - Utilities.toHexString(encoded) + "}"); - throw hc.conContext.fatal(Alert.ILLEGAL_PARAMETER, - (SSLProtocolException)spe.initCause(iae)); + Utilities.toHexString(encoded) + "}", iae); + throw hc.conContext.fatal(Alert.ILLEGAL_PARAMETER, spe); } } diff --git a/src/java.base/share/classes/sun/security/tools/keytool/Main.java b/src/java.base/share/classes/sun/security/tools/keytool/Main.java index 032fcd768ea0900d5b3a710edf79cc75402afc76..0a1b889db6d4f97198002ad68d8f18112af0c89c 100644 --- a/src/java.base/share/classes/sun/security/tools/keytool/Main.java +++ b/src/java.base/share/classes/sun/security/tools/keytool/Main.java @@ -42,8 +42,6 @@ import java.security.cert.TrustAnchor; import java.security.cert.URICertStoreParameters; -import java.security.interfaces.ECKey; -import java.security.interfaces.EdECKey; import java.security.spec.ECParameterSpec; import java.text.Collator; import java.text.MessageFormat; @@ -1919,6 +1917,8 @@ public final class Main { keysize = SecurityProviderConstants.DEF_EC_KEY_SIZE; } else if ("RSA".equalsIgnoreCase(keyAlgName)) { keysize = SecurityProviderConstants.DEF_RSA_KEY_SIZE; + } else if ("RSASSA-PSS".equalsIgnoreCase(keyAlgName)) { + keysize = SecurityProviderConstants.DEF_RSASSA_PSS_KEY_SIZE; } else if ("DSA".equalsIgnoreCase(keyAlgName)) { keysize = SecurityProviderConstants.DEF_DSA_KEY_SIZE; } else if ("EdDSA".equalsIgnoreCase(keyAlgName)) { @@ -2018,7 +2018,7 @@ public final class Main { ("Generating.keysize.bit.keyAlgName.key.pair.and.a.certificate.sigAlgName.issued.by.signerAlias.with.a.validity.of.validality.days.for")); Object[] source = { groupName == null ? keysize : KeyUtil.getKeySize(privKey), - fullDisplayAlgName(privKey), + KeyUtil.fullDisplayAlgName(privKey), newCert.getSigAlgName(), signerAlias, validity, @@ -2029,7 +2029,7 @@ public final class Main { ("Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for")); Object[] source = { groupName == null ? keysize : KeyUtil.getKeySize(privKey), - fullDisplayAlgName(privKey), + KeyUtil.fullDisplayAlgName(privKey), newCert.getSigAlgName(), validity, x500Name}; @@ -3560,24 +3560,10 @@ public final class Main { } } - private String fullDisplayAlgName(Key key) { - String result = key.getAlgorithm(); - if (key instanceof ECKey) { - ECParameterSpec paramSpec = ((ECKey) key).getParams(); - if (paramSpec instanceof NamedCurve) { - NamedCurve nc = (NamedCurve)paramSpec; - result += " (" + nc.getNameAndAliases()[0] + ")"; - } - } else if (key instanceof EdECKey) { - result = ((EdECKey) key).getParams().getName(); - } - return result; - } - private String withWeakConstraint(Key key, CertPathConstraintsParameters cpcp) { int kLen = KeyUtil.getKeySize(key); - String displayAlg = fullDisplayAlgName(key); + String displayAlg = KeyUtil.fullDisplayAlgName(key); try { DISABLED_CHECK.permits(key.getAlgorithm(), cpcp, true); } catch (CertPathValidatorException e) { @@ -4946,13 +4932,13 @@ public final class Main { weakWarnings.add(String.format( rb.getString("whose.key.weak"), label, String.format(rb.getString("key.bit"), - KeyUtil.getKeySize(key), fullDisplayAlgName(key)))); + KeyUtil.getKeySize(key), KeyUtil.fullDisplayAlgName(key)))); } } catch (CertPathValidatorException e) { weakWarnings.add(String.format( rb.getString("whose.key.disabled"), label, String.format(rb.getString("key.bit"), - KeyUtil.getKeySize(key), fullDisplayAlgName(key)))); + KeyUtil.getKeySize(key), KeyUtil.fullDisplayAlgName(key)))); } } } @@ -4973,12 +4959,12 @@ public final class Main { weakWarnings.add(String.format( rb.getString("whose.key.disabled"), label, String.format(rb.getString("key.bit"), - KeyUtil.getKeySize(key), fullDisplayAlgName(key)))); + KeyUtil.getKeySize(key), KeyUtil.fullDisplayAlgName(key)))); } else if (!LEGACY_CHECK.permits(SIG_PRIMITIVE_SET, key)) { weakWarnings.add(String.format( rb.getString("whose.key.weak"), label, String.format(rb.getString("key.bit"), - KeyUtil.getKeySize(key), fullDisplayAlgName(key)))); + KeyUtil.getKeySize(key), KeyUtil.fullDisplayAlgName(key)))); } } } diff --git a/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java b/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java index 24cdbabc3a8b8fbdbfc3f768eb2cb24c1e5321a3..5479bc1df2d15ebb9f85ff472e8dc9036935422a 100644 --- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java +++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,15 +45,15 @@ public class Resources_de extends java.util.ListResourceBundle { {"option.1.set.twice", "Die Option %s wurde mehrmals angegeben. Alle Angaben bis auf die letzte werden ignoriert."}, {"multiple.commands.1.2", "Nur ein Befehl ist zul\u00E4ssig: Sowohl %1$s als auch %2$s wurden angegeben."}, {"Use.keytool.help.for.all.available.commands", - "\"keytool -help\" f\u00FCr alle verf\u00FCgbaren Befehle verwenden"}, + "Verwenden Sie \"keytool -?, -h, or --help\" f\u00FCr diese Hilfemeldung"}, {"Key.and.Certificate.Management.Tool", "Schl\u00FCssel- und Zertifikatsverwaltungstool"}, {"Commands.", "Befehle:"}, {"Use.keytool.command.name.help.for.usage.of.command.name", - "Verwenden Sie \"keytool -command_name -help\" f\u00FCr die Verwendung von command_name.\nVerwenden Sie die Option -conf , um eine vorkonfigurierte Optionsdatei anzugeben."}, + "Verwenden Sie \"keytool -command_name --help\" f\u00FCr die Verwendung von command_name.\nVerwenden Sie die Option -conf , um eine vorkonfigurierte Optionsdatei anzugeben."}, // keytool: help: commands {"Generates.a.certificate.request", - "Generiert eine Zertifikatanforderung"}, //-certreq + "Generiert eine Zertifikatsanforderung"}, //-certreq {"Changes.an.entry.s.alias", "\u00C4ndert den Alias eines Eintrags"}, //-changealias {"Deletes.an.entry", @@ -65,7 +65,7 @@ public class Resources_de extends java.util.ListResourceBundle { {"Generates.a.secret.key", "Generiert einen Secret Key"}, //-genseckey {"Generates.certificate.from.a.certificate.request", - "Generiert ein Zertifikat aus einer Zertifikatanforderung"}, //-gencert + "Generiert ein Zertifikat aus einer Zertifikatsanforderung"}, //-gencert {"Generates.CRL", "Generiert eine CRL"}, //-gencrl {"Generated.keyAlgName.secret.key", "{0} Secret Key generiert"}, //-genseckey @@ -88,20 +88,25 @@ public class Resources_de extends java.util.ListResourceBundle { {"Prints.the.content.of.a.certificate", "Druckt den Content eines Zertifikats"}, //-printcert {"Prints.the.content.of.a.certificate.request", - "Druckt den Content einer Zertifikatanforderung"}, //-printcertreq + "Druckt den Content einer Zertifikatsanforderung"}, //-printcertreq {"Prints.the.content.of.a.CRL.file", "Druckt den Content einer CRL-Datei"}, //-printcrl {"Generates.a.self.signed.certificate", "Generiert ein selbst signiertes Zertifikat"}, //-selfcert {"Changes.the.store.password.of.a.keystore", "\u00C4ndert das Speicherkennwort eines Keystores"}, //-storepasswd + {"showinfo.command.help", "Zeigt sicherheitsbezogene Informationen an"}, + {"Prints.the.program.version", "Gibt die Programmversion aus"}, + // keytool: help: options {"alias.name.of.the.entry.to.process", "Aliasname des zu verarbeitenden Eintrags"}, //-alias + {"groupname.option.help", + "Gruppenname. Beispiel: der Name der elliptischen Kurve."}, //-groupname {"destination.alias", "Zielalias"}, //-destalias {"destination.key.password", - "Zielschl\u00FCssel-Kennwort"}, //-destkeypass + "Zielschl\u00FCsselkennwort"}, //-destkeypass {"destination.keystore.name", "Ziel-Keystore-Name"}, //-destkeystore {"destination.keystore.password.protected", @@ -138,6 +143,7 @@ public class Resources_de extends java.util.ListResourceBundle { "Kein Prompt"}, //-noprompt {"password.through.protected.mechanism", "Kennwort \u00FCber gesch\u00FCtzten Mechanismus"}, //-protected + {"tls.option.help", "Zeigt TLS-Konfigurationsinformationen an"}, // The following 2 values should span 2 lines, the first for the // option itself, the second for its -providerArg value. @@ -154,10 +160,14 @@ public class Resources_de extends java.util.ListResourceBundle { "Ausgabe in RFC-Stil"}, //-rfc {"signature.algorithm.name", "Signaturalgorithmusname"}, //-sigalg + {"signer.alias", + "Signaturgeberalias"}, //-signer + {"signer.key.password", + "Signaturgeber-Schl\u00FCsselkennwort"}, //-signerkeypass {"source.alias", "Quellalias"}, //-srcalias {"source.key.password", - "Quellschl\u00FCssel-Kennwort"}, //-srckeypass + "Quellschl\u00FCsselkennwort"}, //-srckeypass {"source.keystore.name", "Quell-Keystore-Name"}, //-srckeystore {"source.keystore.password.protected", @@ -173,7 +183,7 @@ public class Resources_de extends java.util.ListResourceBundle { {"signed.jar.file", "Signierte JAR-Datei"}, //=jarfile {"certificate.validity.start.date.time", - "Anfangsdatum/-zeit f\u00FCr Zertifikatsg\u00FCltigkeit"}, //-startdate + "Startdatum/-zeit f\u00FCr Zertifikatsg\u00FCltigkeit"}, //-startdate {"keystore.password", "Keystore-Kennwort"}, //-storepass {"keystore.type", @@ -188,8 +198,8 @@ public class Resources_de extends java.util.ListResourceBundle { "Serielle ID des zu entziehenden Certs"}, //-id // keytool: Running part {"keytool.error.", "Keytool-Fehler: "}, - {"Illegal.option.", "Ung\u00FCltige Option: "}, - {"Illegal.value.", "Ung\u00FCltiger Wert: "}, + {"Illegal.option.", "Unzul\u00E4ssige Option: "}, + {"Illegal.value.", "Unzul\u00E4ssiger Wert: "}, {"Unknown.password.type.", "Unbekannter Kennworttyp: "}, {"Cannot.find.environment.variable.", "Umgebungsvariable kann nicht gefunden werden: "}, @@ -217,7 +227,7 @@ public class Resources_de extends java.util.ListResourceBundle { "Wenn der Keystore nicht kennwortgesch\u00FCtzt ist, d\u00FCrfen -storepass, -keypass und -new nicht angegeben werden"}, {"if.source.keystore.is.not.password.protected.then.srcstorepass.and.srckeypass.must.not.be.specified", "Wenn der Quell-Keystore nicht kennwortgesch\u00FCtzt ist, d\u00FCrfen -srcstorepass und -srckeypass nicht angegeben werden"}, - {"Illegal.startdate.value", "Ung\u00FCltiger Wert f\u00FCr Anfangsdatum"}, + {"Illegal.startdate.value", "Unzul\u00E4ssiger Wert f\u00FCr Startdatum"}, {"Validity.must.be.greater.than.zero", "G\u00FCltigkeit muss gr\u00F6\u00DFer als null sein"}, {"provclass.not.a.provider", "%s kein Provider"}, @@ -248,7 +258,6 @@ public class Resources_de extends java.util.ListResourceBundle { {"Keystore.password.is.too.short.must.be.at.least.6.characters", "Keystore-Kennwort ist zu kurz. Es muss mindestens sechs Zeichen lang sein"}, {"Unknown.Entry.Type", "Unbekannter Eintragstyp"}, - {"Too.many.failures.Alias.not.changed", "Zu viele Fehler. Alias nicht ge\u00E4ndert"}, {"Entry.for.alias.alias.successfully.imported.", "Eintrag f\u00FCr Alias {0} erfolgreich importiert."}, {"Entry.for.alias.alias.not.imported.", "Eintrag f\u00FCr Alias {0} nicht importiert."}, @@ -271,9 +280,9 @@ public class Resources_de extends java.util.ListResourceBundle { {"Certificate.stored.in.file.filename.", "Zertifikat in Datei <{0}> gespeichert"}, {"Certificate.reply.was.installed.in.keystore", - "Zertifikatantwort wurde in Keystore installiert"}, + "Zertifikatsantwort wurde in Keystore installiert"}, {"Certificate.reply.was.not.installed.in.keystore", - "Zertifikatantwort wurde nicht in Keystore installiert"}, + "Zertifikatsantwort wurde nicht in Keystore installiert"}, {"Certificate.was.added.to.keystore", "Zertifikat wurde Keystore hinzugef\u00FCgt"}, {"Certificate.was.not.added.to.keystore", @@ -287,10 +296,16 @@ public class Resources_de extends java.util.ListResourceBundle { "Alias <{0}> ist nicht vorhanden"}, {"Alias.alias.has.no.certificate", "Alias <{0}> hat kein Zertifikat"}, + {"groupname.keysize.coexist", + "Es k\u00F6nnen nicht sowohl -groupname als auch -keysize angegeben werden"}, + {"deprecate.keysize.for.ec", + "Das Angeben von -keysize zum Generieren von EC-Schl\u00FCsseln ist veraltet. Verwenden Sie stattdessen \"-groupname %s\"."}, {"Key.pair.not.generated.alias.alias.already.exists", "Schl\u00FCsselpaar wurde nicht generiert. Alias <{0}> ist bereits vorhanden"}, {"Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for", "Generieren von Schl\u00FCsselpaar (Typ {1}, {0} Bit) und selbst signiertem Zertifikat ({2}) mit einer G\u00FCltigkeit von {3} Tagen\n\tf\u00FCr: {4}"}, + {"Generating.keysize.bit.keyAlgName.key.pair.and.a.certificate.sigAlgName.issued.by.signerAlias.with.a.validity.of.validality.days.for", + "Generieren von Schl\u00FCsselpaar (Typ {1}, {0} Bit) und Zertifikat ({2}), ausgestellt von <{3}>, mit einer G\u00FCltigkeit von {4} Tagen\n\tf\u00FCr: {5}"}, {"Enter.key.password.for.alias.", "Schl\u00FCsselkennwort f\u00FCr <{0}> eingeben"}, {".RETURN.if.same.as.keystore.password.", "\t(RETURN, wenn identisch mit Keystore-Kennwort): "}, @@ -303,12 +318,8 @@ public class Resources_de extends java.util.ListResourceBundle { {"Password.is.too.short.must.be.at.least.6.characters", "Kennwort ist zu kurz. Es muss mindestens sechs Zeichen lang sein"}, {"Too.many.failures.Key.entry.not.cloned", - "Zu viele Fehler. Schl\u00FCsseleintrag wurde nicht geclont"}, + "Zu viele Fehler. Schl\u00FCsseleintrag wurde nicht geklont"}, {"key.password.for.alias.", "Schl\u00FCsselkennwort f\u00FCr <{0}>"}, - {"Keystore.entry.for.id.getName.already.exists", - "Keystore-Eintrag f\u00FCr <{0}> bereits vorhanden"}, - {"Creating.keystore.entry.for.id.getName.", - "Keystore-Eintrag f\u00FCr <{0}> wird erstellt..."}, {"No.entries.from.identity.database.added", "Keine Eintr\u00E4ge aus Identity-Datenbank hinzugef\u00FCgt"}, {"Alias.name.alias", "Aliasname: {0}"}, @@ -346,7 +357,6 @@ public class Resources_de extends java.util.ListResourceBundle { {"Do.you.still.want.to.add.it.to.your.own.keystore.no.", "M\u00F6chten Sie es trotzdem zu Ihrem eigenen Keystore hinzuf\u00FCgen? [Nein]: "}, {"Trust.this.certificate.no.", "Diesem Zertifikat vertrauen? [Nein]: "}, - {"YES", "JA"}, {"New.prompt.", "Neues {0}: "}, {"Passwords.must.differ", "Kennw\u00F6rter m\u00FCssen sich unterscheiden"}, {"Re.enter.new.prompt.", "Neues {0} erneut eingeben: "}, @@ -379,15 +389,14 @@ public class Resources_de extends java.util.ListResourceBundle { {"Alias.alias.has.no.key", "Alias <{0}> verf\u00FCgt \u00FCber keinen Schl\u00FCssel"}, {"Alias.alias.references.an.entry.type.that.is.not.a.private.key.entry.The.keyclone.command.only.supports.cloning.of.private.key", - "Alias <{0}> verweist auf einen Eintragstyp, der kein Private Key-Eintrag ist. Der Befehl -keyclone unterst\u00FCtzt nur das Klonen von Private Key-Eintr\u00E4gen"}, + "Alias <{0}> verweist auf einen Eintragstyp, der kein Private-Key-Eintrag ist. Der Befehl -keyclone unterst\u00FCtzt nur das Klonen von Private-Key-Eintr\u00E4gen"}, {".WARNING.WARNING.WARNING.", "***************** WARNING WARNING WARNING *****************"}, {"Signer.d.", "Signaturgeber #%d:"}, + {"Certificate.d.", "Zertifikat #%d:"}, {"Timestamp.", "Zeitstempel:"}, - {"Signature.", "Signatur:"}, - {"CRLs.", "CRLs:"}, - {"Certificate.owner.", "Zertifikateigent\u00FCmer: "}, + {"Certificate.owner.", "Zertifikatseigent\u00FCmer: "}, {"Not.a.signed.jar.file", "Keine signierte JAR-Datei"}, {"No.certificate.from.the.SSL.server", "Kein Zertifikat vom SSL-Server"}, @@ -398,20 +407,17 @@ public class Resources_de extends java.util.ListResourceBundle { "* Die Integrit\u00E4t der Informationen, die in Ihrem Srckeystore gespeichert sind, *\n* wurde NICHT gepr\u00FCft. Um die Integrit\u00E4t zu pr\u00FCfen, *\n* m\u00FCssen Sie Ihr Srckeystore-Kennwort angeben. *"}, {"Certificate.reply.does.not.contain.public.key.for.alias.", - "Zertifikatantwort enth\u00E4lt keinen Public Key f\u00FCr <{0}>"}, + "Zertifikatsantwort enth\u00E4lt keinen Public Key f\u00FCr <{0}>"}, {"Incomplete.certificate.chain.in.reply", "Unvollst\u00E4ndige Zertifikatskette in Antwort"}, - {"Certificate.chain.in.reply.does.not.verify.", - "Zertifikatskette in Antwort verifiziert nicht: "}, {"Top.level.certificate.in.reply.", "Zertifikat der obersten Ebene in Antwort:\n"}, {".is.not.trusted.", "... ist nicht vertrauensw\u00FCrdig. "}, {"Install.reply.anyway.no.", "Antwort trotzdem installieren? [Nein]: "}, - {"NO", "NEIN"}, {"Public.keys.in.reply.and.keystore.don.t.match", "Public Keys in Antwort und Keystore stimmen nicht \u00FCberein"}, {"Certificate.reply.and.certificate.in.keystore.are.identical", - "Zertifikatantwort und Zertifikat in Keystore sind identisch"}, + "Zertifikatsantwort und Zertifikat in Keystore sind identisch"}, {"Failed.to.establish.chain.from.reply", "Kette konnte der Antwort nicht entnommen werden"}, {"n", "N"}, @@ -419,10 +425,12 @@ public class Resources_de extends java.util.ListResourceBundle { {"Secret.key.not.generated.alias.alias.already.exists", "Secret Key wurde nicht generiert. Alias <{0}> ist bereits vorhanden"}, {"Please.provide.keysize.for.secret.key.generation", - "Geben Sie -keysize zum Erstellen eines Secret Keys an"}, + "Geben Sie -keysize zum Erstellen eines Secret Key an"}, {"warning.not.verified.make.sure.keystore.is.correct", "WARNUNG: Nicht gepr\u00FCft. Stellen Sie sicher, dass -keystore korrekt ist."}, + {"warning.not.verified.make.sure.keystore.is.correct.or.specify.trustcacerts", + "Warnung: Nicht gepr\u00FCft. Stellen Sie sicher, dass -keystore korrekt ist, oder geben Sie -trustcacerts an."}, {"Extensions.", "Erweiterungen: "}, {".Empty.value.", "(Leerer Wert)"}, @@ -439,34 +447,43 @@ public class Resources_de extends java.util.ListResourceBundle { // 8171319: keytool should print out warnings when reading or // generating cert/cert req using weak algorithms - {"the.certificate.request", "Die Zertifikatanforderung"}, + {"the.certificate.request", "Die Zertifikatsanforderung"}, {"the.issuer", "Der Aussteller"}, {"the.generated.certificate", "Das generierte Zertifikat"}, {"the.generated.crl", "Die generierte CRL"}, - {"the.generated.certificate.request", "Die generierte Zertifikatanforderung"}, + {"the.generated.certificate.request", "Die generierte Zertifikatsanforderung"}, {"the.certificate", "Das Zertifikat"}, {"the.crl", "Die CRL"}, {"the.tsa.certificate", "Das TSA-Zertifikat"}, {"the.input", "Die Eingabe"}, {"reply", "Antwort"}, {"one.in.many", "%1$s #%2$d von %3$d"}, + {"one.in.many1", "%1$s #%2$d"}, + {"one.in.many2", "%1$s von Signaturgeber #%2$d"}, + {"one.in.many3", "%1$s #%2$d von Signaturgeber #%3$d"}, {"alias.in.cacerts", "Aussteller <%s> in cacerts"}, {"alias.in.keystore", "Aussteller <%s>"}, {"with.weak", "%s (schwach)"}, + {"with.disabled", "%s (deaktiviert)"}, {"key.bit", "%1$d-Bit-%2$s-Schl\u00FCssel"}, {"key.bit.weak", "%1$d-Bit-%2$s-Schl\u00FCssel (schwach)"}, - {"unknown.size.1", "unbekannte Gr\u00F6\u00DFe: %s-Schl\u00FCssel"}, + {"key.bit.disabled", "%1$d-Bit-%2$s-Schl\u00FCssel (deaktiviert)"}, + {"unknown.size.1", "%s-Schl\u00FCssel mit unbekannter Gr\u00F6\u00DFe"}, {".PATTERN.printX509Cert.with.weak", - "Eigent\u00FCmer: {0}\nAussteller: {1}\nSeriennummer: {2}\nG\u00FCltig von: {3} bis: {4}\nZertifikatsfingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgorithmusname: {7}\nPublic Key-Algorithmus von Subject: {8}\nVersion: {9}"}, + "Eigent\u00FCmer: {0}\nAussteller: {1}\nSeriennummer: {2}\nG\u00FCltig von: {3} bis: {4}\nZertifikatsfingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgorithmusname: {7}\nPublic-Key-Algorithmus von Subject: {8}\nVersion: {9}"}, {"PKCS.10.with.weak", - "PKCS #10-Zertifikatanforderung (Version 1.0)\nSubject: %1$s\nFormat: %2$s\nPublic Key: %3$s\nSignaturalgorithmus: %4$s\n"}, + "PKCS #10-Zertifikatsanforderung (Version 1.0)\nSubject: %1$s\nFormat: %2$s\nPublic Key: %3$s\nSignaturalgorithmus: %4$s\n"}, {"verified.by.s.in.s.weak", "Von %1$s in %2$s mit %3$s verifiziert"}, - {"whose.sigalg.risk", "%1$s verwendet den Signaturalgorithmus %2$s. Dies gilt als Sicherheitsrisiko."}, - {"whose.key.risk", "%1$s verwendet %2$s. Dies gilt als Sicherheitsrisiko."}, + {"whose.sigalg.disabled", "%1$s verwendet den Signaturalgorithmus %2$s. Dies gilt als Sicherheitsrisiko und ist deaktiviert."}, + {"whose.sigalg.weak", "%1$s verwendet den Signaturalgorithmus %2$s. Dies gilt als Sicherheitsrisiko. Dieser Algorithmus wird in einem zuk\u00FCnftigen Update deaktiviert."}, + {"whose.key.disabled", "%1$s verwendet %2$s. Dies gilt als Sicherheitsrisiko und ist deaktiviert."}, + {"whose.key.weak", "%1$s verwendet %2$s. Dies gilt als Sicherheitsrisiko. Diese Schl\u00FCsselgr\u00F6\u00DFe wird in einem zuk\u00FCnftigen Update deaktiviert."}, {"jks.storetype.warning", "Der %1$s-Keystore verwendet ein propriet\u00E4res Format. Es wird empfohlen, auf PKCS12 zu migrieren, das ein Industriestandardformat mit \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\" ist."}, {"migrate.keystore.warning", "\"%1$s\" zu %4$s migriert. Der %2$s-Keystore wurde als \"%3$s\" gesichert."}, {"backup.keystore.warning", "Der urspr\u00FCngliche Keystore \"%1$s\" wird als \"%3$s\" gesichert..."}, {"importing.keystore.status", "Keystore %1$s wird in %2$s importiert..."}, + {"keyalg.option.missing.error", "Die Option -keyalg muss angegeben werden."}, + {"showinfo.no.option", "Fehlende Option f\u00FCr -showinfo. Verwenden Sie keytool -showinfo -tls."}, }; diff --git a/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java b/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java index 49980f3c480f5bb986328369d11b974f14b6ef5e..43acdf4f2d33d1de4526660d8a5eb0df271777b8 100644 --- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java +++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -96,6 +96,7 @@ public class Resources_ja extends java.util.ListResourceBundle { {"Changes.the.store.password.of.a.keystore", "\u30AD\u30FC\u30B9\u30C8\u30A2\u306E\u30B9\u30C8\u30A2\u30FB\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5909\u66F4\u3057\u307E\u3059"}, //-storepasswd {"showinfo.command.help", "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u95A2\u9023\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059"}, + {"Prints.the.program.version", "\u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u307E\u3059"}, // keytool: help: options {"alias.name.of.the.entry.to.process", @@ -159,6 +160,10 @@ public class Resources_ja extends java.util.ListResourceBundle { "RFC\u30B9\u30BF\u30A4\u30EB\u306E\u51FA\u529B"}, //-rfc {"signature.algorithm.name", "\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u540D"}, //-sigalg + {"signer.alias", + "\u7F72\u540D\u8005\u306E\u5225\u540D"}, //-signer + {"signer.key.password", + "\u7F72\u540D\u8005\u306E\u30AD\u30FC\u306E\u30D1\u30B9\u30EF\u30FC\u30C9"}, //-signerkeypass {"source.alias", "\u30BD\u30FC\u30B9\u5225\u540D"}, //-srcalias {"source.key.password", @@ -299,6 +304,8 @@ public class Resources_ja extends java.util.ListResourceBundle { "\u30AD\u30FC\u30FB\u30DA\u30A2\u306F\u751F\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u5225\u540D<{0}>\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059"}, {"Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for", "{3}\u65E5\u9593\u6709\u52B9\u306A{0}\u30D3\u30C3\u30C8\u306E{1}\u306E\u30AD\u30FC\u30FB\u30DA\u30A2\u3068\u81EA\u5DF1\u7F72\u540D\u578B\u8A3C\u660E\u66F8({2})\u3092\u751F\u6210\u3057\u3066\u3044\u307E\u3059\n\t\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u540D: {4}"}, + {"Generating.keysize.bit.keyAlgName.key.pair.and.a.certificate.sigAlgName.issued.by.signerAlias.with.a.validity.of.validality.days.for", + "{4}\u65E5\u9593\u6709\u52B9\u306A{0}\u30D3\u30C3\u30C8\u306E{1}\u30AD\u30FC\u30FB\u30DA\u30A2\u3068<{3}>\u306B\u3088\u3063\u3066\u767A\u884C\u3055\u308C\u308B\u8A3C\u660E\u66F8({2})\u3092\u751F\u6210\u3057\u3066\u3044\u307E\u3059\n\t\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u540D: {5}"}, {"Enter.key.password.for.alias.", "<{0}>\u306E\u30AD\u30FC\u30FB\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"}, {".RETURN.if.same.as.keystore.password.", "\t(\u30AD\u30FC\u30B9\u30C8\u30A2\u306E\u30D1\u30B9\u30EF\u30FC\u30C9\u3068\u540C\u3058\u5834\u5408\u306FRETURN\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044): "}, @@ -387,8 +394,8 @@ public class Resources_ja extends java.util.ListResourceBundle { {".WARNING.WARNING.WARNING.", "***************** WARNING WARNING WARNING *****************"}, {"Signer.d.", "\u7F72\u540D\u8005\u756A\u53F7%d:"}, + {"Certificate.d.", "\u8A3C\u660E\u66F8#%d:"}, {"Timestamp.", "\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7:"}, - {"Signature.", "\u7F72\u540D:"}, {"Certificate.owner.", "\u8A3C\u660E\u66F8\u306E\u6240\u6709\u8005: "}, {"Not.a.signed.jar.file", "\u7F72\u540D\u4ED8\u304DJAR\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093"}, {"No.certificate.from.the.SSL.server", @@ -451,6 +458,9 @@ public class Resources_ja extends java.util.ListResourceBundle { {"the.input", "\u5165\u529B"}, {"reply", "\u5FDC\u7B54"}, {"one.in.many", "%1$s #%2$d / %3$d"}, + {"one.in.many1", "%1$s #%2$d"}, + {"one.in.many2", "\u7F72\u540D\u8005\u306E%1$s #%2$d"}, + {"one.in.many3", "\u7F72\u540D\u8005\u306E%1$s #%2$d #%3$d"}, {"alias.in.cacerts", "cacerts\u5185\u306E\u767A\u884C\u8005<%s>"}, {"alias.in.keystore", "\u767A\u884C\u8005<%s>"}, {"with.weak", "%s (\u5F31)"}, @@ -473,7 +483,6 @@ public class Resources_ja extends java.util.ListResourceBundle { {"backup.keystore.warning", "\u5143\u306E\u30AD\u30FC\u30B9\u30C8\u30A2\"%1$s\"\u306F\"%3$s\"\u3068\u3057\u3066\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3055\u308C\u307E\u3059..."}, {"importing.keystore.status", "\u30AD\u30FC\u30B9\u30C8\u30A2%1$s\u3092%2$s\u306B\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u3059..."}, {"keyalg.option.missing.error", "-keyalg\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"}, - {"showinfo.no.option", "-showinfo\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093\u3002\"keytool -showinfo -tls\"\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}, }; diff --git a/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java b/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java index dfe71431c28e2a47374e91530ef7fdb89bb0bea4..520c55796efa3d239c94c927791621196ab9760d 100644 --- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java +++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -96,6 +96,7 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {"Changes.the.store.password.of.a.keystore", "\u66F4\u6539\u5BC6\u94A5\u5E93\u7684\u5B58\u50A8\u53E3\u4EE4"}, //-storepasswd {"showinfo.command.help", "\u663E\u793A\u5B89\u5168\u76F8\u5173\u4FE1\u606F"}, + {"Prints.the.program.version", "\u8F93\u51FA\u7A0B\u5E8F\u7248\u672C"}, // keytool: help: options {"alias.name.of.the.entry.to.process", @@ -159,6 +160,10 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { "\u4EE5 RFC \u6837\u5F0F\u8F93\u51FA"}, //-rfc {"signature.algorithm.name", "\u7B7E\u540D\u7B97\u6CD5\u540D\u79F0"}, //-sigalg + {"signer.alias", + "\u7B7E\u540D\u8005\u522B\u540D"}, //-signer + {"signer.key.password", + "\u7B7E\u540D\u8005\u5BC6\u94A5\u5BC6\u7801"}, //-signerkeypass {"source.alias", "\u6E90\u522B\u540D"}, //-srcalias {"source.key.password", @@ -299,6 +304,8 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { "\u672A\u751F\u6210\u5BC6\u94A5\u5BF9, \u522B\u540D <{0}> \u5DF2\u7ECF\u5B58\u5728"}, {"Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for", "\u6B63\u5728\u4E3A\u4EE5\u4E0B\u5BF9\u8C61\u751F\u6210 {0} \u4F4D{1}\u5BC6\u94A5\u5BF9\u548C\u81EA\u7B7E\u540D\u8BC1\u4E66 ({2}) (\u6709\u6548\u671F\u4E3A {3} \u5929):\n\t {4}"}, + {"Generating.keysize.bit.keyAlgName.key.pair.and.a.certificate.sigAlgName.issued.by.signerAlias.with.a.validity.of.validality.days.for", + "\u6B63\u5728\u4E3A\u4EE5\u4E0B\u5BF9\u8C61\u751F\u6210 {0} \u4F4D {1} \u5BC6\u94A5\u5BF9\u548C\u7531 <{3}> \u9881\u53D1\u7684\u8BC1\u4E66 ({2})\uFF08\u6709\u6548\u671F\u4E3A {4} \u5929\uFF09\uFF1A\n\t {5}"}, {"Enter.key.password.for.alias.", "\u8F93\u5165 <{0}> \u7684\u5BC6\u94A5\u53E3\u4EE4"}, {".RETURN.if.same.as.keystore.password.", "\t(\u5982\u679C\u548C\u5BC6\u94A5\u5E93\u53E3\u4EE4\u76F8\u540C, \u6309\u56DE\u8F66): "}, @@ -387,8 +394,8 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {".WARNING.WARNING.WARNING.", "***************** WARNING WARNING WARNING *****************"}, {"Signer.d.", "\u7B7E\u540D\u8005 #%d:"}, + {"Certificate.d.", "\u8BC1\u4E66 #%d\uFF1A"}, {"Timestamp.", "\u65F6\u95F4\u6233:"}, - {"Signature.", "\u7B7E\u540D:"}, {"Certificate.owner.", "\u8BC1\u4E66\u6240\u6709\u8005: "}, {"Not.a.signed.jar.file", "\u4E0D\u662F\u5DF2\u7B7E\u540D\u7684 jar \u6587\u4EF6"}, {"No.certificate.from.the.SSL.server", @@ -451,6 +458,9 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {"the.input", "\u8F93\u5165"}, {"reply", "\u56DE\u590D"}, {"one.in.many", "%1$s #%2$d/%3$d"}, + {"one.in.many1", "%1$s #%2$d"}, + {"one.in.many2", "\u7B7E\u540D\u8005 #%2$d \u7684 %1$s"}, + {"one.in.many3", "\u7B7E\u540D\u8005 #%3$d \u7684 %1$s #%2$d"}, {"alias.in.cacerts", "cacerts \u4E2D\u7684\u53D1\u5E03\u8005 <%s>"}, {"alias.in.keystore", "\u53D1\u5E03\u8005 <%s>"}, {"with.weak", "%s (\u5F31)"}, @@ -473,7 +483,6 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {"backup.keystore.warning", "\u5DF2\u5C06\u539F\u59CB\u5BC6\u94A5\u5E93 \"%1$s\" \u5907\u4EFD\u4E3A \"%3$s\"..."}, {"importing.keystore.status", "\u6B63\u5728\u5C06\u5BC6\u94A5\u5E93 %1$s \u5BFC\u5165\u5230 %2$s..."}, {"keyalg.option.missing.error", "\u5FC5\u987B\u6307\u5B9A -keyalg \u9009\u9879\u3002"}, - {"showinfo.no.option", "-showinfo \u7F3A\u5C11\u9009\u9879\u3002\u8BF7\u5C1D\u8BD5\u4F7F\u7528 \"keytool -showinfo -tls\"\u3002"}, }; diff --git a/src/java.base/share/classes/sun/security/util/AuthResources_de.java b/src/java.base/share/classes/sun/security/util/AuthResources_de.java index 9775c7e4456db4c39a85618254fb9748cd6c9654..03b919626de19be935d7d62898c3f7bc4bced8c1 100644 --- a/src/java.base/share/classes/sun/security/util/AuthResources_de.java +++ b/src/java.base/share/classes/sun/security/util/AuthResources_de.java @@ -88,7 +88,7 @@ public class AuthResources_de extends java.util.ListResourceBundle { {"Keystore.alias.","Keystore-Alias: "}, {"Keystore.password.","Keystore-Kennwort: "}, {"Private.key.password.optional.", - "Private Key-Kennwort (optional): "}, + "Private-Key-Kennwort (optional): "}, // com.sun.security.auth.module.Krb5LoginModule {"Kerberos.username.defUsername.", diff --git a/src/java.base/share/classes/sun/security/util/KeyUtil.java b/src/java.base/share/classes/sun/security/util/KeyUtil.java index a20ebffa5ff53a72ffd38633307cf588150990b6..3648447e10e138616d30c086781d2bb83b8e8547 100644 --- a/src/java.base/share/classes/sun/security/util/KeyUtil.java +++ b/src/java.base/share/classes/sun/security/util/KeyUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -190,6 +190,28 @@ public final class KeyUtil { return -1; } + /** + * Returns the algorithm name of the given key object. If an EC key is + * specified, returns the algorithm name and its named curve. + * + * @param key the key object, cannot be null + * @return the algorithm name of the given key object, or return in the + * form of "EC (named curve)" if the given key object is an EC key + */ + public static final String fullDisplayAlgName(Key key) { + String result = key.getAlgorithm(); + if (key instanceof ECKey) { + ECParameterSpec paramSpec = ((ECKey) key).getParams(); + if (paramSpec instanceof NamedCurve) { + NamedCurve nc = (NamedCurve)paramSpec; + result += " (" + nc.getNameAndAliases()[0] + ")"; + } + } else if (key instanceof EdECKey) { + result = ((EdECKey) key).getParams().getName(); + } + return result; + } + /** * Returns whether the key is valid or not. *

    diff --git a/src/java.base/share/classes/sun/security/util/PropertyExpander.java b/src/java.base/share/classes/sun/security/util/PropertyExpander.java index b458439cb96d27434c7d91947593a36d2092435c..92daa46ce4debe95c94bd505b925cd5cbf622dfc 100644 --- a/src/java.base/share/classes/sun/security/util/PropertyExpander.java +++ b/src/java.base/share/classes/sun/security/util/PropertyExpander.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,7 +63,7 @@ public class PropertyExpander { if (value == null) return null; - int p = value.indexOf("${", 0); + int p = value.indexOf("${"); // no special characters if (p == -1) return value; diff --git a/src/java.base/share/classes/sun/security/util/Resources_de.java b/src/java.base/share/classes/sun/security/util/Resources_de.java index c36e24ac584b49ffd0c7d7df0324831698c9ee0b..57e2c8da8636a4110d01924532fdd15d144d7550 100644 --- a/src/java.base/share/classes/sun/security/util/Resources_de.java +++ b/src/java.base/share/classes/sun/security/util/Resources_de.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -66,8 +66,6 @@ public class Resources_de extends java.util.ListResourceBundle { {"Subject.", "Subjekt:\n"}, {".Principal.", "\tPrincipal: "}, {".Public.Credential.", "\t\u00D6ffentliche Zugangsdaten: "}, - {".Private.Credentials.inaccessible.", - "\tKein Zugriff auf private Zugangsdaten\n"}, {".Private.Credential.", "\tPrivate Zugangsdaten: "}, {".Private.Credential.inaccessible.", "\tKein Zugriff auf private Zugangsdaten\n"}, @@ -89,16 +87,6 @@ public class Resources_de extends java.util.ListResourceBundle { "Ung\u00FCltiger Nullwert f\u00FCr CallbackHandler angegeben"}, {"null.subject.logout.called.before.login", "Nullsubjekt - Abmeldung vor Anmeldung aufgerufen"}, - {"unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor", - "LoginModule {0} kann nicht instanziiert werden, da es keinen argumentlosen Constructor angibt"}, - {"unable.to.instantiate.LoginModule", - "LoginModule kann nicht instanziiert werden"}, - {"unable.to.instantiate.LoginModule.", - "LoginModule kann nicht instanziiert werden: "}, - {"unable.to.find.LoginModule.class.", - "LoginModule-Klasse kann nicht gefunden werden: "}, - {"unable.to.access.LoginModule.", - "Kein Zugriff auf LoginModule m\u00F6glich: "}, {"Login.Failure.all.modules.ignored", "Anmeldefehler: Alle Module werden ignoriert"}, @@ -150,11 +138,6 @@ public class Resources_de extends java.util.ListResourceBundle { // sun.security.pkcs11.SunPKCS11 {"PKCS11.Token.providerName.Password.", "Kennwort f\u00FCr PKCS11-Token [{0}]: "}, - - /* --- DEPRECATED --- */ - // javax.security.auth.Policy - {"unable.to.instantiate.Subject.based.policy", - "Subjektbasierte Policy kann nicht instanziiert werden"} }; diff --git a/src/java.base/share/classes/sun/security/util/Resources_ja.java b/src/java.base/share/classes/sun/security/util/Resources_ja.java index 195d71010a6fbf1f3f583d6dfd3bb682f8303d1a..1293a48aabc4be6e753b156570eab2d7ee3d2106 100644 --- a/src/java.base/share/classes/sun/security/util/Resources_ja.java +++ b/src/java.base/share/classes/sun/security/util/Resources_ja.java @@ -66,8 +66,6 @@ public class Resources_ja extends java.util.ListResourceBundle { {"Subject.", "\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8:\n"}, {".Principal.", "\t\u30D7\u30EA\u30F3\u30B7\u30D1\u30EB: "}, {".Public.Credential.", "\t\u516C\u958B\u8CC7\u683C: "}, - {".Private.Credentials.inaccessible.", - "\t\u975E\u516C\u958B\u8CC7\u683C\u306B\u306F\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n"}, {".Private.Credential.", "\t\u975E\u516C\u958B\u8CC7\u683C: "}, {".Private.Credential.inaccessible.", "\t\u975E\u516C\u958B\u8CC7\u683C\u306B\u306F\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n"}, @@ -89,16 +87,6 @@ public class Resources_ja extends java.util.ListResourceBundle { "\u7121\u52B9\u306Anull CallbackHandler\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F"}, {"null.subject.logout.called.before.login", "null\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8 - \u30ED\u30B0\u30A4\u30F3\u3059\u308B\u524D\u306B\u30ED\u30B0\u30A2\u30A6\u30C8\u304C\u547C\u3073\u51FA\u3055\u308C\u307E\u3057\u305F"}, - {"unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor", - "LoginModule {0}\u306F\u5F15\u6570\u3092\u53D6\u3089\u306A\u3044\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3092\u6307\u5B9A\u3067\u304D\u306A\u3044\u305F\u3081\u3001\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093"}, - {"unable.to.instantiate.LoginModule", - "LoginModule\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093"}, - {"unable.to.instantiate.LoginModule.", - "LoginModule\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093: "}, - {"unable.to.find.LoginModule.class.", - "LoginModule\u30AF\u30E9\u30B9\u3092\u691C\u51FA\u3067\u304D\u307E\u305B\u3093: "}, - {"unable.to.access.LoginModule.", - "LoginModule\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093: "}, {"Login.Failure.all.modules.ignored", "\u30ED\u30B0\u30A4\u30F3\u5931\u6557: \u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u306F\u7121\u8996\u3055\u308C\u307E\u3059"}, @@ -150,11 +138,6 @@ public class Resources_ja extends java.util.ListResourceBundle { // sun.security.pkcs11.SunPKCS11 {"PKCS11.Token.providerName.Password.", "PKCS11\u30C8\u30FC\u30AF\u30F3[{0}]\u30D1\u30B9\u30EF\u30FC\u30C9: "}, - - /* --- DEPRECATED --- */ - // javax.security.auth.Policy - {"unable.to.instantiate.Subject.based.policy", - "\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u30FB\u30D9\u30FC\u30B9\u306E\u30DD\u30EA\u30B7\u30FC\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093"} }; diff --git a/src/java.base/share/classes/sun/security/util/Resources_zh_CN.java b/src/java.base/share/classes/sun/security/util/Resources_zh_CN.java index 35d648bd3a47250acf85180ae90c0432fad87e90..5376ff5efd3531ad48839dde0cbc3a4ad045146f 100644 --- a/src/java.base/share/classes/sun/security/util/Resources_zh_CN.java +++ b/src/java.base/share/classes/sun/security/util/Resources_zh_CN.java @@ -66,8 +66,6 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {"Subject.", "\u4E3B\u4F53: \n"}, {".Principal.", "\t\u4E3B\u7528\u6237: "}, {".Public.Credential.", "\t\u516C\u5171\u8EAB\u4EFD\u8BC1\u660E: "}, - {".Private.Credentials.inaccessible.", - "\t\u65E0\u6CD5\u8BBF\u95EE\u4E13\u7528\u8EAB\u4EFD\u8BC1\u660E\n"}, {".Private.Credential.", "\t\u4E13\u7528\u8EAB\u4EFD\u8BC1\u660E: "}, {".Private.Credential.inaccessible.", "\t\u65E0\u6CD5\u8BBF\u95EE\u4E13\u7528\u8EAB\u4EFD\u8BC1\u660E\n"}, @@ -89,16 +87,6 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A CallbackHandler"}, {"null.subject.logout.called.before.login", "\u7A7A\u4E3B\u4F53 - \u5728\u767B\u5F55\u4E4B\u524D\u8C03\u7528\u4E86\u6CE8\u9500"}, - {"unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor", - "\u65E0\u6CD5\u5B9E\u4F8B\u5316 LoginModule, {0}, \u56E0\u4E3A\u5B83\u672A\u63D0\u4F9B\u4E00\u4E2A\u65E0\u53C2\u6570\u6784\u9020\u5668"}, - {"unable.to.instantiate.LoginModule", - "\u65E0\u6CD5\u5B9E\u4F8B\u5316 LoginModule"}, - {"unable.to.instantiate.LoginModule.", - "\u65E0\u6CD5\u5B9E\u4F8B\u5316 LoginModule: "}, - {"unable.to.find.LoginModule.class.", - "\u65E0\u6CD5\u627E\u5230 LoginModule \u7C7B: "}, - {"unable.to.access.LoginModule.", - "\u65E0\u6CD5\u8BBF\u95EE LoginModule: "}, {"Login.Failure.all.modules.ignored", "\u767B\u5F55\u5931\u8D25: \u5FFD\u7565\u6240\u6709\u6A21\u5757"}, @@ -150,11 +138,6 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { // sun.security.pkcs11.SunPKCS11 {"PKCS11.Token.providerName.Password.", "PKCS11 \u6807\u8BB0 [{0}] \u53E3\u4EE4: "}, - - /* --- DEPRECATED --- */ - // javax.security.auth.Policy - {"unable.to.instantiate.Subject.based.policy", - "\u65E0\u6CD5\u5B9E\u4F8B\u5316\u57FA\u4E8E\u4E3B\u9898\u7684\u7B56\u7565"} }; diff --git a/src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java b/src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java index 166c4a5130f7c1efa024bac6c164d31a7979a4fb..c358cc663543843a05e17bc9ae081c7c76203c1a 100644 --- a/src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java +++ b/src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,9 +27,12 @@ package sun.security.util; import java.util.*; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicInteger; import java.util.regex.PatternSyntaxException; import java.security.InvalidParameterException; import java.security.ProviderException; +import java.security.NoSuchAlgorithmException; +import javax.crypto.Cipher; import sun.security.action.GetPropertyAction; /** @@ -43,11 +46,11 @@ public final class SecurityProviderConstants { private static final Debug debug = Debug.getInstance("jca", "ProviderConfig"); - // cache for provider aliases; key is the standard algorithm name + // Cache for provider aliases; key is the standard algorithm name // value is the associated aliases List private static final ConcurrentHashMap> aliasesMap; - // utility method for generating aliases list using the supplied + // Utility method for generating aliases list using the supplied // 'oid' and 'extraAliases', then store into "aliasesMap" cache under the // key 'stdName' private static List store(String stdName, KnownOIDs oid, @@ -75,7 +78,7 @@ public final class SecurityProviderConstants { return value; } - // returns an aliases List for the specified algorithm name o + // Return an aliases List for the specified algorithm name o // NOTE: exception is thrown if no aliases nor oid found, so // only call this method if aliases are expected public static List getAliases(String o) { @@ -105,6 +108,25 @@ public final class SecurityProviderConstants { } } + public static final int getDefAESKeySize() { + int currVal = DEF_AES_KEY_SIZE.get(); + if (currVal == -1) { + int v = 256; // default AES key size + try { + // adjust if crypto policy only allows a smaller value + int max = Cipher.getMaxAllowedKeyLength("AES"); + if (v > max) { + v = max; + } + } catch (NoSuchAlgorithmException ne) { + // should never happen; ignore and use the default + } + DEF_AES_KEY_SIZE.compareAndSet(-1, v); + currVal = v; + } + return currVal; + } + public static final int DEF_DSA_KEY_SIZE; public static final int DEF_RSA_KEY_SIZE; public static final int DEF_RSASSA_PSS_KEY_SIZE; @@ -112,6 +134,11 @@ public final class SecurityProviderConstants { public static final int DEF_EC_KEY_SIZE; public static final int DEF_ED_KEY_SIZE; public static final int DEF_XEC_KEY_SIZE; + // The logic for finding the max allowable value in getDefAESKeySize() + // interferes with provider loading logic and may lead to deadlocks if + // called inside a static block. So, it is deferred to a later time when + // DEF_AES_KEY_SIZE is actually used/needed. + private static final AtomicInteger DEF_AES_KEY_SIZE; private static final String KEY_LENGTH_PROP = "jdk.security.defaultKeySize"; @@ -120,12 +147,13 @@ public final class SecurityProviderConstants { String keyLengthStr = GetPropertyAction.privilegedGetProperty (KEY_LENGTH_PROP); int dsaKeySize = 2048; - int rsaKeySize = 2048; + int rsaKeySize = 3072; int rsaSsaPssKeySize = rsaKeySize; // default to same value as RSA - int dhKeySize = 2048; - int ecKeySize = 256; + int dhKeySize = 3072; + int ecKeySize = 384; int edKeySize = 255; int xecKeySize = 255; + int aesKeySize = -1; // needs to check crypto policy if (keyLengthStr != null) { try { @@ -167,6 +195,8 @@ public final class SecurityProviderConstants { edKeySize = value; } else if (algoName.equals("XDH")) { xecKeySize = value; + } else if (algoName.equals("AES")) { + aesKeySize = value; } else { if (debug != null) { debug.println("Ignoring unsupported algo in " + @@ -195,6 +225,7 @@ public final class SecurityProviderConstants { DEF_EC_KEY_SIZE = ecKeySize; DEF_ED_KEY_SIZE = edKeySize; DEF_XEC_KEY_SIZE = xecKeySize; + DEF_AES_KEY_SIZE = new AtomicInteger(aesKeySize); // Set up aliases with default mappings // This is needed when the mapping contains non-oid diff --git a/src/java.base/share/classes/sun/security/util/SignatureUtil.java b/src/java.base/share/classes/sun/security/util/SignatureUtil.java index ec86df854fcc50827614f152f89bf31dc0dc8c2c..8fe2d4deebe8e37826aa5a60a44cc40e61f3d15c 100644 --- a/src/java.base/share/classes/sun/security/util/SignatureUtil.java +++ b/src/java.base/share/classes/sun/security/util/SignatureUtil.java @@ -60,13 +60,11 @@ public class SignatureUtil { if (algName.startsWith("OID.")) { algName = algName.substring(4); } - KnownOIDs ko = KnownOIDs.findMatch(algName); if (ko != null) { return ko.stdName().toUpperCase(Locale.ENGLISH); } } - return algName; } @@ -491,12 +489,11 @@ public class SignatureUtil { * @return the default alg, might be null if unsupported */ public static String getDefaultSigAlgForKey(PrivateKey k) { - String kAlg = k.getAlgorithm(); - return switch (kAlg.toUpperCase(Locale.ENGLISH)) { - case "DSA", "RSA" -> ifcFfcStrength(KeyUtil.getKeySize(k)) - + "with" + kAlg; - case "EC" -> ecStrength(KeyUtil.getKeySize(k)) - + "withECDSA"; + String kAlg = k.getAlgorithm().toUpperCase(Locale.ENGLISH); + return switch (kAlg) { + case "DSA" -> "SHA256withDSA"; + case "RSA" -> ifcFfcStrength(KeyUtil.getKeySize(k)) + "withRSA"; + case "EC" -> ecStrength(KeyUtil.getKeySize(k)) + "withECDSA"; case "EDDSA" -> k instanceof EdECPrivateKey ? ((EdECPrivateKey) k).getParams().getName() : kAlg; @@ -521,11 +518,16 @@ public class SignatureUtil { 64, PSSParameterSpec.TRAILER_FIELD_BC); } - // The following values are from SP800-57 part 1 rev 4 tables 2 and 3 + // SP800-57 part 1 rev5 table 2 "Comparable security strengths of + // symmetric block cipher and asymmetric-key algorithms", and table 3 + // "Maximum security strengths for hash and hash-based functions" + // define security strength for various algorithms. + // Besides matching the security strength, the default algorithms may + // also be chosen based on various recommendations such as NIST CNSA. /** - * Return the default message digest algorithm with the same security - * strength as the specified EC key size. + * Return the default message digest algorithm based on the specified + * EC key size. * * Attention: sync with the @implNote inside * {@link jdk.security.jarsigner.JarSigner.Builder#getDefaultSignatureAlgorithm}. @@ -533,27 +535,27 @@ public class SignatureUtil { private static String ecStrength (int bitLength) { if (bitLength >= 512) { // 256 bits of strength return "SHA512"; - } else if (bitLength >= 384) { // 192 bits of strength + } else { + // per CNSA, use SHA-384 return "SHA384"; - } else { // 128 bits of strength and less - return "SHA256"; } } /** - * Return the default message digest algorithm with the same security - * strength as the specified IFC/FFC key size. + * Return the default message digest algorithm based on both the + * security strength of the specified IFC/FFC key size, i.e. RSA, + * RSASSA-PSS, and the recommendation from NIST CNSA, e.g. use SHA-384 + * and min 3072-bit. * * Attention: sync with the @implNote inside * {@link jdk.security.jarsigner.JarSigner.Builder#getDefaultSignatureAlgorithm}. */ - private static String ifcFfcStrength (int bitLength) { - if (bitLength > 7680) { // 256 bits + private static String ifcFfcStrength(int bitLength) { + if (bitLength > 7680) { // 256 bits security strength return "SHA512"; - } else if (bitLength > 3072) { // 192 bits - return "SHA384"; - } else { // 128 bits and less - return "SHA256"; + } else { + // per CNSA, use SHA-384 unless keysize is too small + return (bitLength >= 624 ? "SHA384" : "SHA256"); } } } diff --git a/src/java.base/share/classes/sun/security/x509/AlgorithmId.java b/src/java.base/share/classes/sun/security/x509/AlgorithmId.java index 5f2403f3b40defc0799b7a4bdcee558d2835fb38..2475539a45ad65e073d3ec4fa211c7a92c9169a7 100644 --- a/src/java.base/share/classes/sun/security/x509/AlgorithmId.java +++ b/src/java.base/share/classes/sun/security/x509/AlgorithmId.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,7 +63,7 @@ public class AlgorithmId implements Serializable, DerEncoder { private static final long serialVersionUID = 7205873507486557157L; /** - * The object identitifer being used for this algorithm. + * The object identifier being used for this algorithm. */ private ObjectIdentifier algid; @@ -584,7 +584,7 @@ public class AlgorithmId implements Serializable, DerEncoder { String upperCaseAlias = alias.toUpperCase(Locale.ENGLISH); int index; if (upperCaseAlias.startsWith("ALG.ALIAS") && - (index = upperCaseAlias.indexOf("OID.", 0)) != -1) { + (index = upperCaseAlias.indexOf("OID.")) != -1) { index += "OID.".length(); if (index == alias.length()) { // invalid alias entry diff --git a/src/java.base/share/classes/sun/security/x509/AuthorityInfoAccessExtension.java b/src/java.base/share/classes/sun/security/x509/AuthorityInfoAccessExtension.java index 69459fb6ef04bf670bd7062f9801782de9fca4c3..f25110dfbbe4705f35c090717567fa0bbeaa9039 100644 --- a/src/java.base/share/classes/sun/security/x509/AuthorityInfoAccessExtension.java +++ b/src/java.base/share/classes/sun/security/x509/AuthorityInfoAccessExtension.java @@ -43,7 +43,7 @@ import sun.security.util.DerValue; * certificate that identifies the specific OCSP Responder to use when * performing on-line validation of that certificate. *

    - * This extension is defined in + * This extension is defined in * Internet X.509 PKI Certificate and Certificate Revocation List * (CRL) Profile. The profile permits * the extension to be included in end-entity or CA certificates, diff --git a/src/java.base/share/classes/sun/security/x509/DNSName.java b/src/java.base/share/classes/sun/security/x509/DNSName.java index ee9e8a9c0a0baf49b6a2d858fc35a4bf8c86393f..e2ad7df98e224c81c1f65d6e66c2719db79fc6d5 100644 --- a/src/java.base/share/classes/sun/security/x509/DNSName.java +++ b/src/java.base/share/classes/sun/security/x509/DNSName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * 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 @@ public class DNSName implements GeneralNameInterface { if (alphaDigits.indexOf(name.charAt(startIndex)) < 0) { // Checking to make sure the wildcard only appears in the first component, // and it has to be at least 3-char long with the form of *.[alphaDigit] - if ((name.length() < 3) || (name.indexOf('*', 0) != 0) || + if ((name.length() < 3) || (name.indexOf('*') != 0) || (name.charAt(startIndex+1) != '.') || (alphaDigits.indexOf(name.charAt(startIndex+2)) < 0)) throw new IOException("DNSName components must begin with a letter, digit, " diff --git a/src/java.base/share/classes/sun/security/x509/DeltaCRLIndicatorExtension.java b/src/java.base/share/classes/sun/security/x509/DeltaCRLIndicatorExtension.java index 5933758874a79123ddbf9a51f116b92f96c3e16c..10e36f2b4ae06d0beee54881067661696f18c712 100644 --- a/src/java.base/share/classes/sun/security/x509/DeltaCRLIndicatorExtension.java +++ b/src/java.base/share/classes/sun/security/x509/DeltaCRLIndicatorExtension.java @@ -42,7 +42,7 @@ import java.math.BigInteger; * *

    * The extension is defined in Section 5.2.4 of - * Internet X.509 PKI + * Internet X.509 PKI * Certificate and Certificate Revocation List (CRL) Profile. * *

    diff --git a/src/java.base/share/classes/sun/security/x509/FreshestCRLExtension.java b/src/java.base/share/classes/sun/security/x509/FreshestCRLExtension.java index 84dcb284cab0355eb8817752eead429a52d57ff7..4cc0b5180b59f8df2764c95b982a650e55aabf6d 100644 --- a/src/java.base/share/classes/sun/security/x509/FreshestCRLExtension.java +++ b/src/java.base/share/classes/sun/security/x509/FreshestCRLExtension.java @@ -42,7 +42,7 @@ import sun.security.util.*; * *

    * The extension is defined in Section 5.2.6 of - * Internet X.509 PKI + * Internet X.509 PKI * Certificate and Certificate Revocation List (CRL) Profile. * *

    diff --git a/src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java b/src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java index d810cf012ae4672b6fd65005f5c8aafffaafcc2e..f214cddf650505fd307eb27c6ddfd766e8a42c4f 100644 --- a/src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java +++ b/src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java @@ -46,7 +46,7 @@ import sun.security.util.DerValue; * *

    * The extension is defined in Section 5.2.5 of - * Internet X.509 PKI + * Internet X.509 PKI * Certificate and Certificate Revocation List (CRL) Profile. * *

    diff --git a/src/java.base/share/classes/sun/security/x509/SubjectInfoAccessExtension.java b/src/java.base/share/classes/sun/security/x509/SubjectInfoAccessExtension.java index 0acdf96057f843126dd73fc17ddbdcf39fb568c3..09636a7ebb2163de313ed5123d974737d5681466 100644 --- a/src/java.base/share/classes/sun/security/x509/SubjectInfoAccessExtension.java +++ b/src/java.base/share/classes/sun/security/x509/SubjectInfoAccessExtension.java @@ -48,7 +48,7 @@ import sun.security.util.DerValue; * included in end entity or CA certificates. Conforming CAs MUST mark * this extension as non-critical. *

    - * This extension is defined in + * This extension is defined in * Internet X.509 PKI Certificate and Certificate Revocation List * (CRL) Profile. The profile permits * the extension to be included in end-entity or CA certificates, diff --git a/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java b/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java index 551e38ad31cee6c67a4111bc86815c4bfa45981b..f721b8156dcf166bcef547b307273d9de126b33c 100644 --- a/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java +++ b/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java @@ -54,7 +54,7 @@ import sun.security.util.*; * signature BIT STRING } * * More information can be found in - * RFC 5280: Internet X.509 + * RFC 5280: Internet X.509 * Public Key Infrastructure Certificate and CRL Profile. *

    * The ASN.1 definition of tbsCertList is: diff --git a/src/java.base/share/classes/sun/util/locale/provider/JRELocaleConstants.java b/src/java.base/share/classes/sun/util/locale/provider/JRELocaleConstants.java index ea511c5bbc6b54948ed1bea60e9ea860888feada..f54f8d5b68eb19b97719461a27d343b169731344 100644 --- a/src/java.base/share/classes/sun/util/locale/provider/JRELocaleConstants.java +++ b/src/java.base/share/classes/sun/util/locale/provider/JRELocaleConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. * 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,10 +35,10 @@ import java.util.Locale; * @author Masayoshi Okutsu */ public class JRELocaleConstants { - public static final Locale JA_JP_JP = new Locale("ja", "JP", "JP"); - public static final Locale NO_NO_NY = new Locale("no", "NO", "NY"); - public static final Locale TH_TH = new Locale("th", "TH"); - public static final Locale TH_TH_TH = new Locale("th", "TH", "TH"); + public static final Locale JA_JP_JP = Locale.of("ja", "JP", "JP"); + public static final Locale NO_NO_NY = Locale.of("no", "NO", "NY"); + public static final Locale TH_TH = Locale.of("th", "TH"); + public static final Locale TH_TH_TH = Locale.of("th", "TH", "TH"); private JRELocaleConstants() { } diff --git a/src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java b/src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java index 18bac98d9419975bb6445588ece0d9fb3a838be7..0cfbf24ad836066a8641ed07f7bea2e2dae89b95 100644 --- a/src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java +++ b/src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -369,7 +369,7 @@ public final class LocaleServiceProviderPool { "A locale(" + locale + ") has non-empty extensions, but has illformed fields."); // Fallback - script field will be lost. - lookupLocale = new Locale(locale.getLanguage(), locale.getCountry(), locale.getVariant()); + lookupLocale = Locale.of(locale.getLanguage(), locale.getCountry(), locale.getVariant()); } } return lookupLocale; diff --git a/src/java.base/share/classes/sun/util/resources/CurrencyNames.properties b/src/java.base/share/classes/sun/util/resources/CurrencyNames.properties index 9f1867d2cd1ed3fbb41c2294354746815c3a3b1d..53bf1d837ff60416255503277dba683c6c4c249a 100644 --- a/src/java.base/share/classes/sun/util/resources/CurrencyNames.properties +++ b/src/java.base/share/classes/sun/util/resources/CurrencyNames.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -221,6 +221,7 @@ SGD=SGD SHP=SHP SIT=SIT SKK=SKK +SLE=SLE SLL=SLL SOS=SOS SRD=SRD @@ -445,6 +446,7 @@ sgd=Singapore Dollar shp=Saint Helena Pound sit=Slovenian Tolar skk=Slovak Koruna +sle=Sierra Leonean Leone sll=Sierra Leonean Leone sos=Somali Shilling srd=Surinamese Dollar diff --git a/src/java.base/share/classes/sun/util/resources/LocaleData.java b/src/java.base/share/classes/sun/util/resources/LocaleData.java index 4240352e8318d0765a5eba32d4c149e3696d8d40..7d9af41811cbe1c4bf224d19074b43295ece723c 100644 --- a/src/java.base/share/classes/sun/util/resources/LocaleData.java +++ b/src/java.base/share/classes/sun/util/resources/LocaleData.java @@ -246,7 +246,7 @@ public class LocaleData { private static final LocaleDataStrategy INSTANCE = new LocaleDataStrategy(); // TODO: avoid hard-coded Locales private static final Set JAVA_BASE_LOCALES - = Set.of(Locale.ROOT, Locale.ENGLISH, Locale.US, new Locale("en", "US", "POSIX")); + = Set.of(Locale.ROOT, Locale.ENGLISH, Locale.US, Locale.of("en", "US", "POSIX")); private LocaleDataStrategy() { } diff --git a/src/java.base/share/conf/security/java.security b/src/java.base/share/conf/security/java.security index 91b3a01ee577f574ebbe060ee08042c289eca43b..2c094c9f19d33482ca6883283a357142a369d029 100644 --- a/src/java.base/share/conf/security/java.security +++ b/src/java.base/share/conf/security/java.security @@ -701,6 +701,16 @@ jdk.security.legacyAlgorithms=SHA1, \ jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ DSA keySize < 1024, SHA1 denyAfter 2019-01-01 +# +# Disabled message digest algorithms for use with plaintext +# HTTP Digest authentication (java.net.HttpURLConnection). +# This includes HTTPS Digest authentication to proxies. +# This may be overridden by setting the networking (or system) +# property "http.auth.digest.reEnabledAlgorithms" to a comma +# separated list of algorithms to be allowed. +# +http.auth.digest.disabledAlgorithms = MD5, SHA-1 + # # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS/DTLS) processing diff --git a/make/data/blockedcertsconverter/blocked.certs.pem b/src/java.base/share/data/blockedcertsconverter/blocked.certs.pem similarity index 100% rename from make/data/blockedcertsconverter/blocked.certs.pem rename to src/java.base/share/data/blockedcertsconverter/blocked.certs.pem diff --git a/make/data/cacerts/README b/src/java.base/share/data/cacerts/README similarity index 100% rename from make/data/cacerts/README rename to src/java.base/share/data/cacerts/README diff --git a/make/data/cacerts/actalisauthenticationrootca b/src/java.base/share/data/cacerts/actalisauthenticationrootca similarity index 100% rename from make/data/cacerts/actalisauthenticationrootca rename to src/java.base/share/data/cacerts/actalisauthenticationrootca diff --git a/make/data/cacerts/addtrustexternalca b/src/java.base/share/data/cacerts/addtrustexternalca similarity index 100% rename from make/data/cacerts/addtrustexternalca rename to src/java.base/share/data/cacerts/addtrustexternalca diff --git a/make/data/cacerts/addtrustqualifiedca b/src/java.base/share/data/cacerts/addtrustqualifiedca similarity index 100% rename from make/data/cacerts/addtrustqualifiedca rename to src/java.base/share/data/cacerts/addtrustqualifiedca diff --git a/make/data/cacerts/affirmtrustcommercialca b/src/java.base/share/data/cacerts/affirmtrustcommercialca similarity index 100% rename from make/data/cacerts/affirmtrustcommercialca rename to src/java.base/share/data/cacerts/affirmtrustcommercialca diff --git a/make/data/cacerts/affirmtrustnetworkingca b/src/java.base/share/data/cacerts/affirmtrustnetworkingca similarity index 100% rename from make/data/cacerts/affirmtrustnetworkingca rename to src/java.base/share/data/cacerts/affirmtrustnetworkingca diff --git a/make/data/cacerts/affirmtrustpremiumca b/src/java.base/share/data/cacerts/affirmtrustpremiumca similarity index 100% rename from make/data/cacerts/affirmtrustpremiumca rename to src/java.base/share/data/cacerts/affirmtrustpremiumca diff --git a/make/data/cacerts/affirmtrustpremiumeccca b/src/java.base/share/data/cacerts/affirmtrustpremiumeccca similarity index 100% rename from make/data/cacerts/affirmtrustpremiumeccca rename to src/java.base/share/data/cacerts/affirmtrustpremiumeccca diff --git a/make/data/cacerts/amazonrootca1 b/src/java.base/share/data/cacerts/amazonrootca1 similarity index 100% rename from make/data/cacerts/amazonrootca1 rename to src/java.base/share/data/cacerts/amazonrootca1 diff --git a/make/data/cacerts/amazonrootca2 b/src/java.base/share/data/cacerts/amazonrootca2 similarity index 100% rename from make/data/cacerts/amazonrootca2 rename to src/java.base/share/data/cacerts/amazonrootca2 diff --git a/make/data/cacerts/amazonrootca3 b/src/java.base/share/data/cacerts/amazonrootca3 similarity index 100% rename from make/data/cacerts/amazonrootca3 rename to src/java.base/share/data/cacerts/amazonrootca3 diff --git a/make/data/cacerts/amazonrootca4 b/src/java.base/share/data/cacerts/amazonrootca4 similarity index 100% rename from make/data/cacerts/amazonrootca4 rename to src/java.base/share/data/cacerts/amazonrootca4 diff --git a/make/data/cacerts/baltimorecybertrustca b/src/java.base/share/data/cacerts/baltimorecybertrustca similarity index 100% rename from make/data/cacerts/baltimorecybertrustca rename to src/java.base/share/data/cacerts/baltimorecybertrustca diff --git a/make/data/cacerts/buypassclass2ca b/src/java.base/share/data/cacerts/buypassclass2ca similarity index 100% rename from make/data/cacerts/buypassclass2ca rename to src/java.base/share/data/cacerts/buypassclass2ca diff --git a/make/data/cacerts/buypassclass3ca b/src/java.base/share/data/cacerts/buypassclass3ca similarity index 100% rename from make/data/cacerts/buypassclass3ca rename to src/java.base/share/data/cacerts/buypassclass3ca diff --git a/make/data/cacerts/camerfirmachambersca b/src/java.base/share/data/cacerts/camerfirmachambersca similarity index 100% rename from make/data/cacerts/camerfirmachambersca rename to src/java.base/share/data/cacerts/camerfirmachambersca diff --git a/make/data/cacerts/camerfirmachamberscommerceca b/src/java.base/share/data/cacerts/camerfirmachamberscommerceca similarity index 100% rename from make/data/cacerts/camerfirmachamberscommerceca rename to src/java.base/share/data/cacerts/camerfirmachamberscommerceca diff --git a/make/data/cacerts/camerfirmachambersignca b/src/java.base/share/data/cacerts/camerfirmachambersignca similarity index 100% rename from make/data/cacerts/camerfirmachambersignca rename to src/java.base/share/data/cacerts/camerfirmachambersignca diff --git a/make/data/cacerts/certumca b/src/java.base/share/data/cacerts/certumca similarity index 100% rename from make/data/cacerts/certumca rename to src/java.base/share/data/cacerts/certumca diff --git a/make/data/cacerts/certumtrustednetworkca b/src/java.base/share/data/cacerts/certumtrustednetworkca similarity index 100% rename from make/data/cacerts/certumtrustednetworkca rename to src/java.base/share/data/cacerts/certumtrustednetworkca diff --git a/make/data/cacerts/chunghwaepkirootca b/src/java.base/share/data/cacerts/chunghwaepkirootca similarity index 100% rename from make/data/cacerts/chunghwaepkirootca rename to src/java.base/share/data/cacerts/chunghwaepkirootca diff --git a/make/data/cacerts/comodoaaaca b/src/java.base/share/data/cacerts/comodoaaaca similarity index 100% rename from make/data/cacerts/comodoaaaca rename to src/java.base/share/data/cacerts/comodoaaaca diff --git a/make/data/cacerts/comodoeccca b/src/java.base/share/data/cacerts/comodoeccca similarity index 100% rename from make/data/cacerts/comodoeccca rename to src/java.base/share/data/cacerts/comodoeccca diff --git a/make/data/cacerts/comodorsaca b/src/java.base/share/data/cacerts/comodorsaca similarity index 100% rename from make/data/cacerts/comodorsaca rename to src/java.base/share/data/cacerts/comodorsaca diff --git a/make/data/cacerts/digicertassuredidg2 b/src/java.base/share/data/cacerts/digicertassuredidg2 similarity index 100% rename from make/data/cacerts/digicertassuredidg2 rename to src/java.base/share/data/cacerts/digicertassuredidg2 diff --git a/make/data/cacerts/digicertassuredidg3 b/src/java.base/share/data/cacerts/digicertassuredidg3 similarity index 100% rename from make/data/cacerts/digicertassuredidg3 rename to src/java.base/share/data/cacerts/digicertassuredidg3 diff --git a/make/data/cacerts/digicertassuredidrootca b/src/java.base/share/data/cacerts/digicertassuredidrootca similarity index 100% rename from make/data/cacerts/digicertassuredidrootca rename to src/java.base/share/data/cacerts/digicertassuredidrootca diff --git a/make/data/cacerts/digicertglobalrootca b/src/java.base/share/data/cacerts/digicertglobalrootca similarity index 100% rename from make/data/cacerts/digicertglobalrootca rename to src/java.base/share/data/cacerts/digicertglobalrootca diff --git a/make/data/cacerts/digicertglobalrootg2 b/src/java.base/share/data/cacerts/digicertglobalrootg2 similarity index 100% rename from make/data/cacerts/digicertglobalrootg2 rename to src/java.base/share/data/cacerts/digicertglobalrootg2 diff --git a/make/data/cacerts/digicertglobalrootg3 b/src/java.base/share/data/cacerts/digicertglobalrootg3 similarity index 100% rename from make/data/cacerts/digicertglobalrootg3 rename to src/java.base/share/data/cacerts/digicertglobalrootg3 diff --git a/make/data/cacerts/digicerthighassuranceevrootca b/src/java.base/share/data/cacerts/digicerthighassuranceevrootca similarity index 100% rename from make/data/cacerts/digicerthighassuranceevrootca rename to src/java.base/share/data/cacerts/digicerthighassuranceevrootca diff --git a/make/data/cacerts/digicerttrustedrootg4 b/src/java.base/share/data/cacerts/digicerttrustedrootg4 similarity index 100% rename from make/data/cacerts/digicerttrustedrootg4 rename to src/java.base/share/data/cacerts/digicerttrustedrootg4 diff --git a/make/data/cacerts/dtrustclass3ca2 b/src/java.base/share/data/cacerts/dtrustclass3ca2 similarity index 100% rename from make/data/cacerts/dtrustclass3ca2 rename to src/java.base/share/data/cacerts/dtrustclass3ca2 diff --git a/make/data/cacerts/dtrustclass3ca2ev b/src/java.base/share/data/cacerts/dtrustclass3ca2ev similarity index 100% rename from make/data/cacerts/dtrustclass3ca2ev rename to src/java.base/share/data/cacerts/dtrustclass3ca2ev diff --git a/make/data/cacerts/entrust2048ca b/src/java.base/share/data/cacerts/entrust2048ca similarity index 100% rename from make/data/cacerts/entrust2048ca rename to src/java.base/share/data/cacerts/entrust2048ca diff --git a/make/data/cacerts/entrustevca b/src/java.base/share/data/cacerts/entrustevca similarity index 100% rename from make/data/cacerts/entrustevca rename to src/java.base/share/data/cacerts/entrustevca diff --git a/make/data/cacerts/entrustrootcaec1 b/src/java.base/share/data/cacerts/entrustrootcaec1 similarity index 100% rename from make/data/cacerts/entrustrootcaec1 rename to src/java.base/share/data/cacerts/entrustrootcaec1 diff --git a/make/data/cacerts/entrustrootcag2 b/src/java.base/share/data/cacerts/entrustrootcag2 similarity index 100% rename from make/data/cacerts/entrustrootcag2 rename to src/java.base/share/data/cacerts/entrustrootcag2 diff --git a/make/data/cacerts/entrustrootcag4 b/src/java.base/share/data/cacerts/entrustrootcag4 similarity index 100% rename from make/data/cacerts/entrustrootcag4 rename to src/java.base/share/data/cacerts/entrustrootcag4 diff --git a/make/data/cacerts/geotrustglobalca b/src/java.base/share/data/cacerts/geotrustglobalca similarity index 100% rename from make/data/cacerts/geotrustglobalca rename to src/java.base/share/data/cacerts/geotrustglobalca diff --git a/make/data/cacerts/geotrustprimaryca b/src/java.base/share/data/cacerts/geotrustprimaryca similarity index 100% rename from make/data/cacerts/geotrustprimaryca rename to src/java.base/share/data/cacerts/geotrustprimaryca diff --git a/make/data/cacerts/geotrustprimarycag2 b/src/java.base/share/data/cacerts/geotrustprimarycag2 similarity index 100% rename from make/data/cacerts/geotrustprimarycag2 rename to src/java.base/share/data/cacerts/geotrustprimarycag2 diff --git a/make/data/cacerts/geotrustprimarycag3 b/src/java.base/share/data/cacerts/geotrustprimarycag3 similarity index 100% rename from make/data/cacerts/geotrustprimarycag3 rename to src/java.base/share/data/cacerts/geotrustprimarycag3 diff --git a/make/data/cacerts/geotrustuniversalca b/src/java.base/share/data/cacerts/geotrustuniversalca similarity index 100% rename from make/data/cacerts/geotrustuniversalca rename to src/java.base/share/data/cacerts/geotrustuniversalca diff --git a/make/data/cacerts/globalsignca b/src/java.base/share/data/cacerts/globalsignca similarity index 100% rename from make/data/cacerts/globalsignca rename to src/java.base/share/data/cacerts/globalsignca diff --git a/make/data/cacerts/globalsigneccrootcar4 b/src/java.base/share/data/cacerts/globalsigneccrootcar4 similarity index 100% rename from make/data/cacerts/globalsigneccrootcar4 rename to src/java.base/share/data/cacerts/globalsigneccrootcar4 diff --git a/make/data/cacerts/globalsigneccrootcar5 b/src/java.base/share/data/cacerts/globalsigneccrootcar5 similarity index 100% rename from make/data/cacerts/globalsigneccrootcar5 rename to src/java.base/share/data/cacerts/globalsigneccrootcar5 diff --git a/make/data/cacerts/globalsignr3ca b/src/java.base/share/data/cacerts/globalsignr3ca similarity index 100% rename from make/data/cacerts/globalsignr3ca rename to src/java.base/share/data/cacerts/globalsignr3ca diff --git a/make/data/cacerts/globalsignrootcar6 b/src/java.base/share/data/cacerts/globalsignrootcar6 similarity index 100% rename from make/data/cacerts/globalsignrootcar6 rename to src/java.base/share/data/cacerts/globalsignrootcar6 diff --git a/make/data/cacerts/godaddyclass2ca b/src/java.base/share/data/cacerts/godaddyclass2ca similarity index 100% rename from make/data/cacerts/godaddyclass2ca rename to src/java.base/share/data/cacerts/godaddyclass2ca diff --git a/make/data/cacerts/godaddyrootg2ca b/src/java.base/share/data/cacerts/godaddyrootg2ca similarity index 100% rename from make/data/cacerts/godaddyrootg2ca rename to src/java.base/share/data/cacerts/godaddyrootg2ca diff --git a/make/data/cacerts/haricaeccrootca2015 b/src/java.base/share/data/cacerts/haricaeccrootca2015 similarity index 100% rename from make/data/cacerts/haricaeccrootca2015 rename to src/java.base/share/data/cacerts/haricaeccrootca2015 diff --git a/make/data/cacerts/haricarootca2015 b/src/java.base/share/data/cacerts/haricarootca2015 similarity index 100% rename from make/data/cacerts/haricarootca2015 rename to src/java.base/share/data/cacerts/haricarootca2015 diff --git a/make/data/cacerts/identrustcommercial b/src/java.base/share/data/cacerts/identrustcommercial similarity index 100% rename from make/data/cacerts/identrustcommercial rename to src/java.base/share/data/cacerts/identrustcommercial diff --git a/make/data/cacerts/identrustpublicca b/src/java.base/share/data/cacerts/identrustpublicca similarity index 100% rename from make/data/cacerts/identrustpublicca rename to src/java.base/share/data/cacerts/identrustpublicca diff --git a/make/data/cacerts/letsencryptisrgx1 b/src/java.base/share/data/cacerts/letsencryptisrgx1 similarity index 100% rename from make/data/cacerts/letsencryptisrgx1 rename to src/java.base/share/data/cacerts/letsencryptisrgx1 diff --git a/make/data/cacerts/luxtrustglobalroot2ca b/src/java.base/share/data/cacerts/luxtrustglobalroot2ca similarity index 100% rename from make/data/cacerts/luxtrustglobalroot2ca rename to src/java.base/share/data/cacerts/luxtrustglobalroot2ca diff --git a/make/data/cacerts/luxtrustglobalrootca b/src/java.base/share/data/cacerts/luxtrustglobalrootca similarity index 100% rename from make/data/cacerts/luxtrustglobalrootca rename to src/java.base/share/data/cacerts/luxtrustglobalrootca diff --git a/make/data/cacerts/quovadisrootca b/src/java.base/share/data/cacerts/quovadisrootca similarity index 100% rename from make/data/cacerts/quovadisrootca rename to src/java.base/share/data/cacerts/quovadisrootca diff --git a/make/data/cacerts/quovadisrootca1g3 b/src/java.base/share/data/cacerts/quovadisrootca1g3 similarity index 100% rename from make/data/cacerts/quovadisrootca1g3 rename to src/java.base/share/data/cacerts/quovadisrootca1g3 diff --git a/make/data/cacerts/quovadisrootca2 b/src/java.base/share/data/cacerts/quovadisrootca2 similarity index 100% rename from make/data/cacerts/quovadisrootca2 rename to src/java.base/share/data/cacerts/quovadisrootca2 diff --git a/make/data/cacerts/quovadisrootca2g3 b/src/java.base/share/data/cacerts/quovadisrootca2g3 similarity index 100% rename from make/data/cacerts/quovadisrootca2g3 rename to src/java.base/share/data/cacerts/quovadisrootca2g3 diff --git a/make/data/cacerts/quovadisrootca3 b/src/java.base/share/data/cacerts/quovadisrootca3 similarity index 100% rename from make/data/cacerts/quovadisrootca3 rename to src/java.base/share/data/cacerts/quovadisrootca3 diff --git a/make/data/cacerts/quovadisrootca3g3 b/src/java.base/share/data/cacerts/quovadisrootca3g3 similarity index 100% rename from make/data/cacerts/quovadisrootca3g3 rename to src/java.base/share/data/cacerts/quovadisrootca3g3 diff --git a/make/data/cacerts/secomscrootca1 b/src/java.base/share/data/cacerts/secomscrootca1 similarity index 100% rename from make/data/cacerts/secomscrootca1 rename to src/java.base/share/data/cacerts/secomscrootca1 diff --git a/make/data/cacerts/secomscrootca2 b/src/java.base/share/data/cacerts/secomscrootca2 similarity index 100% rename from make/data/cacerts/secomscrootca2 rename to src/java.base/share/data/cacerts/secomscrootca2 diff --git a/make/data/cacerts/securetrustca b/src/java.base/share/data/cacerts/securetrustca similarity index 100% rename from make/data/cacerts/securetrustca rename to src/java.base/share/data/cacerts/securetrustca diff --git a/make/data/cacerts/sslrooteccca b/src/java.base/share/data/cacerts/sslrooteccca similarity index 100% rename from make/data/cacerts/sslrooteccca rename to src/java.base/share/data/cacerts/sslrooteccca diff --git a/make/data/cacerts/sslrootevrsaca b/src/java.base/share/data/cacerts/sslrootevrsaca similarity index 100% rename from make/data/cacerts/sslrootevrsaca rename to src/java.base/share/data/cacerts/sslrootevrsaca diff --git a/make/data/cacerts/sslrootrsaca b/src/java.base/share/data/cacerts/sslrootrsaca similarity index 100% rename from make/data/cacerts/sslrootrsaca rename to src/java.base/share/data/cacerts/sslrootrsaca diff --git a/make/data/cacerts/starfieldclass2ca b/src/java.base/share/data/cacerts/starfieldclass2ca similarity index 100% rename from make/data/cacerts/starfieldclass2ca rename to src/java.base/share/data/cacerts/starfieldclass2ca diff --git a/make/data/cacerts/starfieldrootg2ca b/src/java.base/share/data/cacerts/starfieldrootg2ca similarity index 100% rename from make/data/cacerts/starfieldrootg2ca rename to src/java.base/share/data/cacerts/starfieldrootg2ca diff --git a/make/data/cacerts/starfieldservicesrootg2ca b/src/java.base/share/data/cacerts/starfieldservicesrootg2ca similarity index 100% rename from make/data/cacerts/starfieldservicesrootg2ca rename to src/java.base/share/data/cacerts/starfieldservicesrootg2ca diff --git a/make/data/cacerts/swisssigngoldg2ca b/src/java.base/share/data/cacerts/swisssigngoldg2ca similarity index 100% rename from make/data/cacerts/swisssigngoldg2ca rename to src/java.base/share/data/cacerts/swisssigngoldg2ca diff --git a/make/data/cacerts/swisssignplatinumg2ca b/src/java.base/share/data/cacerts/swisssignplatinumg2ca similarity index 100% rename from make/data/cacerts/swisssignplatinumg2ca rename to src/java.base/share/data/cacerts/swisssignplatinumg2ca diff --git a/make/data/cacerts/swisssignsilverg2ca b/src/java.base/share/data/cacerts/swisssignsilverg2ca similarity index 100% rename from make/data/cacerts/swisssignsilverg2ca rename to src/java.base/share/data/cacerts/swisssignsilverg2ca diff --git a/make/data/cacerts/teliasonerarootcav1 b/src/java.base/share/data/cacerts/teliasonerarootcav1 similarity index 100% rename from make/data/cacerts/teliasonerarootcav1 rename to src/java.base/share/data/cacerts/teliasonerarootcav1 diff --git a/make/data/cacerts/thawteprimaryrootca b/src/java.base/share/data/cacerts/thawteprimaryrootca similarity index 100% rename from make/data/cacerts/thawteprimaryrootca rename to src/java.base/share/data/cacerts/thawteprimaryrootca diff --git a/make/data/cacerts/thawteprimaryrootcag2 b/src/java.base/share/data/cacerts/thawteprimaryrootcag2 similarity index 100% rename from make/data/cacerts/thawteprimaryrootcag2 rename to src/java.base/share/data/cacerts/thawteprimaryrootcag2 diff --git a/make/data/cacerts/thawteprimaryrootcag3 b/src/java.base/share/data/cacerts/thawteprimaryrootcag3 similarity index 100% rename from make/data/cacerts/thawteprimaryrootcag3 rename to src/java.base/share/data/cacerts/thawteprimaryrootcag3 diff --git a/make/data/cacerts/ttelesecglobalrootclass2ca b/src/java.base/share/data/cacerts/ttelesecglobalrootclass2ca similarity index 100% rename from make/data/cacerts/ttelesecglobalrootclass2ca rename to src/java.base/share/data/cacerts/ttelesecglobalrootclass2ca diff --git a/make/data/cacerts/ttelesecglobalrootclass3ca b/src/java.base/share/data/cacerts/ttelesecglobalrootclass3ca similarity index 100% rename from make/data/cacerts/ttelesecglobalrootclass3ca rename to src/java.base/share/data/cacerts/ttelesecglobalrootclass3ca diff --git a/make/data/cacerts/usertrusteccca b/src/java.base/share/data/cacerts/usertrusteccca similarity index 100% rename from make/data/cacerts/usertrusteccca rename to src/java.base/share/data/cacerts/usertrusteccca diff --git a/make/data/cacerts/usertrustrsaca b/src/java.base/share/data/cacerts/usertrustrsaca similarity index 100% rename from make/data/cacerts/usertrustrsaca rename to src/java.base/share/data/cacerts/usertrustrsaca diff --git a/make/data/cacerts/utnuserfirstobjectca b/src/java.base/share/data/cacerts/utnuserfirstobjectca similarity index 100% rename from make/data/cacerts/utnuserfirstobjectca rename to src/java.base/share/data/cacerts/utnuserfirstobjectca diff --git a/make/data/cacerts/verisignclass3g3ca b/src/java.base/share/data/cacerts/verisignclass3g3ca similarity index 100% rename from make/data/cacerts/verisignclass3g3ca rename to src/java.base/share/data/cacerts/verisignclass3g3ca diff --git a/make/data/cacerts/verisignclass3g4ca b/src/java.base/share/data/cacerts/verisignclass3g4ca similarity index 100% rename from make/data/cacerts/verisignclass3g4ca rename to src/java.base/share/data/cacerts/verisignclass3g4ca diff --git a/make/data/cacerts/verisignclass3g5ca b/src/java.base/share/data/cacerts/verisignclass3g5ca similarity index 100% rename from make/data/cacerts/verisignclass3g5ca rename to src/java.base/share/data/cacerts/verisignclass3g5ca diff --git a/make/data/cacerts/verisignuniversalrootca b/src/java.base/share/data/cacerts/verisignuniversalrootca similarity index 100% rename from make/data/cacerts/verisignuniversalrootca rename to src/java.base/share/data/cacerts/verisignuniversalrootca diff --git a/make/data/cacerts/xrampglobalca b/src/java.base/share/data/cacerts/xrampglobalca similarity index 100% rename from make/data/cacerts/xrampglobalca rename to src/java.base/share/data/cacerts/xrampglobalca diff --git a/make/data/currency/CurrencyData.properties b/src/java.base/share/data/currency/CurrencyData.properties similarity index 98% rename from make/data/currency/CurrencyData.properties rename to src/java.base/share/data/currency/CurrencyData.properties index 236e544feaf65543bac0ca05d69e55946dd31996..d86fc6ddfd41b08989e5f3cd5c2805abb76bfa68 100644 --- a/make/data/currency/CurrencyData.properties +++ b/src/java.base/share/data/currency/CurrencyData.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. # 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 @@ formatVersion=3 # Version of the currency code information in this class. # It is a serial number that accompanies with each amendment. -dataVersion=170 +dataVersion=171 # List of all valid ISO 4217 currency codes. # To ensure compatibility, do not remove codes. @@ -51,7 +51,7 @@ all=ADP020-AED784-AFA004-AFN971-ALL008-AMD051-ANG532-AOA973-ARS032-ATS040-AUD036 MTL470-MUR480-MVR462-MWK454-MXN484-MXV979-MYR458-MZM508-MZN943-NAD516-NGN566-\ NIO558-NLG528-NOK578-NPR524-NZD554-OMR512-PAB590-PEN604-PGK598-PHP608-\ PKR586-PLN985-PTE620-PYG600-QAR634-ROL642-RON946-RSD941-RUB643-RUR810-RWF646-SAR682-\ - SBD090-SCR690-SDD736-SDG938-SEK752-SGD702-SHP654-SIT705-SKK703-SLL694-SOS706-\ + SBD090-SCR690-SDD736-SDG938-SEK752-SGD702-SHP654-SIT705-SKK703-SLE925-SLL694-SOS706-\ SRD968-SRG740-SSP728-STD678-STN930-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TMT934-TND788-TOP776-\ TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-UYI940-\ UYU858-UZS860-VEB862-VED926-VEF937-VES928-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\ @@ -484,7 +484,7 @@ CS=CSD # SEYCHELLES SC=SCR # SIERRA LEONE -SL=SLL +SL=SLE # SINGAPORE SG=SGD # SLOVAKIA diff --git a/make/data/lsrdata/language-subtag-registry.txt b/src/java.base/share/data/lsrdata/language-subtag-registry.txt similarity index 100% rename from make/data/lsrdata/language-subtag-registry.txt rename to src/java.base/share/data/lsrdata/language-subtag-registry.txt diff --git a/make/data/publicsuffixlist/VERSION b/src/java.base/share/data/publicsuffixlist/VERSION similarity index 100% rename from make/data/publicsuffixlist/VERSION rename to src/java.base/share/data/publicsuffixlist/VERSION diff --git a/make/data/publicsuffixlist/public_suffix_list.dat b/src/java.base/share/data/publicsuffixlist/public_suffix_list.dat similarity index 100% rename from make/data/publicsuffixlist/public_suffix_list.dat rename to src/java.base/share/data/publicsuffixlist/public_suffix_list.dat diff --git a/make/data/tzdata/VERSION b/src/java.base/share/data/tzdata/VERSION similarity index 98% rename from make/data/tzdata/VERSION rename to src/java.base/share/data/tzdata/VERSION index 3a40c9103336dd787555918125044d61d62f1810..bc830a3a5ef737afa535f46512f743f5494d533d 100644 --- a/make/data/tzdata/VERSION +++ b/src/java.base/share/data/tzdata/VERSION @@ -21,4 +21,4 @@ # or visit www.oracle.com if you need additional information or have any # questions. # -tzdata2021e +tzdata2022a diff --git a/make/data/tzdata/africa b/src/java.base/share/data/tzdata/africa similarity index 99% rename from make/data/tzdata/africa rename to src/java.base/share/data/tzdata/africa index 0f367713ea900d457b14a23963854bc94c1c1414..5466bbcc87b80967b42c44abd51435753c58a716 100644 --- a/make/data/tzdata/africa +++ b/src/java.base/share/data/tzdata/africa @@ -941,6 +941,10 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) # (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) # (setq islamic-year (+ 1 islamic-year)))) +# +# From Milamber (2021-03-31, 2022-03-10), confirming these predictions: +# https://www.mmsp.gov.ma/fr/actualites.aspx?id=2076 +# https://www.ecoactu.ma/horaires-administration-ramadan-gmtheure-gmt-a-partir-de-dimanche-27-mars/ # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Morocco 1939 only - Sep 12 0:00 1:00 - diff --git a/make/data/tzdata/antarctica b/src/java.base/share/data/tzdata/antarctica similarity index 100% rename from make/data/tzdata/antarctica rename to src/java.base/share/data/tzdata/antarctica diff --git a/make/data/tzdata/asia b/src/java.base/share/data/tzdata/asia similarity index 99% rename from make/data/tzdata/asia rename to src/java.base/share/data/tzdata/asia index cfe48745e2459fc3a5cbdbe803a983fa372e58d1..4aaaf146b0f4e4d83925d3cd9b6a0469136cd7dd 100644 --- a/make/data/tzdata/asia +++ b/src/java.base/share/data/tzdata/asia @@ -3429,8 +3429,12 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # ... winter time will begin in Palestine from Friday 10-29, 01:00 AM # by 60 minutes backwards. # -# From Paul Eggert (2021-10-20): -# Guess future fall transitions on October's last Friday at 01:00. +# From Tim Parenti (2021-10-25), per Paul Eggert (2021-10-24): +# Guess future fall transitions at 01:00 on the Friday preceding October's +# last Sunday (i.e., Fri>=23), as this is more consistent with recent practice. + +# From Heba Hamad (2022-03-10): +# summer time will begin in Palestine from Sunday 03-27-2022, 00:00 AM. # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -3466,9 +3470,10 @@ Rule Palestine 2016 2018 - Mar Sat>=24 1:00 1:00 S Rule Palestine 2016 2018 - Oct Sat>=24 1:00 0 - Rule Palestine 2019 only - Mar 29 0:00 1:00 S Rule Palestine 2019 only - Oct Sat>=24 0:00 0 - -Rule Palestine 2020 max - Mar Sat>=24 0:00 1:00 S +Rule Palestine 2020 2021 - Mar Sat>=24 0:00 1:00 S Rule Palestine 2020 only - Oct 24 1:00 0 - -Rule Palestine 2021 max - Oct lastFri 1:00 0 - +Rule Palestine 2021 max - Oct Fri>=23 1:00 0 - +Rule Palestine 2022 max - Mar Sun>=25 0:00 1:00 S # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct diff --git a/make/data/tzdata/australasia b/src/java.base/share/data/tzdata/australasia similarity index 100% rename from make/data/tzdata/australasia rename to src/java.base/share/data/tzdata/australasia diff --git a/make/data/tzdata/backward b/src/java.base/share/data/tzdata/backward similarity index 100% rename from make/data/tzdata/backward rename to src/java.base/share/data/tzdata/backward diff --git a/make/data/tzdata/etcetera b/src/java.base/share/data/tzdata/etcetera similarity index 100% rename from make/data/tzdata/etcetera rename to src/java.base/share/data/tzdata/etcetera diff --git a/make/data/tzdata/europe b/src/java.base/share/data/tzdata/europe similarity index 98% rename from make/data/tzdata/europe rename to src/java.base/share/data/tzdata/europe index 9b0b64aa3ebecea94677bf4119dd5b27271fd585..bc57e94e44f4fe212eceed3d918600572fe81d6c 100644 --- a/make/data/tzdata/europe +++ b/src/java.base/share/data/tzdata/europe @@ -2808,8 +2808,26 @@ Zone Europe/Kaliningrad 1:22:00 - LMT 1893 Apr # says he remembers that Samara opted out of the 1992-01-19 exception # 2 days before the switch. # -# -# From Paul Eggert (2016-03-18): +# From Alois Treindl (2022-02-15): +# the Russian wikipedia page +# https://ru.wikipedia.org/wiki/Московское_время#Перемещение_границы_применения_московского_времени_на_восток +# contains the sentence (in Google translation) "In the autumn of +# 1981, Arkhangelsk, Vologda, Yaroslavl, Ivanovo, Vladimir, Ryazan, +# Lipetsk, Voronezh, Rostov-on-Don, Krasnodar and regions to the east +# of those named (about 30 in total) parted ways with Moscow time. +# However, the convenience of common time with Moscow turned out to be +# decisive - in 1982, these regions again switched to Moscow time." +# Shanks International atlas has similar information, and also the +# Russian book Zaitsev A., Kutalev D. A new astrologer's reference +# book. Coordinates of cities and time corrections, - The World of +# Urania, 2012 (Russian: Зайцев А., Куталёв Д., Новый справочник +# астролога. Координаты городов и временные поправки). +# To me it seems that an extra zone is needed, which starts with LMT +# util 1919, later follows Moscow since 1930, but deviates from it +# between 1 October 1981 until 1 April 1982. +# +# +# From Paul Eggert (2022-02-15): # Given the above, we appear to be missing some Zone entries for the # chaotic early 1980s in Russia. It's not clear what these entries # should be. For now, sweep this under the rug and just document the @@ -2856,7 +2874,7 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880 1:00 C-Eur CE%sT 1944 Apr 13 3:00 Russia MSK/MSD 1990 3:00 - MSK 1990 Jul 1 2:00 - 2:00 - EET 1992 + 2:00 - EET 1992 Mar 20 # Central Crimea used Moscow time 1994/1997. # # From Paul Eggert (2006-03-22): @@ -2866,7 +2884,7 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880 # sometime between the 1994 DST switches. Shanks & Pottenger simply say # 1994-09-25 03:00, but that can't be right. For now, guess it # changed in May. - 2:00 E-Eur EE%sT 1994 May + 2:00 C-Eur EE%sT 1994 May # From IATA SSIM (1994/1997), which also says that Kerch is still like Kiev. 3:00 E-Eur MSK/MSD 1996 Mar 31 0:00s 3:00 1:00 MSD 1996 Oct 27 3:00s @@ -4033,6 +4051,27 @@ Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents. # Ukraine # +# From Alois Triendl (2014-03-01): +# REGULATION A N O V A on March 20, 1992 N 139 ... means that from +# 1992 on, Ukraine had DST with begin time at 02:00 am, on last Sunday +# in March, and end time 03:00 am, last Sunday in September.... +# CABINET OF MINISTERS OF UKRAINE RESOLUTION on May 13, 1996 N 509 +# "On the order of computation time on the territory of Ukraine" .... +# As this cabinet decision is from May 1996, it seems likely that the +# transition in March 1996, which predates it, was still at 2:00 am +# and not at 3:00 as would have been under EU rules. +# This is why I have set the change to EU rules into May 1996, +# so that the change in March is stil covered by the Ukraine rule. +# The next change in October 1996 happened under EU rules.... +# TZ database holds three other zones for Ukraine.... I have not yet +# worked out the consequences for these three zones, as we (me and my +# US colleague David Cochrane) are still trying to get more +# information upon these local deviations from Kiev rules. +# +# From Paul Eggert (2022-02-08): +# For now, assume that Ukraine's other three zones followed the same rules, +# except that Crimea switched to Moscow time in 1994 as described elsewhere. + # From Igor Karpov, who works for the Ukrainian Ministry of Justice, # via Garrett Wollman (2003-01-27): # BTW, I've found the official document on this matter. It's government @@ -4122,7 +4161,7 @@ Zone Europe/Kiev 2:02:04 - LMT 1880 1:00 C-Eur CE%sT 1943 Nov 6 3:00 Russia MSK/MSD 1990 Jul 1 2:00 2:00 1:00 EEST 1991 Sep 29 3:00 - 2:00 E-Eur EE%sT 1995 + 2:00 C-Eur EE%sT 1996 May 13 2:00 EU EE%sT # Transcarpathia used CET 1990/1991. # "Uzhhorod" is the transliteration of the Rusyn/Ukrainian pronunciation, but @@ -4135,8 +4174,8 @@ Zone Europe/Uzhgorod 1:29:12 - LMT 1890 Oct 3:00 Russia MSK/MSD 1990 3:00 - MSK 1990 Jul 1 2:00 1:00 - CET 1991 Mar 31 3:00 - 2:00 - EET 1992 - 2:00 E-Eur EE%sT 1995 + 2:00 - EET 1992 Mar 20 + 2:00 C-Eur EE%sT 1996 May 13 2:00 EU EE%sT # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991. # "Zaporizhia" is the transliteration of the Ukrainian name, but @@ -4149,7 +4188,8 @@ Zone Europe/Zaporozhye 2:20:40 - LMT 1880 3:00 - MSK 1941 Aug 25 1:00 C-Eur CE%sT 1943 Oct 25 3:00 Russia MSK/MSD 1991 Mar 31 2:00 - 2:00 E-Eur EE%sT 1995 + 2:00 E-Eur EE%sT 1992 Mar 20 + 2:00 C-Eur EE%sT 1996 May 13 2:00 EU EE%sT # Vatican City diff --git a/make/data/tzdata/factory b/src/java.base/share/data/tzdata/factory similarity index 100% rename from make/data/tzdata/factory rename to src/java.base/share/data/tzdata/factory diff --git a/make/data/tzdata/gmt b/src/java.base/share/data/tzdata/gmt similarity index 100% rename from make/data/tzdata/gmt rename to src/java.base/share/data/tzdata/gmt diff --git a/make/data/tzdata/iso3166.tab b/src/java.base/share/data/tzdata/iso3166.tab similarity index 100% rename from make/data/tzdata/iso3166.tab rename to src/java.base/share/data/tzdata/iso3166.tab diff --git a/make/data/tzdata/jdk11_backward b/src/java.base/share/data/tzdata/jdk11_backward similarity index 100% rename from make/data/tzdata/jdk11_backward rename to src/java.base/share/data/tzdata/jdk11_backward diff --git a/make/data/tzdata/leapseconds b/src/java.base/share/data/tzdata/leapseconds similarity index 96% rename from make/data/tzdata/leapseconds rename to src/java.base/share/data/tzdata/leapseconds index cc514561ff177924dd0741b5b5f9f37c3b8526d2..776d25ab3674edaccb0ec3de640bb280bf527350 100644 --- a/make/data/tzdata/leapseconds +++ b/src/java.base/share/data/tzdata/leapseconds @@ -95,11 +95,11 @@ Leap 2016 Dec 31 23:59:60 + S # Any additional leap seconds will come after this. # This Expires line is commented out for now, # so that pre-2020a zic implementations do not reject this file. -#Expires 2022 Jun 28 00:00:00 +#Expires 2022 Dec 28 00:00:00 # POSIX timestamps for the data in this file: #updated 1467936000 (2016-07-08 00:00:00 UTC) -#expires 1656374400 (2022-06-28 00:00:00 UTC) +#expires 1672185600 (2022-12-28 00:00:00 UTC) -# Updated through IERS Bulletin C62 -# File expires on: 28 June 2022 +# Updated through IERS Bulletin C63 +# File expires on: 28 December 2022 diff --git a/make/data/tzdata/northamerica b/src/java.base/share/data/tzdata/northamerica similarity index 100% rename from make/data/tzdata/northamerica rename to src/java.base/share/data/tzdata/northamerica diff --git a/make/data/tzdata/solar87 b/src/java.base/share/data/tzdata/solar87 similarity index 100% rename from make/data/tzdata/solar87 rename to src/java.base/share/data/tzdata/solar87 diff --git a/make/data/tzdata/solar88 b/src/java.base/share/data/tzdata/solar88 similarity index 100% rename from make/data/tzdata/solar88 rename to src/java.base/share/data/tzdata/solar88 diff --git a/make/data/tzdata/solar89 b/src/java.base/share/data/tzdata/solar89 similarity index 100% rename from make/data/tzdata/solar89 rename to src/java.base/share/data/tzdata/solar89 diff --git a/make/data/tzdata/southamerica b/src/java.base/share/data/tzdata/southamerica similarity index 97% rename from make/data/tzdata/southamerica rename to src/java.base/share/data/tzdata/southamerica index 503ed65f58036589e0a49de694077ca769a25a9e..b6e401ac2528f9be8dbc1a1c2cbb5234eb4685a2 100644 --- a/make/data/tzdata/southamerica +++ b/src/java.base/share/data/tzdata/southamerica @@ -1109,7 +1109,7 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # Chile -# From Paul Eggert (2015-04-03): +# From Paul Eggert (2022-03-15): # Shanks & Pottenger says America/Santiago introduced standard time in # 1890 and rounds its UT offset to 70W40; guess that in practice this # was the same offset as in 1916-1919. It also says Pacific/Easter @@ -1132,7 +1132,7 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # Historia de la hora oficial de Chile (retrieved 2012-10-24). See: # https://web.archive.org/web/20121024234627/http://www.horaoficial.cl/horaof.htm # A fancier Spanish version (requiring mouse-clicking) is at: -# http://www.horaoficial.cl/historia_hora.html +# http://www.horaoficial.cl/historia_hora.php # Conflicts between [1] and [2] were resolved as follows: # # - [1] says the 1910 transition was Jan 1, [2] says Jan 10 and cites @@ -1141,7 +1141,8 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # - [1] says SMT was -4:42:45, [2] says Chile's official time from # 1916 to 1919 was -4:42:46.3, the meridian of Chile's National # Astronomical Observatory (OAN), then located in what is now -# Quinta Normal in Santiago. Go with [2], rounding it to -4:42:46. +# Quinta Normal in Santiago. Go with [1], as this matches the meridian +# referred to by the relevant Chilean laws to this day. # # - [1] says the 1918 transition was Sep 1, [2] says Sep 10 and cites # Boletín No. 22, Aviso No. 129/1918 (1918-08-23). Go with [2]. @@ -1163,6 +1164,32 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # this is known to work for DST transitions starting in 2008 and # may well be true for earlier transitions. +# From Tim Parenti (2022-03-15): +# For a brief period of roughly six weeks in 1946, DST was only observed on an +# emergency basis in specific regions of central Chile; namely, "the national +# territory between the provinces of Coquimbo and Concepción, inclusive". +# This was enacted by Decree 3,891, dated 1946-07-13, and took effect +# 1946-07-14 24:00, advancing these central regions to -03. +# https://www.diariooficial.interior.gob.cl/versiones-anteriores/do-h/19460715/#page/1 +# The decree contemplated "[t]hat this advancement of the Official Time, even +# though it has been proposed for the cities of Santiago and Valparaíso only, +# must be agreed with that of other cities, due to the connection of various +# activities that require it, such as, for example, the operation of rail +# services". It was originally set to expire after 30 days but was extended +# through 1946-08-31 by Decree 4,506, dated 1946-08-13. +# https://www.diariooficial.interior.gob.cl/versiones-anteriores/do-h/19460814/#page/1 +# +# Law Number 8,522, promulgated 1946-08-27, reunified Chilean clocks at their +# new "Summer Time" of -04, reckoned as that of "the meridian of the +# Astronomical Observatory of Lo Espejo, advanced by 42 minutes and 45 +# seconds". +# https://www.diariooficial.interior.gob.cl/versiones-anteriores/do-h/19460828/#page/1 +# After a brief "Winter Time" stint at -05 beginning 1947-04-01, Law Number +# 8,777, promulgated 1947-05-17, established year-round -04 "from 23:00 on the +# second day after it is published in the 'Diario Oficial'." It was published +# on Monday 1947-05-19 and so took effect from Wednesday 1947-05-21 23:00. +# https://www.diariooficial.interior.gob.cl/versiones-anteriores/do-h/19470519/#page/1 + # From Eduardo Krell (1995-10-19): # The law says to switch to DST at midnight [24:00] on the second SATURDAY # of October.... The law is the same for March and October. @@ -1321,12 +1348,12 @@ Rule Chile 2019 max - Sep Sun>=2 4:00u 1:00 - # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone America/Santiago -4:42:46 - LMT 1890 - -4:42:46 - SMT 1910 Jan 10 # Santiago Mean Time +Zone America/Santiago -4:42:45 - LMT 1890 + -4:42:45 - SMT 1910 Jan 10 # Santiago Mean Time -5:00 - -05 1916 Jul 1 - -4:42:46 - SMT 1918 Sep 10 + -4:42:45 - SMT 1918 Sep 10 -4:00 - -04 1919 Jul 1 - -4:42:46 - SMT 1927 Sep 1 + -4:42:45 - SMT 1927 Sep 1 -5:00 Chile -05/-04 1932 Sep 1 -4:00 - -04 1942 Jun 1 -5:00 - -05 1942 Aug 1 @@ -1336,11 +1363,11 @@ Zone America/Santiago -4:42:46 - LMT 1890 -5:00 - -05 1947 May 21 23:00 -4:00 Chile -04/-03 Zone America/Punta_Arenas -4:43:40 - LMT 1890 - -4:42:46 - SMT 1910 Jan 10 + -4:42:45 - SMT 1910 Jan 10 -5:00 - -05 1916 Jul 1 - -4:42:46 - SMT 1918 Sep 10 + -4:42:45 - SMT 1918 Sep 10 -4:00 - -04 1919 Jul 1 - -4:42:46 - SMT 1927 Sep 1 + -4:42:45 - SMT 1927 Sep 1 -5:00 Chile -05/-04 1932 Sep 1 -4:00 - -04 1942 Jun 1 -5:00 - -05 1942 Aug 1 diff --git a/make/data/tzdata/zone.tab b/src/java.base/share/data/tzdata/zone.tab similarity index 100% rename from make/data/tzdata/zone.tab rename to src/java.base/share/data/tzdata/zone.tab diff --git a/make/data/unicodedata/Blocks.txt b/src/java.base/share/data/unicodedata/Blocks.txt similarity index 100% rename from make/data/unicodedata/Blocks.txt rename to src/java.base/share/data/unicodedata/Blocks.txt diff --git a/make/data/unicodedata/DerivedCoreProperties.txt b/src/java.base/share/data/unicodedata/DerivedCoreProperties.txt similarity index 100% rename from make/data/unicodedata/DerivedCoreProperties.txt rename to src/java.base/share/data/unicodedata/DerivedCoreProperties.txt diff --git a/make/data/unicodedata/NormalizationTest.txt b/src/java.base/share/data/unicodedata/NormalizationTest.txt similarity index 100% rename from make/data/unicodedata/NormalizationTest.txt rename to src/java.base/share/data/unicodedata/NormalizationTest.txt diff --git a/make/data/unicodedata/PropList.txt b/src/java.base/share/data/unicodedata/PropList.txt similarity index 100% rename from make/data/unicodedata/PropList.txt rename to src/java.base/share/data/unicodedata/PropList.txt diff --git a/make/data/unicodedata/PropertyValueAliases.txt b/src/java.base/share/data/unicodedata/PropertyValueAliases.txt similarity index 100% rename from make/data/unicodedata/PropertyValueAliases.txt rename to src/java.base/share/data/unicodedata/PropertyValueAliases.txt diff --git a/make/data/unicodedata/ReadMe.txt b/src/java.base/share/data/unicodedata/ReadMe.txt similarity index 100% rename from make/data/unicodedata/ReadMe.txt rename to src/java.base/share/data/unicodedata/ReadMe.txt diff --git a/make/data/unicodedata/Scripts.txt b/src/java.base/share/data/unicodedata/Scripts.txt similarity index 100% rename from make/data/unicodedata/Scripts.txt rename to src/java.base/share/data/unicodedata/Scripts.txt diff --git a/make/data/unicodedata/SpecialCasing.txt b/src/java.base/share/data/unicodedata/SpecialCasing.txt similarity index 100% rename from make/data/unicodedata/SpecialCasing.txt rename to src/java.base/share/data/unicodedata/SpecialCasing.txt diff --git a/make/data/unicodedata/UnicodeData.txt b/src/java.base/share/data/unicodedata/UnicodeData.txt similarity index 100% rename from make/data/unicodedata/UnicodeData.txt rename to src/java.base/share/data/unicodedata/UnicodeData.txt diff --git a/make/data/unicodedata/auxiliary/GraphemeBreakProperty.txt b/src/java.base/share/data/unicodedata/auxiliary/GraphemeBreakProperty.txt similarity index 100% rename from make/data/unicodedata/auxiliary/GraphemeBreakProperty.txt rename to src/java.base/share/data/unicodedata/auxiliary/GraphemeBreakProperty.txt diff --git a/make/data/unicodedata/auxiliary/GraphemeBreakTest.txt b/src/java.base/share/data/unicodedata/auxiliary/GraphemeBreakTest.txt similarity index 100% rename from make/data/unicodedata/auxiliary/GraphemeBreakTest.txt rename to src/java.base/share/data/unicodedata/auxiliary/GraphemeBreakTest.txt diff --git a/make/data/unicodedata/emoji/emoji-data.txt b/src/java.base/share/data/unicodedata/emoji/emoji-data.txt similarity index 100% rename from make/data/unicodedata/emoji/emoji-data.txt rename to src/java.base/share/data/unicodedata/emoji/emoji-data.txt diff --git a/src/java.base/share/legal/asm.md b/src/java.base/share/legal/asm.md index 707ecda7c0e19e9eeb526b8cc2598bd0a5ed3384..4b796017cec62fca37bf959ccb5e395d9d72b4b4 100644 --- a/src/java.base/share/legal/asm.md +++ b/src/java.base/share/legal/asm.md @@ -1,4 +1,4 @@ -## ASM Bytecode Manipulation Framework v8.0.1 +## ASM Bytecode Manipulation Framework v9.2 ### ASM License

    diff --git a/src/java.base/share/native/libjava/ClassLoader.c b/src/java.base/share/native/libjava/ClassLoader.c
    index bbdff87b0b312ff549d1456cf88859ff33387b85..301f068070b36cf0cd948718de148570d9b51d46 100644
    --- a/src/java.base/share/native/libjava/ClassLoader.c
    +++ b/src/java.base/share/native/libjava/ClassLoader.c
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
      * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      *
      * This code is free software; you can redistribute it and/or modify it
    @@ -23,16 +23,16 @@
      * questions.
      */
     
    -#include 
     #include 
    +#include 
    +#include 
     
    +#include "check_classname.h"
    +#include "java_lang_ClassLoader.h"
    +#include "jlong.h"
     #include "jni.h"
     #include "jni_util.h"
    -#include "jlong.h"
     #include "jvm.h"
    -#include "check_classname.h"
    -#include "java_lang_ClassLoader.h"
    -#include 
     
     static JNINativeMethod methods[] = {
         {"retrieveDirectives",  "()Ljava/lang/AssertionStatusDirectives;", (void *)&JVM_AssertionStatusDirectives}
    @@ -88,7 +88,7 @@ Java_java_lang_ClassLoader_defineClass1(JNIEnv *env,
     
         if (data == NULL) {
             JNU_ThrowNullPointerException(env, 0);
    -        return 0;
    +        return NULL;
         }
     
         /* Work around 4153825. malloc crashes on Solaris when passed a
    @@ -96,20 +96,27 @@ Java_java_lang_ClassLoader_defineClass1(JNIEnv *env,
          */
         if (length < 0) {
             JNU_ThrowArrayIndexOutOfBoundsException(env, 0);
    -        return 0;
    +        return NULL;
         }
     
    -    body = (jbyte *)malloc(length);
    +    // On AIX malloc(0) returns NULL which looks like an out-of-memory
    +    // condition; so adjust it to malloc(1)
    +    #ifdef _AIX
    +        body = (jbyte *)malloc(length == 0 ? 1 : length);
    +    #else
    +        body = (jbyte *)malloc(length);
    +    #endif
     
    -    if (body == 0) {
    +    if (body == NULL) {
             JNU_ThrowOutOfMemoryError(env, 0);
    -        return 0;
    +        return NULL;
         }
     
         (*env)->GetByteArrayRegion(env, data, offset, length, body);
     
    -    if ((*env)->ExceptionOccurred(env))
    +    if ((*env)->ExceptionOccurred(env)) {
             goto free_body;
    +    }
     
         if (name != NULL) {
             utfName = getUTF(env, name, buf, sizeof(buf));
    @@ -168,9 +175,9 @@ Java_java_lang_ClassLoader_defineClass2(JNIEnv *env,
     
         body = (*env)->GetDirectBufferAddress(env, data);
     
    -    if (body == 0) {
    +    if (body == NULL) {
             JNU_ThrowNullPointerException(env, 0);
    -        return 0;
    +        return NULL;
         }
     
         body += offset;
    @@ -228,7 +235,7 @@ Java_java_lang_ClassLoader_defineClass0(JNIEnv *env,
     
         if (data == NULL) {
             JNU_ThrowNullPointerException(env, 0);
    -        return 0;
    +        return NULL;
         }
     
         /* Work around 4153825. malloc crashes on Solaris when passed a
    @@ -236,13 +243,20 @@ Java_java_lang_ClassLoader_defineClass0(JNIEnv *env,
          */
         if (length < 0) {
             JNU_ThrowArrayIndexOutOfBoundsException(env, 0);
    -        return 0;
    +        return NULL;
         }
     
    -    body = (jbyte *)malloc(length);
    -    if (body == 0) {
    +    // On AIX malloc(0) returns NULL which looks like an out-of-memory
    +    // condition; so adjust it to malloc(1)
    +    #ifdef _AIX
    +        body = (jbyte *)malloc(length == 0 ? 1 : length);
    +    #else
    +        body = (jbyte *)malloc(length);
    +    #endif
    +
    +    if (body == NULL) {
             JNU_ThrowOutOfMemoryError(env, 0);
    -        return 0;
    +        return NULL;
         }
     
         (*env)->GetByteArrayRegion(env, data, offset, length, body);
    @@ -282,7 +296,7 @@ Java_java_lang_ClassLoader_findBootstrapClass(JNIEnv *env, jclass dummy,
         char buf[128];
     
         if (classname == NULL) {
    -        return 0;
    +        return NULL;
         }
     
         clname = getUTF(env, classname, buf, sizeof(buf));
    @@ -311,7 +325,7 @@ Java_java_lang_ClassLoader_findLoadedClass0(JNIEnv *env, jobject loader,
                                                jstring name)
     {
         if (name == NULL) {
    -        return 0;
    +        return NULL;
         } else {
             return JVM_FindLoadedClass(env, loader, name);
         }
    diff --git a/src/java.base/share/native/libnet/InetAddress.c b/src/java.base/share/native/libnet/InetAddress.c
    index 39b419d600e361cfd07a5d324ef111453937db1c..e759a064d256ecb3b6abd53371c2d34ceb242b13 100644
    --- a/src/java.base/share/native/libnet/InetAddress.c
    +++ b/src/java.base/share/native/libnet/InetAddress.c
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
      * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      *
      * This code is free software; you can redistribute it and/or modify it
    @@ -76,8 +76,19 @@ Java_java_net_InetAddress_init(JNIEnv *env, jclass cls) {
     /*
      * Class:     java_net_InetAddress
      * Method:    isIPv4Available
    + * Signature: ()Z
      */
     JNIEXPORT jboolean JNICALL
     Java_java_net_InetAddress_isIPv4Available(JNIEnv *env, jclass clazz) {
         return ipv4_available();
     }
    +
    +/*
    + * Class:     java_net_InetAddress
    + * Method:    isIPv6Supported
    + * Signature: ()Z
    + */
    +JNIEXPORT jboolean JNICALL
    +Java_java_net_InetAddress_isIPv6Supported(JNIEnv *env, jclass clazz) {
    +    return ipv6_available();
    +}
    diff --git a/src/java.base/share/native/libverify/check_code.c b/src/java.base/share/native/libverify/check_code.c
    index fca549cfc9b1b4cfdbfd4b167fc22372d55915c6..55d6fbcf42a4f552af6ce8443a1f70ed465419d6 100644
    --- a/src/java.base/share/native/libverify/check_code.c
    +++ b/src/java.base/share/native/libverify/check_code.c
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved.
      * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      *
      * This code is free software; you can redistribute it and/or modify it
    @@ -468,7 +468,8 @@ static void CCout_of_memory (context_type *);
     /* Because we can longjmp any time, we need to be very careful about
      * remembering what needs to be freed. */
     
    -static void check_and_push(context_type *context, const void *ptr, int kind);
    +static void check_and_push_malloc_block(context_type *context, void *ptr);
    +static void check_and_push_string_utf(context_type *context, const char *ptr);
     static void pop_and_free(context_type *context);
     
     static int signature_to_args_size(const char *method_signature);
    @@ -604,7 +605,7 @@ class_to_ID(context_type *context, jclass cb, jboolean loadable)
         unsigned short *pID;
         const char *name = JVM_GetClassNameUTF(env, cb);
     
    -    check_and_push(context, name, VM_STRING_UTF);
    +    check_and_push_string_utf(context, name);
         hash = class_hash_fun(name);
         pID = &(class_hash->table[hash % HASH_TABLE_SIZE]);
         while (*pID) {
    @@ -939,10 +940,10 @@ read_all_code(context_type* context, jclass cb, int num_methods,
         int i;
     
         lengths = malloc(sizeof(int) * num_methods);
    -    check_and_push(context, lengths, VM_MALLOC_BLK);
    +    check_and_push_malloc_block(context, lengths);
     
         code = malloc(sizeof(unsigned char*) * num_methods);
    -    check_and_push(context, code, VM_MALLOC_BLK);
    +    check_and_push_malloc_block(context, code);
     
         *(lengths_addr) = lengths;
         *(code_addr) = code;
    @@ -951,7 +952,7 @@ read_all_code(context_type* context, jclass cb, int num_methods,
             lengths[i] = JVM_GetMethodIxByteCodeLength(context->env, cb, i);
             if (lengths[i] > 0) {
                 code[i] = malloc(sizeof(unsigned char) * (lengths[i] + 1));
    -            check_and_push(context, code[i], VM_MALLOC_BLK);
    +            check_and_push_malloc_block(context, code[i]);
                 JVM_GetMethodIxByteCode(context->env, cb, i, code[i]);
             } else {
                 code[i] = NULL;
    @@ -1305,7 +1306,7 @@ verify_opcode_operands(context_type *context, unsigned int inumber, int offset)
             /* Make sure the constant pool item is the right type. */
             verify_constant_pool_type(context, key, kind);
             methodname = JVM_GetCPMethodNameUTF(env, cb, key);
    -        check_and_push(context, methodname, VM_STRING_UTF);
    +        check_and_push_string_utf(context, methodname);
             is_constructor = !strcmp(methodname, "");
             is_internal = methodname[0] == '<';
             pop_and_free(context);
    @@ -1354,7 +1355,7 @@ verify_opcode_operands(context_type *context, unsigned int inumber, int offset)
                 unsigned int args2;
                 const char *signature =
                     JVM_GetCPMethodSignatureUTF(env, context->class, key);
    -            check_and_push(context, signature, VM_STRING_UTF);
    +            check_and_push_string_utf(context, signature);
                 args1 = signature_to_args_size(signature) + 1;
                 args2 = code[offset + 3];
                 if (args1 != args2) {
    @@ -1652,7 +1653,7 @@ initialize_exception_table(context_type *context)
                 classname = JVM_GetCPClassNameUTF(env,
                                                   context->class,
                                                   einfo.catchType);
    -            check_and_push(context, classname, VM_STRING_UTF);
    +            check_and_push_string_utf(context, classname);
                 stack_item->item = make_class_info_from_name(context, classname);
                 if (!isAssignableTo(context,
                                     stack_item->item,
    @@ -1807,7 +1808,7 @@ initialize_dataflow(context_type *context)
             }
         }
         signature = JVM_GetMethodIxSignatureUTF(env, cb, mi);
    -    check_and_push(context, signature, VM_STRING_UTF);
    +    check_and_push_string_utf(context, signature);
         /* Fill in each of the arguments into the registers. */
         for (p = signature + 1; *p != JVM_SIGNATURE_ENDFUNC; ) {
             char fieldchar = signature_to_fieldtype(context, &p, &full_info);
    @@ -2050,7 +2051,7 @@ pop_stack(context_type *context, unsigned int inumber, stack_info_type *new_stac
                                                context->class,
                                                operand);
                 char *ip = buffer;
    -            check_and_push(context, signature, VM_STRING_UTF);
    +            check_and_push_string_utf(context, signature);
     #ifdef DEBUG
                 if (verify_verbose) {
                     print_formatted_fieldname(context, operand);
    @@ -2076,7 +2077,7 @@ pop_stack(context_type *context, unsigned int inumber, stack_info_type *new_stac
                                                 operand);
                 char *ip = buffer;
                 const char *p;
    -            check_and_push(context, signature, VM_STRING_UTF);
    +            check_and_push_string_utf(context, signature);
     #ifdef DEBUG
                 if (verify_verbose) {
                     print_formatted_methodname(context, operand);
    @@ -2376,7 +2377,7 @@ pop_stack(context_type *context, unsigned int inumber, stack_info_type *new_stac
                                                 operand);
                 int item;
                 const char *p;
    -            check_and_push(context, signature, VM_STRING_UTF);
    +            check_and_push_string_utf(context, signature);
                 if (opcode == JVM_OPC_invokestatic) {
                     item = 0;
                 } else if (opcode == JVM_OPC_invokeinit) {
    @@ -2758,7 +2759,7 @@ push_stack(context_type *context, unsigned int inumber, stack_info_type *new_sta
                 const char *signature = JVM_GetCPFieldSignatureUTF(context->env,
                                                                    context->class,
                                                                    operand);
    -            check_and_push(context, signature, VM_STRING_UTF);
    +            check_and_push_string_utf(context, signature);
     #ifdef DEBUG
                 if (verify_verbose) {
                     print_formatted_fieldname(context, operand);
    @@ -2780,7 +2781,7 @@ push_stack(context_type *context, unsigned int inumber, stack_info_type *new_sta
                                                                     context->class,
                                                                     operand);
                 const char *result_signature;
    -            check_and_push(context, signature, VM_STRING_UTF);
    +            check_and_push_string_utf(context, signature);
                 result_signature = get_result_signature(signature);
                 if (result_signature++ == NULL) {
                     CCerror(context, "Illegal signature %s", signature);
    @@ -3621,7 +3622,7 @@ cp_index_to_class_fullinfo(context_type *context, int cp_index, int kind)
             CCerror(context, "Internal error #5");
         }
     
    -    check_and_push(context, classname, VM_STRING_UTF);
    +    check_and_push_string_utf(context, classname);
         if (classname[0] == JVM_SIGNATURE_ARRAY) {
             /* This make recursively call us, in case of a class array */
             signature_to_fieldtype(context, &classname, &result);
    @@ -3822,8 +3823,8 @@ signature_to_fieldtype(context_type *context,
                     assert(finish >= p);
                     length = (int)(finish - p);
                     if (length + 1 > (int)sizeof(buffer_space)) {
    -                    buffer = calloc(length + 1, sizeof(char));
    -                    check_and_push(context, buffer, VM_MALLOC_BLK);
    +                    buffer = malloc(length + 1);
    +                    check_and_push_malloc_block(context, buffer);
                     }
                     memcpy(buffer, p, length);
                     buffer[length] = '\0';
    @@ -4142,7 +4143,7 @@ static void free_block(void *ptr, int kind)
         }
     }
     
    -static void check_and_push(context_type *context, const void *ptr, int kind)
    +static void check_and_push_common(context_type *context, void *ptr, int kind)
     {
         alloc_stack_type *p;
         if (ptr == 0)
    @@ -4154,16 +4155,24 @@ static void check_and_push(context_type *context, const void *ptr, int kind)
             p = malloc(sizeof(alloc_stack_type));
             if (p == 0) {
                 /* Make sure we clean up. */
    -            free_block((void *)ptr, kind);
    +            free_block(ptr, kind);
                 CCout_of_memory(context);
             }
         }
         p->kind = kind;
    -    p->ptr = (void *)ptr;
    +    p->ptr = ptr;
         p->next = context->allocated_memory;
         context->allocated_memory = p;
     }
     
    +static void check_and_push_malloc_block(context_type *context, void *ptr) {
    +  check_and_push_common(context, ptr, VM_MALLOC_BLK);
    +}
    +
    +static void check_and_push_string_utf(context_type *context, const char *ptr) {
    +  check_and_push_common(context, (void *)ptr, VM_STRING_UTF);
    +}
    +
     static void pop_and_free(context_type *context)
     {
         alloc_stack_type *p = context->allocated_memory;
    diff --git a/src/java.base/share/native/libzip/zlib/ChangeLog b/src/java.base/share/native/libzip/zlib/ChangeLog
    index 30199a65a03daa6cdd55391a041d70fef5f19002..9dbeb5e5642b5f8cf27e0a45934c68f483a4de62 100644
    --- a/src/java.base/share/native/libzip/zlib/ChangeLog
    +++ b/src/java.base/share/native/libzip/zlib/ChangeLog
    @@ -304,7 +304,7 @@ Changes in 1.2.5.1 (10 Sep 2011)
     - Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler]
     - Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt]
     - Add debug records in assmebler code [Londer]
    -- Update RFC references to use http://tools.ietf.org/html/... [Li]
    +- Update RFC references to use https://tools.ietf.org/html/... [Li]
     - Add --archs option, use of libtool to configure for Mac OS X [Borstel]
     
     Changes in 1.2.5 (19 Apr 2010)
    diff --git a/src/java.base/share/native/libzip/zlib/README b/src/java.base/share/native/libzip/zlib/README
    index 51106de4753292ad59de03de9e634e6814eeb7a2..a0d208b770571658e46522c2ca4fa2a6a444f9fd 100644
    --- a/src/java.base/share/native/libzip/zlib/README
    +++ b/src/java.base/share/native/libzip/zlib/README
    @@ -3,7 +3,7 @@ ZLIB DATA COMPRESSION LIBRARY
     zlib 1.2.11 is a general purpose data compression library.  All the code is
     thread safe.  The data format used by the zlib library is described by RFCs
     (Request for Comments) 1950 to 1952 in the files
    -http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
    +https://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
     rfc1952 (gzip format).
     
     All functions of the compression library are documented in the file zlib.h
    diff --git a/src/java.base/share/native/libzip/zlib/deflate.c b/src/java.base/share/native/libzip/zlib/deflate.c
    index f30f71bdd799deb31c34aea462e1ab83b35e9236..f8d84da882aa6c2f1cf976e400e5de34c03e4962 100644
    --- a/src/java.base/share/native/libzip/zlib/deflate.c
    +++ b/src/java.base/share/native/libzip/zlib/deflate.c
    @@ -61,7 +61,7 @@
      *  REFERENCES
      *
      *      Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
    - *      Available in http://tools.ietf.org/html/rfc1951
    + *      Available in https://tools.ietf.org/html/rfc1951
      *
      *      A description of the Rabin and Karp algorithm is given in the book
      *         "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
    diff --git a/src/java.base/share/native/libzip/zlib/zlib.h b/src/java.base/share/native/libzip/zlib/zlib.h
    index e383d0e4508efea891aedf14c5e85cf721e02513..729c77ba165cc2b2401ff26b9c17ec5374313b5b 100644
    --- a/src/java.base/share/native/libzip/zlib/zlib.h
    +++ b/src/java.base/share/native/libzip/zlib/zlib.h
    @@ -48,7 +48,7 @@
     
     
       The data format used by the zlib library is described by RFCs (Request for
    -  Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
    +  Comments) 1950 to 1952 in the files https://tools.ietf.org/html/rfc1950
       (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
     */
     
    diff --git a/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java b/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java
    index 5584aba125b4d71db9e593607dbe2828e22ecd29..6074d323fa576b41a64398137eb4fc5d5afaf2c6 100644
    --- a/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java
    +++ b/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
      * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      *
      * This code is free software; you can redistribute it and/or modify it
    @@ -37,7 +37,7 @@ import java.io.IOException;
      * and Linux.
      */
     
    -public class ResolverConfigurationImpl
    +public final class ResolverConfigurationImpl
         extends ResolverConfiguration
     {
         // Lock helds whilst loading configuration or checking
    diff --git a/src/java.base/windows/classes/sun/net/dns/ResolverConfigurationImpl.java b/src/java.base/windows/classes/sun/net/dns/ResolverConfigurationImpl.java
    index ac7780b072decf4d6c6551867b27815bc878293c..c3cf072007f96a222435681cd5cfa934c404f5e2 100644
    --- a/src/java.base/windows/classes/sun/net/dns/ResolverConfigurationImpl.java
    +++ b/src/java.base/windows/classes/sun/net/dns/ResolverConfigurationImpl.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
      * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      *
      * This code is free software; you can redistribute it and/or modify it
    @@ -33,7 +33,7 @@ import java.util.concurrent.TimeUnit;
      * An implementation of sun.net.ResolverConfiguration for Windows.
      */
     
    -public class ResolverConfigurationImpl
    +public final class ResolverConfigurationImpl
         extends ResolverConfiguration
     {
         // Lock held whilst loading configuration or checking
    diff --git a/src/java.base/windows/native/libjava/HostLocaleProviderAdapter_md.c b/src/java.base/windows/native/libjava/HostLocaleProviderAdapter_md.c
    index 5d5f3ab476e3fdbdff0d931f20d29fdb612cfd9b..ebbad326146d2c14875db3dfcd8b61597cefbf01 100644
    --- a/src/java.base/windows/native/libjava/HostLocaleProviderAdapter_md.c
    +++ b/src/java.base/windows/native/libjava/HostLocaleProviderAdapter_md.c
    @@ -359,18 +359,17 @@ JNIEXPORT jobjectArray JNICALL Java_sun_util_locale_provider_HostLocaleProviderA
     JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getNumberPattern
       (JNIEnv *env, jclass cls, jint numberStyle, jstring jlangtag) {
         const jchar *langtag;
    -    jstring ret;
    +    jstring ret = NULL;
         WCHAR * pattern;
     
         langtag = (*env)->GetStringChars(env, jlangtag, NULL);
         CHECK_NULL_RETURN(langtag, NULL);
         pattern = getNumberPattern(langtag, numberStyle);
    -    CHECK_NULL_RETURN(pattern, NULL);
    -
    +    if (!IS_NULL(pattern)) {
    +        ret = (*env)->NewString(env, pattern, (jsize)wcslen(pattern));
    +        free(pattern);
    +    }
         (*env)->ReleaseStringChars(env, jlangtag, langtag);
    -    ret = (*env)->NewString(env, pattern, (jsize)wcslen(pattern));
    -    free(pattern);
    -
         return ret;
     }
     
    diff --git a/src/java.compiler/share/classes/javax/annotation/processing/Filer.java b/src/java.compiler/share/classes/javax/annotation/processing/Filer.java
    index 59a2681de8dbe89b9a05cae1b91b6fbc36a54849..a66dc011fa7c3ef0a27dd3072ac2f3c92bb5b9cc 100644
    --- a/src/java.compiler/share/classes/javax/annotation/processing/Filer.java
    +++ b/src/java.compiler/share/classes/javax/annotation/processing/Filer.java
    @@ -135,6 +135,9 @@ import java.io.IOException;
      * @since 1.6
      */
     public interface Filer {
    +    // Maintenance note: if the ability to create module-info files
    +    // through the Filer is added, add link to this method from
    +    // ModuleElement interface-level discussion.
         /**
          * Creates a new source file and returns an object to allow
          * writing to it. A source file for a class, interface, or a
    @@ -217,6 +220,9 @@ public interface Filer {
         JavaFileObject createSourceFile(CharSequence name,
                                         Element... originatingElements) throws IOException;
     
    +    // Maintenance note: if the ability to create module-info files
    +    // through the Filer is added, add link to this method from
    +    // ModuleElement interface-level discussion.
         /**
          * Creates a new class file, and returns an object to allow
          * writing to it. A class file for a class, interface, or a package can
    diff --git a/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java b/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java
    index 31b9dbd6325619a3e7ef8ddf864989791daeff94..8b4628ecef5d186865266f4f0397d894a1e33f66 100644
    --- a/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java
    +++ b/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
      * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      *
      * This code is free software; you can redistribute it and/or modify it
    @@ -32,6 +32,25 @@ import javax.lang.model.type.TypeMirror;
      * Represents a module program element.  Provides access to
      * information about the module, its directives, and its members.
      *
    + * @apiNote
    + * The represented module may have an explicit {@linkplain
    + * javax.lang.model.util.Elements#getFileObjectOf(Element) reference
    + * representation} (either source code or executable output) or may be
    + * created from implicit information. The explicit and standalone
    + * source code construct for a module is typically a {@code
    + * module-info.java} file (JLS {@jls 7.7}). {@linkplain
    + * javax.lang.model.util.Elements#isAutomaticModule(ModuleElement)
    + * Automatic modules} (JLS {@jls 7.7.1}) are named modules that do
    + * not have a {@code module-info} file. Implicit information
    + * is used to model {@linkplain #isUnnamed unnamed modules}.
    + * 

    In the context of annotation processing, a module element can + * be: + *

      + *
    • created from the initial inputs to a run of the tool + *
    • {@linkplain javax.lang.model.util.Elements#getModuleElement(CharSequence) + * queried for} in the configured environment + *
    + * * @see javax.lang.model.util.Elements#getModuleOf * @since 9 * @jls 7.7 Module Declarations diff --git a/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java b/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java index f16daca0b0605f8b488a9a685ce6071f30d3ad29..348f851fb307ad395beeb43bbf27bb5472a636b3 100644 --- a/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java +++ b/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java @@ -32,6 +32,31 @@ import javax.lang.model.type.TypeMirror; * Represents a package program element. Provides access to information * about the package and its members. * + * @apiNote + * The represented package may have an explicit {@linkplain + * javax.lang.model.util.Elements#getFileObjectOf(Element) reference + * representation} (either source code or executable output) or may be + * created from implicit information. The explicit and standalone + * source code construct for a package is typically a {@code + * package-info.java} file (JLS {@jls 7.4.1}). A named package + * without a standalone {@code package-info.java} file can be declared + * in the package declaration of a {@linkplain NestingKind#TOP_LEVEL + * top-level} class or interface. Implicit information is used to + * model {@linkplain #isUnnamed unnamed packages} (JLS {@jls 7.4.2}). + *

    In the context of annotation processing, a package element can + * be: + *

      + *
    • created from the initial inputs to a run of the tool + *
    • created from {@linkplain + * javax.annotation.processing.Filer#createSourceFile(CharSequence, + * Element...) source code} or {@linkplain + * javax.annotation.processing.Filer#createClassFile(CharSequence, + * Element...) class files} written by a processor + *
    • {@linkplain + * javax.lang.model.util.Elements#getAllPackageElements(CharSequence) + * queried for} in the configured environment + *
    + * * @see javax.lang.model.util.Elements#getPackageOf * @since 1.6 */ diff --git a/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java b/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java index 4f2caafdfe8e71f84072c680ff3cb4f382cda4a0..63c0b8547a295b6ec48ee143768bcd175866ea77 100644 --- a/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java +++ b/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java @@ -53,6 +53,33 @@ import javax.lang.model.util.*; * source of information is Java source code, then the elements will be * returned in source code order. * + * @apiNote + * The represented class or interface may have a {@linkplain + * javax.lang.model.util.Elements#getFileObjectOf(Element) reference + * representation} (either source code or executable output). Multiple + * classes and interfaces can share the same reference representation + * backing construct. For example, multiple classes and interface can + * be declared in the same source file, including, but are not limited + * to: + *
      + *
    • a {@linkplain NestingKind#TOP_LEVEL top-level} class or + * interface and auxiliary classes and interfaces + *
    • a top-level class or interface and {@linkplain + * NestingKind#isNested() nested class and interfaces} within it + *
    + *

    In the context of annotation processing, a type element can + * be: + *

      + *
    • created from the initial inputs to a run of the tool + *
    • created from {@linkplain + * javax.annotation.processing.Filer#createSourceFile(CharSequence, + * Element...) source code} or {@linkplain + * javax.annotation.processing.Filer#createClassFile(CharSequence, + * Element...) class files} written by a processor + *
    • {@linkplain + * javax.lang.model.util.Elements#getAllTypeElements(CharSequence) + * queried for} in the configured environment + *
    * @see DeclaredType * @since 1.6 */ diff --git a/src/java.compiler/share/classes/javax/lang/model/element/package-info.java b/src/java.compiler/share/classes/javax/lang/model/element/package-info.java index aee2b235e79f41f86d01aaeb3dd95b65430d3324..bb4839944e1d924f6552a4d7eee2b1b3607783d8 100644 --- a/src/java.compiler/share/classes/javax/lang/model/element/package-info.java +++ b/src/java.compiler/share/classes/javax/lang/model/element/package-info.java @@ -63,7 +63,8 @@ *
      *
    • {@code strictfp} on a class or interface *
    • {@code final} on a parameter - *
    • {@code protected}, {@code private}, and {@code static} on classes and interfaces + *
    • {@code protected}, {@code private}, and {@code static} on + * classes and interfaces *
    * * Some elements which are {@linkplain @@ -86,19 +87,20 @@ * code is not syntactically well-formed or has some other * irrecoverable error that could not be removed by the generation of * new classes or interfaces, a model may or may not be provided as a - * quality of implementation issue. If a program is syntactically - * valid but erroneous in some other fashion, any returned model must - * have no less information than if all the method bodies in the - * program were replaced by {@code "throw new RuntimeException();"}. - * If a program refers to a missing class or interface Xyz, the - * returned model must contain no less information than if the - * declaration of class or interface Xyz were assumed to be {@code - * "class Xyz {}"}, {@code "interface Xyz {}"}, {@code "enum Xyz {}"}, - * {@code "@interface Xyz {}"}, or {@code "record Xyz {}"}. If a - * program refers to a missing class or interface {@code Xyz}, the returned model must contain no less information than - * if the declaration of Xyz were assumed to be {@code "class Xyz {}"} or {@code "interface Xyz {}"} + * quality of implementation issue. If a program for a class or + * interface is syntactically valid but erroneous in some other + * fashion, any returned model must have no less information than if + * all the method bodies in the program were replaced by {@code "throw + * new RuntimeException();"}. If a program refers to a missing class + * or interface Xyz, the returned model must contain no less + * information than if the declaration of class or interface Xyz were + * assumed to be {@code "class Xyz {}"}, {@code "interface Xyz {}"}, + * {@code "enum Xyz {}"}, {@code "@interface Xyz {}"}, or {@code + * "record Xyz {}"}. If a program refers to a missing class or + * interface {@code Xyz}, the returned model must contain + * no less information than if the declaration of Xyz were assumed to + * be {@code "class Xyz {}"} or {@code "interface Xyz {}"} * *

    Unless otherwise specified in a particular implementation, the * collections returned by methods in this package should be expected diff --git a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner14.java b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner14.java index ac1bc4976cac1ffdff4f543d04c1c18769c2d399..4365c6df53ca387a26d7efa71ba7b05510538182 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner14.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner14.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. * 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,15 +37,16 @@ import static javax.lang.model.SourceVersion.*; * appropriate for the {@link SourceVersion#RELEASE_14 RELEASE_14} * source version. * - * The visitXyz methods in this - * class scan their component elements by calling {@code scan} on - * their {@linkplain Element#getEnclosedElements enclosed elements}, - * {@linkplain ExecutableElement#getParameters parameters}, etc., as - * indicated in the individual method specifications. A subclass can - * control the order elements are visited by overriding the - * visitXyz methods. Note that clients of a scanner - * may get the desired behavior be invoking {@code v.scan(e, p)} rather - * than {@code v.visit(e, p)} on the root objects of interest. + * The visitXyz methods in this class scan their + * component elements by calling {@link ElementScanner6#scan(Element, + * Object) scan} on their {@linkplain Element#getEnclosedElements + * enclosed elements}, {@linkplain ExecutableElement#getParameters + * parameters}, etc., as indicated in the individual method + * specifications. A subclass can control the order elements are + * visited by overriding the visitXyz methods. + * Note that clients of a scanner may get the desired behavior by + * invoking {@code v.scan(e, p)} rather than {@code v.visit(e, p)} on + * the root objects of interest. * *

    When a subclass overrides a visitXyz method, the * new method can cause the enclosed elements to be scanned in the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner6.java b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner6.java index b13bd3cd0cc7c387096da22c3ecc6b6784f80be3..c2b628b033c2c8d6dde434531191a6994d46b334 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner6.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner6.java @@ -35,14 +35,16 @@ import static javax.lang.model.SourceVersion.*; * A scanning visitor of program elements with default behavior * appropriate for the {@link SourceVersion#RELEASE_6 RELEASE_6} * source version. The visitXyz methods in this - * class scan their component elements by calling {@code scan} on - * their {@linkplain Element#getEnclosedElements enclosed elements}, - * {@linkplain ExecutableElement#getParameters parameters}, etc., as - * indicated in the individual method specifications. A subclass can - * control the order elements are visited by overriding the - * visitXyz methods. Note that clients of a scanner - * may get the desired behavior be invoking {@code v.scan(e, p)} rather - * than {@code v.visit(e, p)} on the root objects of interest. + * class scan their component elements by calling {@link + * #scan(Element, P) scan} on their {@linkplain + * Element#getEnclosedElements enclosed elements}, {@linkplain + * ExecutableElement#getParameters parameters}, etc., as indicated in + * the individual method specifications. A subclass can control the + * order elements are visited by overriding the + * visitXyz methods. Note that clients of a + * scanner may get the desired behavior by invoking {@code v.scan(e, + * p)} rather than {@code v.visit(e, p)} on the root objects of + * interest. * *

    When a subclass overrides a visitXyz method, the * new method can cause the enclosed elements to be scanned in the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner7.java b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner7.java index e79af27dacf617cd5b8f3ce723153b13bc201c68..73e286cea55602ce24449f9edb40d397f9d5c855 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner7.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner7.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. * 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,14 +35,16 @@ import static javax.lang.model.SourceVersion.*; * A scanning visitor of program elements with default behavior * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7} * source version. The visitXyz methods in this - * class scan their component elements by calling {@code scan} on - * their {@linkplain Element#getEnclosedElements enclosed elements}, - * {@linkplain ExecutableElement#getParameters parameters}, etc., as - * indicated in the individual method specifications. A subclass can - * control the order elements are visited by overriding the - * visitXyz methods. Note that clients of a scanner - * may get the desired behavior be invoking {@code v.scan(e, p)} rather - * than {@code v.visit(e, p)} on the root objects of interest. + * class scan their component elements by calling {@link + * ElementScanner6#scan(Element, Object) scan} on their {@linkplain + * Element#getEnclosedElements enclosed elements}, {@linkplain + * ExecutableElement#getParameters parameters}, etc., as indicated in + * the individual method specifications. A subclass can control the + * order elements are visited by overriding the + * visitXyz methods. Note that clients of a + * scanner may get the desired behavior by invoking {@code v.scan(e, + * p)} rather than {@code v.visit(e, p)} on the root objects of + * interest. * *

    When a subclass overrides a visitXyz method, the * new method can cause the enclosed elements to be scanned in the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner8.java b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner8.java index 229ab1a512ce12ae8c426ec94122d01568140b66..db3ee069d4b78f785febf3eae62f761e442fa0c9 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner8.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner8.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. * 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,14 +35,16 @@ import static javax.lang.model.SourceVersion.*; * A scanning visitor of program elements with default behavior * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8} * source version. The visitXyz methods in this - * class scan their component elements by calling {@code scan} on - * their {@linkplain Element#getEnclosedElements enclosed elements}, - * {@linkplain ExecutableElement#getParameters parameters}, etc., as - * indicated in the individual method specifications. A subclass can - * control the order elements are visited by overriding the - * visitXyz methods. Note that clients of a scanner - * may get the desired behavior be invoking {@code v.scan(e, p)} rather - * than {@code v.visit(e, p)} on the root objects of interest. + * class scan their component elements by calling {@link + * ElementScanner6#scan(Element, Object) scan} on their {@linkplain + * Element#getEnclosedElements enclosed elements}, {@linkplain + * ExecutableElement#getParameters parameters}, etc., as indicated in + * the individual method specifications. A subclass can control the + * order elements are visited by overriding the + * visitXyz methods. Note that clients of a + * scanner may get the desired behavior by invoking {@code v.scan(e, + * p)} rather than {@code v.visit(e, p)} on the root objects of + * interest. * *

    When a subclass overrides a visitXyz method, the * new method can cause the enclosed elements to be scanned in the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java index b36235afd2a0dff8bf38c893303e3e7dd7ed9da1..3ee290d70cf975535546e773895a6e74339f2d23 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. * 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,15 +36,16 @@ import static javax.lang.model.SourceVersion.*; * appropriate for source versions {@link SourceVersion#RELEASE_9 * RELEASE_9} through {@link SourceVersion#RELEASE_14 RELEASE_14}. * - * The visitXyz methods in this - * class scan their component elements by calling {@code scan} on - * their {@linkplain Element#getEnclosedElements enclosed elements}, - * {@linkplain ExecutableElement#getParameters parameters}, etc., as - * indicated in the individual method specifications. A subclass can - * control the order elements are visited by overriding the - * visitXyz methods. Note that clients of a scanner - * may get the desired behavior be invoking {@code v.scan(e, p)} rather - * than {@code v.visit(e, p)} on the root objects of interest. + * The visitXyz methods in this class scan their + * component elements by calling {@link ElementScanner6#scan(Element, + * Object) scan} on their {@linkplain Element#getEnclosedElements + * enclosed elements}, {@linkplain ExecutableElement#getParameters + * parameters}, etc., as indicated in the individual method + * specifications. A subclass can control the order elements are + * visited by overriding the visitXyz methods. + * Note that clients of a scanner may get the desired behavior by + * invoking {@code v.scan(e, p)} rather than {@code v.visit(e, p)} on + * the root objects of interest. * *

    When a subclass overrides a visitXyz method, the * new method can cause the enclosed elements to be scanned in the diff --git a/make/data/fontconfig/aix.fontconfig.properties b/src/java.desktop/aix/data/fontconfig/fontconfig.properties similarity index 100% rename from make/data/fontconfig/aix.fontconfig.properties rename to src/java.desktop/aix/data/fontconfig/fontconfig.properties diff --git a/make/data/fontconfig/bsd.fontconfig.properties b/src/java.desktop/bsd/data/fontconfig/fontconfig.properties similarity index 100% rename from make/data/fontconfig/bsd.fontconfig.properties rename to src/java.desktop/bsd/data/fontconfig/fontconfig.properties diff --git a/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties b/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties index 83105561c305a2345652bb9064ed200a247984ab..f4cb1f4d2b48a8e4f47e59a16d1a32a73a55d625 100644 --- a/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties +++ b/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -59,7 +59,7 @@ FileChooser.fileSizeGigaBytes={0} GB FileChooser.saveTitle.textAndMnemonic=Speichern FileChooser.openTitle.textAndMnemonic=\u00D6ffnen FileChooser.newFolderExistsError.textAndMnemonic=Dieser Name ist bereits vergeben -FileChooser.chooseButton.textAndMnemonic=W\u00E4hlen +FileChooser.chooseButton.textAndMnemonic=Ausw\u00E4hlen FileChooser.newFolderButton.textAndMnemonic=Neuer Ordner FileChooser.newFolderTitle.textAndMnemonic=Neuer Ordner diff --git a/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java b/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java index 1796f5f3005b36d97f06f44b9fe8d823b73f0680..7f1528e84fdc99ef1177effab798a74e5fc88eae 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,6 +59,7 @@ import java.awt.peer.KeyboardFocusManagerPeer; import java.awt.peer.WindowPeer; import java.util.List; +import java.util.Objects; import javax.swing.JComponent; import sun.awt.AWTAccessor; @@ -281,6 +282,16 @@ public class LWWindowPeer super.disposeImpl(); } + @Override + public void setBackground(final Color c) { + Color oldBg = getBackground(); + if (Objects.equals(oldBg, c)) { + return; + } + super.setBackground(c); + updateOpaque(); + } + @Override protected void setVisibleImpl(final boolean visible) { if (!visible && warningWindow != null) { diff --git a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java index f338f25f05ed8d4d6a75582b7e4aa60b93ed06cf..efc6968150bbdfb2fca12c50d4904213dbd6535e 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java @@ -28,6 +28,7 @@ package sun.lwawt.macosx; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; +import java.awt.IllegalComponentStateException; import java.awt.KeyboardFocusManager; import java.awt.Point; import java.awt.Window; @@ -469,7 +470,16 @@ class CAccessibility implements PropertyChangeListener { public static Accessible accessibilityHitTest(final Container parent, final float hitPointX, final float hitPointY) { return invokeAndWait(new Callable() { public Accessible call() throws Exception { - final Point p = parent.getLocationOnScreen(); + if (parent == null) { + return null; + } + + final Point p; + try { + p = parent.getLocationOnScreen(); + } catch (IllegalComponentStateException ice) { + return null; + } // Make it into local coords final Point localPoint = new Point((int)(hitPointX - p.getX()), (int)(hitPointY - p.getY())); diff --git a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java index d983635f9e9d7f9131ce0fe11d4d127dba9acb64..3e9b32d8efe9261351bb7f7c25106067cf7c61f9 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java @@ -172,7 +172,8 @@ class CAccessible extends CFRetainedResource implements Accessible { ((AccessibleState)oldValue) == AccessibleState.VISIBLE ) { menuClosed(ptr); } - } else if (thisRole == AccessibleRole.MENU_ITEM) { + } else if (thisRole == AccessibleRole.MENU_ITEM || + (thisRole == AccessibleRole.MENU)) { if ( newValue != null && ((AccessibleState)newValue) == AccessibleState.FOCUSED ) { menuItemSelected(ptr); @@ -200,7 +201,6 @@ class CAccessible extends CFRetainedResource implements Accessible { } } - static Accessible getSwingAccessible(final Accessible a) { return (a instanceof CAccessible) ? ((CAccessible)a).accessible : a; } diff --git a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java index 6a8076ee118130661daad5284cfadea07e76d7dc..8570ecaa97a8e10187eeccef09437921ad1f00fb 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,6 @@ import sun.awt.CGraphicsDevice; import sun.java2d.SurfaceData; import sun.java2d.metal.MTLLayer; import sun.java2d.opengl.CGLLayer; -import sun.lwawt.macosx.CFLayer; import sun.lwawt.LWWindowPeer; import sun.lwawt.PlatformWindow; import sun.util.logging.PlatformLogger; @@ -199,7 +198,7 @@ public class CPlatformEmbeddedFrame implements PlatformWindow { /* * The method could not be implemented due to CALayer restrictions. - * The exeption enforce clients not to use it. + * The exception enforces clients not to use it. */ @Override public boolean isUnderMouse() { diff --git a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTextPipe.java b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTextPipe.java index f4dcc7ec675353aafc8464b44464b8ca7886d0e3..6aa36453ac0f9a6124dadf314689cdeab4c7cf12 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTextPipe.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CTextPipe.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -81,10 +81,57 @@ public class CTextPipe implements TextPipe { } } - public void drawGlyphVector(final SunGraphics2D sg2d, final GlyphVector gV, final float x, final float y) { - final Font prevFont = sg2d.getFont(); - sg2d.setFont(gV.getFont()); + private boolean hasSlotData(GlyphVector gv) { + final int length = gv.getNumGlyphs(); + for (int i = 0; i < length; i++) { + if ((gv.getGlyphCode(i) & CompositeGlyphMapper.SLOTMASK) != 0) { + return true; + } + } + return false; + } + + private Font getSlotFont(Font font, int slot) { + Font2D f2d = FontUtilities.getFont2D(font); + if (f2d instanceof CFont) { + CompositeFont cf = ((CFont)f2d).getCompositeFont2D(); + PhysicalFont pf = cf.getSlotFont(slot); + Font f = new Font(pf.getFontName(null), + font.getStyle(), font.getSize()); + return f; + } + return null; + } + + private GlyphVector getGlyphVectorWithRange(final Font font, final GlyphVector gV, int start, int count) { + int[] glyphs = new int[count]; + for (int i = 0; i < count; i++) { + glyphs[i] = gV.getGlyphCode(start+i) & CompositeGlyphMapper.GLYPHMASK; + } + // Positions should be null to recalculate by native methods, + // if GV was segmented. + StandardGlyphVector sgv = new StandardGlyphVector(font, + gV.getFontRenderContext(), + glyphs, + null, // positions + null, // indices + gV.getLayoutFlags()); + return sgv; + } + + private int getLengthOfSameSlot(final GlyphVector gV, final int targetSlot, final int start, final int length) { + int count = 1; + for (; start + count < length; count++) { + int slot = (gV.getGlyphCode(start + count) & + CompositeGlyphMapper.SLOTMASK) >> 24; + if (targetSlot != slot) { + break; + } + } + return count; + } + private void drawGlyphVectorImpl(final SunGraphics2D sg2d, final GlyphVector gV, final float x, final float y) { final long nativeStrikePtr = getNativeStrikePtr(sg2d); if (OSXSurfaceData.IsSimpleColor(sg2d.paint) && nativeStrikePtr != 0) { final OSXSurfaceData surfaceData = (OSXSurfaceData)sg2d.getSurfaceData(); @@ -92,6 +139,31 @@ public class CTextPipe implements TextPipe { } else { drawGlyphVectorAsShape(sg2d, gV, x, y); } + } + + public void drawGlyphVector(final SunGraphics2D sg2d, final GlyphVector gV, final float x, final float y) { + final Font prevFont = sg2d.getFont(); + sg2d.setFont(gV.getFont()); + + if (hasSlotData(gV)) { + final int length = gV.getNumGlyphs(); + float[] positions = gV.getGlyphPositions(0, length, null); + int start = 0; + while (start < length) { + int slot = (gV.getGlyphCode(start) & + CompositeGlyphMapper.SLOTMASK) >> 24; + sg2d.setFont(getSlotFont(gV.getFont(), slot)); + int count = getLengthOfSameSlot(gV, slot, start, length); + GlyphVector rangeGV = getGlyphVectorWithRange(sg2d.getFont(), + gV, start, count); + drawGlyphVectorImpl(sg2d, rangeGV, + x + positions[start * 2], + y + positions[start * 2 + 1]); + start += count; + } + } else { + drawGlyphVectorImpl(sg2d, gV, x, y); + } sg2d.setFont(prevFont); } diff --git a/make/data/fontconfig/macosx.fontconfig.properties b/src/java.desktop/macosx/data/fontconfig/fontconfig.properties similarity index 100% rename from make/data/fontconfig/macosx.fontconfig.properties rename to src/java.desktop/macosx/data/fontconfig/fontconfig.properties diff --git a/make/data/macosxicons/JavaApp.icns b/src/java.desktop/macosx/data/macosxicons/JavaApp.icns similarity index 100% rename from make/data/macosxicons/JavaApp.icns rename to src/java.desktop/macosx/data/macosxicons/JavaApp.icns diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m index d53d0350abf31c391e25a54e7088bef9fe4d5602..f84feb4c93d96801b71cb7b5179588137bfc954b 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m @@ -126,7 +126,7 @@ static jobject sAccessibilityClass = NULL; /* * Here we should keep all the mapping between the accessibility roles and implementing classes */ - rolesMap = [[NSMutableDictionary alloc] initWithCapacity:51]; + rolesMap = [[NSMutableDictionary alloc] initWithCapacity:50]; [rolesMap setObject:@"ButtonAccessibility" forKey:@"pushbutton"]; [rolesMap setObject:@"ImageAccessibility" forKey:@"icon"]; @@ -158,7 +158,6 @@ static jobject sAccessibilityClass = NULL; [rolesMap setObject:@"TableAccessibility" forKey:@"table"]; [rolesMap setObject:@"MenuBarAccessibility" forKey:@"menubar"]; [rolesMap setObject:@"MenuAccessibility" forKey:@"menu"]; - [rolesMap setObject:@"MenuItemAccessibility" forKey:@"menuitem"]; [rolesMap setObject:@"MenuAccessibility" forKey:@"popupmenu"]; [rolesMap setObject:@"ProgressIndicatorAccessibility" forKey:@"progressbar"]; @@ -186,7 +185,8 @@ static jobject sAccessibilityClass = NULL; [rolesMap setObject:IgnoreClassName forKey:@"viewport"]; [rolesMap setObject:IgnoreClassName forKey:@"window"]; - rowRolesMapForParent = [[NSMutableDictionary alloc] initWithCapacity:2]; + rowRolesMapForParent = [[NSMutableDictionary alloc] initWithCapacity:3]; + [rowRolesMapForParent setObject:@"MenuItemAccessibility" forKey:@"MenuAccessibility"]; [rowRolesMapForParent setObject:@"ListRowAccessibility" forKey:@"ListAccessibility"]; [rowRolesMapForParent setObject:@"OutlineRowAccessibility" forKey:@"OutlineAccessibility"]; diff --git a/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties b/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties index 78c95becd1ad681a60dcd3065f525ca74b77b05f..a58b033abe3afbbe3e2b3fa33a3f30640b6fce6a 100644 --- a/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties +++ b/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties @@ -91,7 +91,7 @@ window=Fenster # accessible relations # labelFor=Label f\u00FCr -labeledBy=beschriftet von +labeledBy=gelabelt von memberOf=Mitglied von controlledBy=controlledBy controllerFor=controllerFor diff --git a/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java b/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java index 2e1c2db03ca84d64cdaa2c2abb00dabffeb1edb9..81baefe81559d04c9bf3a150999c4c7d498356c3 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java +++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java @@ -254,11 +254,11 @@ public class BMPImageReader extends ImageReader implements BMPConstants { /** * Process the image header. * - * @exception IllegalStateException if source stream is not set. + * @throws IllegalStateException if source stream is not set. * - * @exception IOException if image stream is corrupted. + * @throws IOException if image stream is corrupted. * - * @exception IllegalArgumentException if the image stream does not contain + * @throws IllegalArgumentException if the image stream does not contain * a BMP image, or if a sample model instance to describe the * image can not be created. */ diff --git a/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java b/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java index b6f73efc712c4dfb455e73dbbd447fdbee32c96d..a62008dfbd46cd6f8ef810e7d97bf2565e8fc48e 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java +++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java @@ -38,7 +38,7 @@ public class BogusColorSpace extends ColorSpace { * * @param numComponents The number of components in the * {@code ColorSpace}. - * @exception IllegalArgumentException if {@code numComponents} + * @throws IllegalArgumentException if {@code numComponents} * is less than 1. */ private static int getType(int numComponents) { @@ -66,7 +66,7 @@ public class BogusColorSpace extends ColorSpace { * * @param numComponents The number of components in the * {@code ColorSpace}. - * @exception IllegalArgumentException if {@code numComponents} + * @throws IllegalArgumentException if {@code numComponents} * is less than 1. */ public BogusColorSpace(int numComponents) { diff --git a/src/java.desktop/share/classes/com/sun/imageio/plugins/common/LZWCompressor.java b/src/java.desktop/share/classes/com/sun/imageio/plugins/common/LZWCompressor.java index 0177848ad80f755058df0f81ba1f8bf7c204b5f3..52f66f5eafaaed481a6eee2405cbfa1857b61f59 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/plugins/common/LZWCompressor.java +++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/common/LZWCompressor.java @@ -65,7 +65,7 @@ public class LZWCompressor { * @param out destination for compressed data * @param codeSize the initial code size for the LZW compressor * @param TIFF flag indicating that TIFF lzw fudge needs to be applied - * @exception IOException if underlying output stream error + * @throws IOException if underlying output stream error **/ public LZWCompressor(ImageOutputStream out, int codeSize, boolean TIFF) throws IOException @@ -90,7 +90,7 @@ public class LZWCompressor { /** * @param buf data to be compressed to output stream - * @exception IOException if underlying output stream error + * @throws IOException if underlying output stream error **/ public void compress(byte[] buf, int offset, int length) throws IOException @@ -129,7 +129,7 @@ public class LZWCompressor { * Indicate to compressor that no more data to go so write out * any remaining buffered data. * - * @exception IOException if underlying output stream error + * @throws IOException if underlying output stream error */ public void flush() throws IOException { if (prefix != -1) { diff --git a/src/java.desktop/share/classes/com/sun/imageio/plugins/common/PaletteBuilder.java b/src/java.desktop/share/classes/com/sun/imageio/plugins/common/PaletteBuilder.java index b4541d5c66294cbd94d949d4dc0d1686a97c3352..00d2dde0e889becd71f3a04de759e6043adb3a12 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/plugins/common/PaletteBuilder.java +++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/common/PaletteBuilder.java @@ -77,10 +77,10 @@ public class PaletteBuilder { * Result image then is an approximation constructed by octree * quantization method. * - * @exception IllegalArgumentException if {@code src} is + * @throws IllegalArgumentException if {@code src} is * {@code null}. * - * @exception UnsupportedOperationException if implemented method + * @throws UnsupportedOperationException if implemented method * is unable to create approximation of {@code src} * and {@code canCreatePalette} returns {@code false}. * @@ -98,10 +98,10 @@ public class PaletteBuilder { * {@code img}. If number of colors in the given image exceeds * maximum palette size closest colors would be merged. * - * @exception IllegalArgumentException if {@code img} is + * @throws IllegalArgumentException if {@code img} is * {@code null}. * - * @exception UnsupportedOperationException if implemented method + * @throws UnsupportedOperationException if implemented method * is unable to create approximation of {@code img} * and {@code canCreatePalette} returns {@code false}. * @@ -124,7 +124,7 @@ public class PaletteBuilder { * @return {@code true} if the {@code PaletteBuilder} * is likely to be able to create palette for this image type. * - * @exception IllegalArgumentException if {@code type} + * @throws IllegalArgumentException if {@code type} * is {@code null}. */ public static boolean canCreatePalette(ImageTypeSpecifier type) { @@ -144,7 +144,7 @@ public class PaletteBuilder { * @return {@code true} if the {@code PaletteBuilder} * is likely to be able to create palette for this image type. * - * @exception IllegalArgumentException if {@code image} + * @throws IllegalArgumentException if {@code image} * is {@code null}. */ public static boolean canCreatePalette(RenderedImage image) { diff --git a/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleCMYKColorSpace.java b/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleCMYKColorSpace.java index 75586561598ad0cb7048647f6565df7867036640..a5c283e6c9c627d33c9f3fce29f18cd8a9877097 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleCMYKColorSpace.java +++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleCMYKColorSpace.java @@ -63,7 +63,7 @@ public final class SimpleCMYKColorSpace extends ColorSpace { } public int hashCode() { - return theInstance.hashCode(); + return System.identityHashCode(theInstance); } public float[] toRGB(float[] colorvalue) { diff --git a/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java b/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java index a7edf73cb80b6cbb4e518ea9150dac18ac62dedc..e18397774808595f7aaf5712b9ae161e743ebd89 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java +++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java @@ -35,6 +35,7 @@ import javax.imageio.stream.ImageInputStream; import javax.imageio.plugins.jpeg.JPEGImageReadParam; import javax.imageio.plugins.jpeg.JPEGQTable; import javax.imageio.plugins.jpeg.JPEGHuffmanTable; +import com.sun.imageio.plugins.common.SimpleCMYKColorSpace; import java.awt.Point; import java.awt.Rectangle; @@ -164,6 +165,12 @@ public class JPEGImageReader extends ImageReader { /** If we need to post-convert in Java, convert with this op */ private ColorConvertOp convert = null; + /** If reading CMYK as an Image, flip the bytes */ + private boolean invertCMYK = false; + + /** Whether to read as a raster */ + private boolean readAsRaster = false; + /** The image we are going to fill */ private BufferedImage image = null; @@ -487,9 +494,9 @@ public class JPEGImageReader extends ImageReader { /** * Sets the input stream to the start of the requested image. *

    -     * @exception IllegalStateException if the input source has not been
    +     * @throws IllegalStateException if the input source has not been
          * set.
    -     * @exception IndexOutOfBoundsException if the supplied index is
    +     * @throws IndexOutOfBoundsException if the supplied index is
          * out of bounds.
          * 
    */ @@ -938,6 +945,32 @@ public class JPEGImageReader extends ImageReader { ArrayList list = new ArrayList(1); switch (colorSpaceCode) { + case JPEG.JCS_YCCK: + case JPEG.JCS_CMYK: + // There's no standard CMYK ColorSpace in JDK so raw.getType() + // will return null so skip that. + // And we can't add RGB because the number of bands is different. + // So need to create our own special that is 4 channels and uses + // the iccCS ColorSpace based on profile data in the image, and + // if there is none, on the internal CMYKColorSpace class + if (iccCS == null) { + iccCS = SimpleCMYKColorSpace.getInstance(); + } + if (iccCS != null) { + list.add(new ImageTypeProducer(colorSpaceCode) { + @Override + protected ImageTypeSpecifier produce() { + int [] bands = {0, 1, 2, 3}; + return ImageTypeSpecifier.createInterleaved + (iccCS, + bands, + DataBuffer.TYPE_BYTE, + false, + false); + } + }); + } + break; case JPEG.JCS_GRAYSCALE: list.add(raw); list.add(getImageType(JPEG.JCS_RGB)); @@ -1019,6 +1052,8 @@ public class JPEGImageReader extends ImageReader { int csType = cs.getType(); convert = null; switch (outColorSpaceCode) { + case JPEG.JCS_CMYK: // Its CMYK in the file + break; case JPEG.JCS_GRAYSCALE: // Its gray in the file if (csType == ColorSpace.TYPE_RGB) { // We want RGB // IJG can do this for us more efficiently @@ -1144,6 +1179,8 @@ public class JPEGImageReader extends ImageReader { private Raster readInternal(int imageIndex, ImageReadParam param, boolean wantRaster) throws IOException { + + readAsRaster = wantRaster; readHeader(imageIndex, false); WritableRaster imRas = null; @@ -1186,6 +1223,16 @@ public class JPEGImageReader extends ImageReader { image = null; } + // Adobe seems to have decided that the bytes in CMYK JPEGs + // should be stored inverted. So we need some extra logic to + // flip them in that case. Don't flip for the raster case + // so code that is reading these as rasters today won't + // see a change in behaviour. + invertCMYK = + (!wantRaster && + ((colorSpaceCode == JPEG.JCS_YCCK) || + (colorSpaceCode == JPEG.JCS_CMYK))); + // Create an intermediate 1-line Raster that will hold the decoded, // subsampled, clipped, band-selected image data in a single // byte-interleaved buffer. The above transformations @@ -1363,6 +1410,21 @@ public class JPEGImageReader extends ImageReader { * After the copy, we notify update listeners. */ private void acceptPixels(int y, boolean progressive) { + + /* + * CMYK JPEGs seems to be universally inverted at the byte level. + * Fix this here before storing. + * For "compatibility" don't do this if the target is a raster. + * Need to do this here in case the application is listening + * for line-by-line updates to the image. + */ + if (invertCMYK) { + byte[] data = ((DataBufferByte)raster.getDataBuffer()).getData(); + for (int i = 0, len = data.length; i < len; i++) { + data[i] = (byte)(0x0ff - (data[i] & 0xff)); + } + } + if (convert != null) { convert.filter(raster, raster); } diff --git a/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java b/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java index 31acae628a14e895a17c426e471a0c1a0783b725..fcce8f60495da319eb438bcbb57dacf3caae5966 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java +++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java @@ -131,6 +131,7 @@ public class JPEGImageWriter extends ImageWriter { private int newAdobeTransform = JPEG.ADOBE_IMPOSSIBLE; // Change if needed private boolean writeDefaultJFIF = false; private boolean writeAdobe = false; + private boolean invertCMYK = false; private JPEGMetadata metadata = null; private boolean sequencePrepared = false; @@ -654,6 +655,7 @@ public class JPEGImageWriter extends ImageWriter { newAdobeTransform = JPEG.ADOBE_IMPOSSIBLE; // Change if needed writeDefaultJFIF = false; writeAdobe = false; + invertCMYK = false; // By default we'll do no conversion: int inCsType = JPEG.JCS_UNKNOWN; @@ -807,6 +809,14 @@ public class JPEGImageWriter extends ImageWriter { } } break; + case ColorSpace.TYPE_CMYK: + outCsType = JPEG.JCS_CMYK; + if (jfif != null) { + ignoreJFIF = true; + warningOccurred + (WARNING_IMAGE_METADATA_JFIF_MISMATCH); + } + break; } } } // else no dest, metadata, not an image. Defaults ok @@ -1013,6 +1023,11 @@ public class JPEGImageWriter extends ImageWriter { System.out.println("outCsType: " + outCsType); } + invertCMYK = + (!rasterOnly && + ((outCsType == JPEG.JCS_YCCK) || + (outCsType == JPEG.JCS_CMYK))); + // Note that getData disables acceleration on buffer, but it is // just a 1-line intermediate data transfer buffer that does not // affect the acceleration of the source image. @@ -1721,6 +1736,12 @@ public class JPEGImageWriter extends ImageWriter { srcBands); } raster.setRect(sourceLine); + if (invertCMYK) { + byte[] data = ((DataBufferByte)raster.getDataBuffer()).getData(); + for (int i = 0, len = data.length; i < len; i++) { + data[i] = (byte)(0x0ff - (data[i] & 0xff)); + } + } if ((y > 7) && (y%8 == 0)) { // Every 8 scanlines cbLock.lock(); try { diff --git a/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriter.java b/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriter.java index ce6f771ecdceb539a4bc27562fbda1167cb429d0..27707613f76eeeb81390d3e662af71f83ec699f9 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriter.java +++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriter.java @@ -322,7 +322,7 @@ final class PNGImageWriteParam extends ImageWriteParam { *

    The default implementation resets the compression quality * to 0.5F. * - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * MODE_EXPLICIT. */ @Override diff --git a/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDecompressor.java b/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDecompressor.java index 4516ce0ad82e391319cb46d7332112d2892b5c26..bd7eb568fd88e28eb83142073df105e253918982 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDecompressor.java +++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDecompressor.java @@ -2373,7 +2373,7 @@ public abstract class TIFFDecompressor { * and instead override the {@code decodeRaw} and/or * {@code getRawImageType} methods. * - * @exception IOException if an error occurs in + * @throws IOException if an error occurs in * {@code decodeRaw}. */ public void decode() throws IOException { diff --git a/src/java.desktop/share/classes/com/sun/media/sound/AiffFileReader.java b/src/java.desktop/share/classes/com/sun/media/sound/AiffFileReader.java index c8d9cd8d2db33166e9e4810e450803baa87d6bd2..6ef0695c70d0e35e81bb11fb5d0033af2744d800 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/AiffFileReader.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/AiffFileReader.java @@ -172,7 +172,7 @@ public final class AiffFileReader extends SunFileReader { * Extended precision IEEE floating-point conversion routine. * @argument DataInputStream * @return double - * @exception IOException + * @throws IOException */ private double read_ieee_extended(DataInputStream dis) throws IOException { diff --git a/src/java.desktop/share/classes/com/sun/media/sound/AiffFileWriter.java b/src/java.desktop/share/classes/com/sun/media/sound/AiffFileWriter.java index d384bf279c4153432e6bd759eb0614574184c3c3..3738a557aef67617adf9e471fb5d813f07af4675 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/AiffFileWriter.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/AiffFileWriter.java @@ -392,7 +392,7 @@ public final class AiffFileWriter extends SunFileWriter { * Extended precision IEEE floating-point conversion routine. * @argument DataOutputStream * @argument double - * @exception IOException + * @throws IOException */ private void write_ieee_extended(DataOutputStream dos, float f) throws IOException { /* The special cases NaN, Infinity and Zero are ignored, since diff --git a/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java b/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java index ef995f812948d7353198dab174ba331ff322c1f1..89323cfe3c3bb5d2ca19831be20d088e2922afef 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java @@ -164,7 +164,7 @@ abstract class SunFileReader extends AudioFileReader { * Protected helper method to read 64 bits and changing the order of * each bytes. * @return 32 bits swapped value. - * @exception IOException + * @throws IOException */ final int rllong(DataInputStream dis) throws IOException { @@ -206,7 +206,7 @@ abstract class SunFileReader extends AudioFileReader { * rlshort * Protected helper method to read 16 bits value. Swap high with low byte. * @return the swapped value. - * @exception IOException + * @throws IOException */ final short rlshort(DataInputStream dis) throws IOException { diff --git a/src/java.desktop/share/classes/com/sun/media/sound/SunFileWriter.java b/src/java.desktop/share/classes/com/sun/media/sound/SunFileWriter.java index 1d54bcfe91c0c60294c037f43c1827b2a40071ed..8e85f1e743f87712bdc2741ee23c2060b6756e90 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/SunFileWriter.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/SunFileWriter.java @@ -70,7 +70,7 @@ abstract class SunFileWriter extends AudioFileWriter { * Protected helper method to read 64 bits and changing the order of * each bytes. * @return 32 bits swapped value. - * @exception IOException + * @throws IOException */ final int rllong(DataInputStream dis) throws IOException { @@ -112,7 +112,7 @@ abstract class SunFileWriter extends AudioFileWriter { * rlshort * Protected helper method to read 16 bits value. Swap high with low byte. * @return the swapped value. - * @exception IOException + * @throws IOException */ final short rlshort(DataInputStream dis) throws IOException { diff --git a/src/java.desktop/share/classes/java/awt/AWTEventMulticaster.java b/src/java.desktop/share/classes/java/awt/AWTEventMulticaster.java index a9f102643f4b91ad39ac3dc7048c7fb075eac0b8..b7584fc84ddb91d79a12bb133a8e550b64e0a7aa 100644 --- a/src/java.desktop/share/classes/java/awt/AWTEventMulticaster.java +++ b/src/java.desktop/share/classes/java/awt/AWTEventMulticaster.java @@ -1097,9 +1097,9 @@ public class AWTEventMulticaster implements * FooListeners by the specified multicast * listener, or an empty array if no such listeners have been * chained by the specified multicast listener - * @exception NullPointerException if the specified + * @throws NullPointerException if the specified * {@code listenertype} parameter is {@code null} - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * diff --git a/src/java.desktop/share/classes/java/awt/BorderLayout.java b/src/java.desktop/share/classes/java/awt/BorderLayout.java index 88edc23dec4fae6f6c959d0a02a4af686162ffe5..e3b92a7996ae75e4e5ec4be21dd8ee3b3ecfd92a 100644 --- a/src/java.desktop/share/classes/java/awt/BorderLayout.java +++ b/src/java.desktop/share/classes/java/awt/BorderLayout.java @@ -419,7 +419,7 @@ public class BorderLayout implements LayoutManager2, * @param constraints an object that specifies how and where * the component is added to the layout. * @see java.awt.Container#add(java.awt.Component, java.lang.Object) - * @exception IllegalArgumentException if the constraint object is not + * @throws IllegalArgumentException if the constraint object is not * a string, or if it not one of the five specified constants. * @since 1.1 */ @@ -514,7 +514,7 @@ public class BorderLayout implements LayoutManager2, * {@code LINE_START}, {@code LINE_END} * @return the component at the given location, or {@code null} if * the location is empty - * @exception IllegalArgumentException if the constraint object is + * @throws IllegalArgumentException if the constraint object is * not one of the nine specified constants * @see #addLayoutComponent(java.awt.Component, java.lang.Object) * @since 1.5 @@ -562,9 +562,9 @@ public class BorderLayout implements LayoutManager2, * {@code Container}'s component orientation. * @return the component at the given location, or {@code null} if * the location is empty - * @exception IllegalArgumentException if the constraint object is + * @throws IllegalArgumentException if the constraint object is * not one of the five specified constants - * @exception NullPointerException if the target parameter is null + * @throws NullPointerException if the target parameter is null * @see #addLayoutComponent(java.awt.Component, java.lang.Object) * @since 1.5 */ diff --git a/src/java.desktop/share/classes/java/awt/BufferCapabilities.java b/src/java.desktop/share/classes/java/awt/BufferCapabilities.java index 22df13cfb5072998e55129e0343ef4838f9f7ff1..6edeae843aa45f50186c1e9a48ce6d5d10fd4fa7 100644 --- a/src/java.desktop/share/classes/java/awt/BufferCapabilities.java +++ b/src/java.desktop/share/classes/java/awt/BufferCapabilities.java @@ -47,7 +47,7 @@ public class BufferCapabilities implements Cloneable { * cannot be {@code null} * @param flipContents the contents of the back buffer after page-flipping, * {@code null} if page flipping is not used (implies blitting) - * @exception IllegalArgumentException if frontCaps or backCaps are + * @throws IllegalArgumentException if frontCaps or backCaps are * {@code null} */ public BufferCapabilities(ImageCapabilities frontCaps, diff --git a/src/java.desktop/share/classes/java/awt/Button.java b/src/java.desktop/share/classes/java/awt/Button.java index 35acb8d292882f2dc5ba7229de975da7b9751aef..524008e401a6273dfab4fd582508419d21d7b2c8 100644 --- a/src/java.desktop/share/classes/java/awt/Button.java +++ b/src/java.desktop/share/classes/java/awt/Button.java @@ -140,7 +140,7 @@ public class Button extends Component implements Accessible { /** * Constructs a button with an empty string for its label. * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -153,7 +153,7 @@ public class Button extends Component implements Accessible { * * @param label a string label for the button, or * {@code null} for no label - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -339,7 +339,7 @@ public class Button extends Component implements Accessible { * FooListeners on this button, * or an empty array if no such * listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * diff --git a/src/java.desktop/share/classes/java/awt/Canvas.java b/src/java.desktop/share/classes/java/awt/Canvas.java index 1ee5380c6df08be44d8fea8ff81cb8568ef26310..7d90e148b6c313a9be2d917f9075031e1284a171 100644 --- a/src/java.desktop/share/classes/java/awt/Canvas.java +++ b/src/java.desktop/share/classes/java/awt/Canvas.java @@ -166,8 +166,8 @@ public class Canvas extends Component implements Accessible { * Each time this method is called, * the existing buffer strategy for this component is discarded. * @param numBuffers number of buffers to create, including the front buffer - * @exception IllegalArgumentException if numBuffers is less than 1. - * @exception IllegalStateException if the component is not displayable + * @throws IllegalArgumentException if numBuffers is less than 1. + * @throws IllegalStateException if the component is not displayable * @see #isDisplayable * @see #getBufferStrategy * @since 1.4 @@ -187,11 +187,11 @@ public class Canvas extends Component implements Accessible { * @param numBuffers number of buffers to create * @param caps the required capabilities for creating the buffer strategy; * cannot be {@code null} - * @exception AWTException if the capabilities supplied could not be + * @throws AWTException if the capabilities supplied could not be * supported or met; this may happen, for example, if there is not enough * accelerated memory currently available, or if page flipping is specified * but not possible. - * @exception IllegalArgumentException if numBuffers is less than 1, or if + * @throws IllegalArgumentException if numBuffers is less than 1, or if * caps is {@code null} * @see #getBufferStrategy * @since 1.4 diff --git a/src/java.desktop/share/classes/java/awt/CardLayout.java b/src/java.desktop/share/classes/java/awt/CardLayout.java index d53c86a9d454ab14e9a85849256d40373c8bf335..915376d032095727f5ff440706fdbd81b4152201 100644 --- a/src/java.desktop/share/classes/java/awt/CardLayout.java +++ b/src/java.desktop/share/classes/java/awt/CardLayout.java @@ -206,7 +206,7 @@ public class CardLayout implements LayoutManager2, * @param constraints a tag that identifies a particular * card in the layout. * @see java.awt.CardLayout#show(java.awt.Container, java.lang.String) - * @exception IllegalArgumentException if the constraint is not a string. + * @throws IllegalArgumentException if the constraint is not a string. */ public void addLayoutComponent(Component comp, Object constraints) { synchronized (comp.getTreeLock()) { diff --git a/src/java.desktop/share/classes/java/awt/Checkbox.java b/src/java.desktop/share/classes/java/awt/Checkbox.java index e72d249f8e31139b0903b5bb2aa1e99907600d7f..f4a642cb3297c13cd13a157058dc9f6c8bb8648b 100644 --- a/src/java.desktop/share/classes/java/awt/Checkbox.java +++ b/src/java.desktop/share/classes/java/awt/Checkbox.java @@ -146,7 +146,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible { * Creates a check box with an empty string for its label. * The state of this check box is set to "off," and it is not * part of any check box group. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -161,7 +161,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible { * * @param label a string label for this check box, * or {@code null} for no label. - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless @@ -178,7 +178,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible { * @param label a string label for this check box, * or {@code null} for no label * @param state the initial state of this check box - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless @@ -196,7 +196,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible { * @param state the initial state of this check box. * @param group a check box group for this check box, * or {@code null} for no group. - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless @@ -222,7 +222,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible { * @param group a check box group for this check box, * or {@code null} for no group. * @param state the initial state of this check box. - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless @@ -508,7 +508,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible { * FooListeners on this checkbox, * or an empty array if no such * listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * diff --git a/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java b/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java index 4df4ddbef856a39e7d23566383f4ce2322b4edbe..f95d1d39424a7894b528aa3868b655df84e43871 100644 --- a/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java +++ b/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java @@ -110,7 +110,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access /** * Create a check box menu item with an empty label. * The item's state is initially set to "off." - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.1 @@ -125,7 +125,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access * @param label a string label for the check box menu item, * or {@code null} for an unlabeled menu item. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -140,7 +140,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access * @param state the initial state of the menu item, where * {@code true} indicates "on" and * {@code false} indicates "off." - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.1 @@ -316,7 +316,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access * FooListeners on this checkbox menuitem, * or an empty array if no such * listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * diff --git a/src/java.desktop/share/classes/java/awt/Choice.java b/src/java.desktop/share/classes/java/awt/Choice.java index d8e8ab4c0267a44a96d98f0d7e4af6ddd3866e67..2b04239fd314c89a682d98675417b7efb3bdfa01 100644 --- a/src/java.desktop/share/classes/java/awt/Choice.java +++ b/src/java.desktop/share/classes/java/awt/Choice.java @@ -124,7 +124,7 @@ public class Choice extends Component implements ItemSelectable, Accessible { * By default, the first item added to the choice menu becomes the * selected item, until a different selection is made by the user * by calling one of the {@code select} methods. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @see #select(int) @@ -205,7 +205,7 @@ public class Choice extends Component implements ItemSelectable, Accessible { /** * Adds an item to this {@code Choice} menu. * @param item the item to be added - * @exception NullPointerException if the item's value is + * @throws NullPointerException if the item's value is * {@code null} * @since 1.1 */ @@ -219,7 +219,7 @@ public class Choice extends Component implements ItemSelectable, Accessible { *

    * Adds an item to this {@code Choice} menu. * @param item the item to be added - * @exception NullPointerException if the item's value is equal to + * @throws NullPointerException if the item's value is equal to * {@code null} */ public void addItem(String item) { @@ -238,7 +238,7 @@ public class Choice extends Component implements ItemSelectable, Accessible { * invoking this method. * @param item the item to be added * @param index the new item position - * @exception NullPointerException if the item's value is equal to + * @throws NullPointerException if the item's value is equal to * {@code null} */ private void insertNoInvalidate(String item, int index) { @@ -274,7 +274,7 @@ public class Choice extends Component implements ItemSelectable, Accessible { * the selected item. * @param item the non-{@code null} item to be inserted * @param index the position at which the item should be inserted - * @exception IllegalArgumentException if index is less than 0 + * @throws IllegalArgumentException if index is less than 0 */ public void insert(String item, int index) { synchronized (this) { @@ -300,7 +300,7 @@ public class Choice extends Component implements ItemSelectable, Accessible { * item remains selected (and the selected index is * updated accordingly). * @param item the item to remove from this {@code Choice} menu - * @exception IllegalArgumentException if the item doesn't + * @throws IllegalArgumentException if the item doesn't * exist in the choice menu * @since 1.1 */ @@ -430,7 +430,7 @@ public class Choice extends Component implements ItemSelectable, Accessible { * {@code ItemEvent} is by user interaction. * * @param pos the position of the selected item - * @exception IllegalArgumentException if the specified + * @throws IllegalArgumentException if the specified * position is greater than the * number of items or less than zero * @see #getSelectedItem @@ -561,7 +561,7 @@ public class Choice extends Component implements ItemSelectable, Accessible { * FooListeners on this choice, * or an empty array if no such * listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * diff --git a/src/java.desktop/share/classes/java/awt/Color.java b/src/java.desktop/share/classes/java/awt/Color.java index aae90be8616dd0de749497032ef51dad7a4253ab..6bb4befd8e83c5eed52d4f98736c86d74c2b2109 100644 --- a/src/java.desktop/share/classes/java/awt/Color.java +++ b/src/java.desktop/share/classes/java/awt/Color.java @@ -722,7 +722,7 @@ public class Color implements Paint, java.io.Serializable { * an opaque color as a 24-bit integer * @return the new {@code Color} object. * @see java.lang.Integer#decode - * @exception NumberFormatException if the specified string cannot + * @throws NumberFormatException if the specified string cannot * be interpreted as a decimal, * octal, or hexadecimal integer. * @since 1.1 diff --git a/src/java.desktop/share/classes/java/awt/Component.java b/src/java.desktop/share/classes/java/awt/Component.java index 813f9bd0c796eea6b84f543004b91f85b48a52fc..cfd4cbe025a25632f2c17b8fa318a8c2bb542ec3 100644 --- a/src/java.desktop/share/classes/java/awt/Component.java +++ b/src/java.desktop/share/classes/java/awt/Component.java @@ -1420,7 +1420,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * pointer. If the return value of this method is {@code null}, mouse * pointer is not directly above the {@code Component}. * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true + * @throws HeadlessException if GraphicsEnvironment.isHeadless() returns true * @see #isShowing * @see Container#getMousePosition * @return mouse coordinates relative to this {@code Component}, or null @@ -1984,7 +1984,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * @return this component's locale; if this component does not * have a locale, the locale of its parent is returned * @see #setLocale - * @exception IllegalComponentStateException if the {@code Component} + * @throws IllegalComponentStateException if the {@code Component} * does not have its own locale and has not yet been added to * a containment hierarchy such that the locale can be determined * from the containing parent @@ -3827,8 +3827,8 @@ public abstract class Component implements ImageObserver, MenuContainer, * Each time this method is called, * the existing buffer strategy for this component is discarded. * @param numBuffers number of buffers to create, including the front buffer - * @exception IllegalArgumentException if numBuffers is less than 1. - * @exception IllegalStateException if the component is not displayable + * @throws IllegalArgumentException if numBuffers is less than 1. + * @throws IllegalStateException if the component is not displayable * @see #isDisplayable * @see Window#getBufferStrategy() * @see Canvas#getBufferStrategy() @@ -3884,11 +3884,11 @@ public abstract class Component implements ImageObserver, MenuContainer, * @param numBuffers number of buffers to create * @param caps the required capabilities for creating the buffer strategy; * cannot be {@code null} - * @exception AWTException if the capabilities supplied could not be + * @throws AWTException if the capabilities supplied could not be * supported or met; this may happen, for example, if there is not enough * accelerated memory currently available, or if page flipping is specified * but not possible. - * @exception IllegalArgumentException if numBuffers is less than 1, or if + * @throws IllegalArgumentException if numBuffers is less than 1, or if * caps is {@code null} * @see Window#getBufferStrategy() * @see Canvas#getBufferStrategy() @@ -4032,12 +4032,12 @@ public abstract class Component implements ImageObserver, MenuContainer, * @see Applet * @param numBuffers the number of buffers * @param caps the capabilities of the buffers - * @exception AWTException if the capabilities supplied could not be + * @throws AWTException if the capabilities supplied could not be * supported or met - * @exception ClassCastException if the component is not a canvas or + * @throws ClassCastException if the component is not a canvas or * window. - * @exception IllegalStateException if the component has no peer - * @exception IllegalArgumentException if {@code numBuffers} is less than two, + * @throws IllegalStateException if the component has no peer + * @throws IllegalArgumentException if {@code numBuffers} is less than two, * or if {@code BufferCapabilities.isPageFlipping} is not * {@code true}. * @see #createBuffers(int, BufferCapabilities) @@ -4066,10 +4066,10 @@ public abstract class Component implements ImageObserver, MenuContainer, * @param caps the capabilities of the buffers. * {@code BufferCapabilities.isPageFlipping} must be * {@code true}. - * @exception AWTException if the capabilities supplied could not be + * @throws AWTException if the capabilities supplied could not be * supported or met - * @exception IllegalStateException if the component has no peer - * @exception IllegalArgumentException if numBuffers is less than two, + * @throws IllegalStateException if the component has no peer + * @throws IllegalArgumentException if numBuffers is less than two, * or if {@code BufferCapabilities.isPageFlipping} is not * {@code true}. * @see java.awt.BufferCapabilities#isPageFlipping() @@ -4135,7 +4135,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * Provides direct access to the back buffer as an image. * * @return the back buffer as an image - * @exception IllegalStateException if the buffers have not yet + * @throws IllegalStateException if the buffers have not yet * been created */ protected Image getBackBuffer() { @@ -4154,7 +4154,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * for the contents of the back buffer. This should be one of the * values of the {@code BufferCapabilities.FlipContents} * property. - * @exception IllegalStateException if the buffers have not yet + * @throws IllegalStateException if the buffers have not yet * been created * @see java.awt.BufferCapabilities#getFlipContents() */ @@ -6060,7 +6060,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * @return an array of all objects registered as * FooListeners on this component, * or an empty array if no such listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * @throws NullPointerException if {@code listenerType} is {@code null} @@ -8352,7 +8352,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * Adds the specified popup menu to the component. * @param popup the popup menu to be added to the component. * @see #remove(MenuComponent) - * @exception NullPointerException if {@code popup} is {@code null} + * @throws NullPointerException if {@code popup} is {@code null} * @since 1.1 */ public void add(PopupMenu popup) { @@ -9192,7 +9192,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * * @param orientation the new component orientation of this component and * the components contained within it. - * @exception NullPointerException if {@code orientation} is null. + * @throws NullPointerException if {@code orientation} is null. * @see #setComponentOrientation * @see #getComponentOrientation * @see #invalidate diff --git a/src/java.desktop/share/classes/java/awt/Container.java b/src/java.desktop/share/classes/java/awt/Container.java index 5b4489f3cac037367281592b11af7f29702c7b2c..f63c507a829abdcf04069e02d6bb9e4bba3de2c6 100644 --- a/src/java.desktop/share/classes/java/awt/Container.java +++ b/src/java.desktop/share/classes/java/awt/Container.java @@ -340,7 +340,7 @@ public class Container extends Component { * * @param n the index of the component to get. * @return the nth component in this container. - * @exception ArrayIndexOutOfBoundsException + * @throws ArrayIndexOutOfBoundsException * if the nth value does not exist. * @see Component#getTreeLock() */ @@ -429,7 +429,7 @@ public class Container extends Component { * display the added component. * * @param comp the component to be added - * @exception NullPointerException if {@code comp} is {@code null} + * @throws NullPointerException if {@code comp} is {@code null} * @see #addImpl * @see #invalidate * @see #validate @@ -456,7 +456,7 @@ public class Container extends Component { * @param name the name of the component to be added * @param comp the component to be added * @return the component added - * @exception NullPointerException if {@code comp} is {@code null} + * @throws NullPointerException if {@code comp} is {@code null} * @see #add(Component, Object) * @see #invalidate */ @@ -479,8 +479,8 @@ public class Container extends Component { * @param comp the component to be added * @param index the position at which to insert the component, * or {@code -1} to append the component to the end - * @exception NullPointerException if {@code comp} is {@code null} - * @exception IllegalArgumentException if {@code index} is invalid (see + * @throws NullPointerException if {@code comp} is {@code null} + * @throws IllegalArgumentException if {@code index} is invalid (see * {@link #addImpl} for details) * @return the component {@code comp} * @see #addImpl @@ -764,17 +764,17 @@ public class Container extends Component { * @param index the position in the container's list to * insert the component, where {@code getComponentCount()} * appends to the end - * @exception NullPointerException if {@code comp} is + * @throws NullPointerException if {@code comp} is * {@code null} - * @exception IllegalArgumentException if {@code comp} is one of the + * @throws IllegalArgumentException if {@code comp} is one of the * container's parents - * @exception IllegalArgumentException if {@code index} is not in + * @throws IllegalArgumentException if {@code index} is not in * the range {@code [0, getComponentCount()]} for moving * between containers, or not in the range * {@code [0, getComponentCount()-1]} for moving inside * a container - * @exception IllegalArgumentException if adding a container to itself - * @exception IllegalArgumentException if adding a {@code Window} + * @throws IllegalArgumentException if adding a container to itself + * @throws IllegalArgumentException if adding a {@code Window} * to a container * @see #getComponentZOrder(java.awt.Component) * @see #invalidate @@ -989,7 +989,7 @@ public class Container extends Component { * @param comp the component to be added * @param constraints an object expressing * layout constraints for this component - * @exception NullPointerException if {@code comp} is {@code null} + * @throws NullPointerException if {@code comp} is {@code null} * @see #addImpl * @see #invalidate * @see #validate @@ -1019,8 +1019,8 @@ public class Container extends Component { * @param index the position in the container's list at which to insert * the component; {@code -1} means insert at the end * component - * @exception NullPointerException if {@code comp} is {@code null} - * @exception IllegalArgumentException if {@code index} is invalid (see + * @throws NullPointerException if {@code comp} is {@code null} + * @throws IllegalArgumentException if {@code index} is invalid (see * {@link #addImpl} for details) * @see #addImpl * @see #invalidate @@ -1082,16 +1082,16 @@ public class Container extends Component { * @param index the position in the container's list at which to * insert the component, where {@code -1} * means append to the end - * @exception IllegalArgumentException if {@code index} is invalid; + * @throws IllegalArgumentException if {@code index} is invalid; * if {@code comp} is a child of this container, the valid * range is {@code [-1, getComponentCount()-1]}; if component is * not a child of this container, the valid range is * {@code [-1, getComponentCount()]} * - * @exception IllegalArgumentException if {@code comp} is an ancestor of + * @throws IllegalArgumentException if {@code comp} is an ancestor of * this container - * @exception IllegalArgumentException if adding a window to a container - * @exception NullPointerException if {@code comp} is {@code null} + * @throws IllegalArgumentException if adding a window to a container + * @throws NullPointerException if {@code comp} is {@code null} * @see #add(Component) * @see #add(Component, int) * @see #add(Component, java.lang.Object) @@ -2213,10 +2213,10 @@ public class Container extends Component { * @return an array of all objects registered as * FooListeners on this container, * or an empty array if no such listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} - * @exception NullPointerException if {@code listenerType} is {@code null} + * @throws NullPointerException if {@code listenerType} is {@code null} * * @see #getContainerListeners * @@ -2622,7 +2622,7 @@ public class Container extends Component { * a non-null value if the mouse pointer is above {@code Container} or any * of its descendants. * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true + * @throws HeadlessException if GraphicsEnvironment.isHeadless() returns true * @param allowChildren true if children should be taken into account * @see Component#getMousePosition * @return mouse coordinates relative to this {@code Component}, or null @@ -3556,7 +3556,7 @@ public class Container extends Component { * * @param o the new component orientation of this container and * the components contained within it. - * @exception NullPointerException if {@code orientation} is null. + * @throws NullPointerException if {@code orientation} is null. * @see Component#setComponentOrientation * @see Component#getComponentOrientation * @see #invalidate diff --git a/src/java.desktop/share/classes/java/awt/Cursor.java b/src/java.desktop/share/classes/java/awt/Cursor.java index 936d17da46f6e2f8dc4f53485ddacbf51133f53c..cfccf06723becd6a24be72fb99cde1a7142ee1b8 100644 --- a/src/java.desktop/share/classes/java/awt/Cursor.java +++ b/src/java.desktop/share/classes/java/awt/Cursor.java @@ -285,9 +285,9 @@ public class Cursor implements java.io.Serializable { * * @param name a string describing the desired system-specific custom cursor * @return the system specific custom cursor named - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} returns true - * @exception AWTException in case of erroneous retrieving of the cursor + * @throws AWTException in case of erroneous retrieving of the cursor */ public static Cursor getSystemCustomCursor(final String name) throws AWTException, HeadlessException { diff --git a/src/java.desktop/share/classes/java/awt/Dialog.java b/src/java.desktop/share/classes/java/awt/Dialog.java index 1a54d70730697ca0aeff76ff75ea0f8c37ad9c1c..2c126e74ffc80b22fe657dbdac1c8b91b52af483 100644 --- a/src/java.desktop/share/classes/java/awt/Dialog.java +++ b/src/java.desktop/share/classes/java/awt/Dialog.java @@ -329,9 +329,9 @@ public class Dialog extends Window { * * @param owner the owner of the dialog or {@code null} if * this dialog has no owner - * @exception java.lang.IllegalArgumentException if the {@code owner}'s + * @throws java.lang.IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.GraphicsEnvironment#isHeadless @@ -352,9 +352,9 @@ public class Dialog extends Window { * windows when shown. If {@code false}, the dialog is {@code MODELESS}; * if {@code true}, the modality type property is set to * {@code DEFAULT_MODALITY_TYPE} - * @exception java.lang.IllegalArgumentException if the {@code owner}'s + * @throws java.lang.IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.Dialog.ModalityType @@ -376,9 +376,9 @@ public class Dialog extends Window { * this dialog has no owner * @param title the title of the dialog or {@code null} if this dialog * has no title - * @exception IllegalArgumentException if the {@code owner}'s + * @throws IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.GraphicsEnvironment#isHeadless @@ -401,9 +401,9 @@ public class Dialog extends Window { * windows when shown. If {@code false}, the dialog is {@code MODELESS}; * if {@code true}, the modality type property is set to * {@code DEFAULT_MODALITY_TYPE} - * @exception java.lang.IllegalArgumentException if the {@code owner}'s + * @throws java.lang.IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.Dialog.ModalityType @@ -433,9 +433,9 @@ public class Dialog extends Window { * @param gc the {@code GraphicsConfiguration} of the target screen device; * if {@code null}, the default system {@code GraphicsConfiguration} * is assumed - * @exception java.lang.IllegalArgumentException if {@code gc} + * @throws java.lang.IllegalArgumentException if {@code gc} * is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.Dialog.ModalityType @@ -459,9 +459,9 @@ public class Dialog extends Window { * * @param owner the owner of the dialog or {@code null} if this * dialog has no owner - * @exception java.lang.IllegalArgumentException if the {@code owner}'s + * @throws java.lang.IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.2 @@ -478,9 +478,9 @@ public class Dialog extends Window { * has no owner * @param title the title of the dialog or {@code null} if this dialog * has no title - * @exception java.lang.IllegalArgumentException if the {@code owner}'s + * @throws java.lang.IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.GraphicsEnvironment#isHeadless @@ -502,9 +502,9 @@ public class Dialog extends Window { * windows when shown. If {@code false}, the dialog is {@code MODELESS}; * if {@code true}, the modality type property is set to * {@code DEFAULT_MODALITY_TYPE} - * @exception IllegalArgumentException if the {@code owner}'s + * @throws IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.Dialog.ModalityType @@ -536,9 +536,9 @@ public class Dialog extends Window { * @param gc the {@code GraphicsConfiguration} of the target screen device; * if {@code null}, the default system {@code GraphicsConfiguration} * is assumed - * @exception java.lang.IllegalArgumentException if {@code gc} + * @throws java.lang.IllegalArgumentException if {@code gc} * is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.Dialog.ModalityType @@ -565,12 +565,12 @@ public class Dialog extends Window { * {@link java.awt.Dialog Dialog}, {@link java.awt.Frame Frame}, any * of their descendants or {@code null} * - * @exception java.lang.IllegalArgumentException if the {@code owner} + * @throws java.lang.IllegalArgumentException if the {@code owner} * is not an instance of {@link java.awt.Dialog Dialog} or {@link * java.awt.Frame Frame} - * @exception java.lang.IllegalArgumentException if the {@code owner}'s + * @throws java.lang.IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.GraphicsEnvironment#isHeadless @@ -591,12 +591,12 @@ public class Dialog extends Window { * @param title the title of the dialog or {@code null} if this dialog * has no title * - * @exception java.lang.IllegalArgumentException if the {@code owner} + * @throws java.lang.IllegalArgumentException if the {@code owner} * is not an instance of {@link java.awt.Dialog Dialog} or {@link * java.awt.Frame Frame} - * @exception java.lang.IllegalArgumentException if the {@code owner}'s + * @throws java.lang.IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.GraphicsEnvironment#isHeadless @@ -618,14 +618,14 @@ public class Dialog extends Window { * windows when shown. {@code null} value and unsupported modality * types are equivalent to {@code MODELESS} * - * @exception java.lang.IllegalArgumentException if the {@code owner} + * @throws java.lang.IllegalArgumentException if the {@code owner} * is not an instance of {@link java.awt.Dialog Dialog} or {@link * java.awt.Frame Frame} - * @exception java.lang.IllegalArgumentException if the {@code owner}'s + * @throws java.lang.IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} - * @exception SecurityException if the calling thread does not have permission + * @throws SecurityException if the calling thread does not have permission * to create modal dialogs with the given {@code modalityType} * * @see java.awt.Dialog.ModalityType @@ -653,14 +653,14 @@ public class Dialog extends Window { * windows when shown. {@code null} value and unsupported modality * types are equivalent to {@code MODELESS} * - * @exception java.lang.IllegalArgumentException if the {@code owner} + * @throws java.lang.IllegalArgumentException if the {@code owner} * is not an instance of {@link java.awt.Dialog Dialog} or {@link * java.awt.Frame Frame} - * @exception java.lang.IllegalArgumentException if the {@code owner}'s + * @throws java.lang.IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} - * @exception SecurityException if the calling thread does not have permission + * @throws SecurityException if the calling thread does not have permission * to create modal dialogs with the given {@code modalityType} * * @see java.awt.Dialog.ModalityType @@ -704,14 +704,14 @@ public class Dialog extends Window { * if {@code null}, the default system {@code GraphicsConfiguration} * is assumed * - * @exception java.lang.IllegalArgumentException if the {@code owner} + * @throws java.lang.IllegalArgumentException if the {@code owner} * is not an instance of {@link java.awt.Dialog Dialog} or {@link * java.awt.Frame Frame} - * @exception java.lang.IllegalArgumentException if {@code gc} + * @throws java.lang.IllegalArgumentException if {@code gc} * is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} - * @exception SecurityException if the calling thread does not have permission + * @throws SecurityException if the calling thread does not have permission * to create modal dialogs with the given {@code modalityType} * * @see java.awt.Dialog.ModalityType @@ -848,7 +848,7 @@ public class Dialog extends Window { * @param type specifies whether dialog blocks input to other * windows when shown. {@code null} value and unsupported modality * types are equivalent to {@code MODELESS} - * @exception SecurityException if the calling thread does not have permission + * @throws SecurityException if the calling thread does not have permission * to create modal dialogs with the given {@code modalityType} * * @see java.awt.Dialog#getModalityType diff --git a/src/java.desktop/share/classes/java/awt/EventQueue.java b/src/java.desktop/share/classes/java/awt/EventQueue.java index e7d1dcc82863c1c536ee3c5679f9486c73eefaec..4dce257f7278f47a563748d12dc14ab683457a74 100644 --- a/src/java.desktop/share/classes/java/awt/EventQueue.java +++ b/src/java.desktop/share/classes/java/awt/EventQueue.java @@ -544,7 +544,7 @@ public class EventQueue { * returns it. This method will block until an event has * been posted by another thread. * @return the next {@code AWTEvent} - * @exception InterruptedException + * @throws InterruptedException * if any thread has interrupted this thread */ public AWTEvent getNextEvent() throws InterruptedException { @@ -946,7 +946,7 @@ public class EventQueue { * Warning: To avoid deadlock, do not declare this method * synchronized in a subclass. * - * @exception EmptyStackException if no previous push was made + * @throws EmptyStackException if no previous push was made * on this {@code EventQueue} * @see java.awt.EventQueue#push * @since 1.2 @@ -1331,9 +1331,9 @@ public class EventQueue { * synchronously in the * {@link #isDispatchThread event dispatch thread} * of {@link Toolkit#getSystemEventQueue the system EventQueue} - * @exception InterruptedException if any thread has + * @throws InterruptedException if any thread has * interrupted this thread - * @exception InvocationTargetException if an throwable is thrown + * @throws InvocationTargetException if an throwable is thrown * when running {@code runnable} * @see #invokeLater * @see Toolkit#getSystemEventQueue diff --git a/src/java.desktop/share/classes/java/awt/FileDialog.java b/src/java.desktop/share/classes/java/awt/FileDialog.java index b6a501b44e96b7c73f690c063989b590b64a1d9a..399544b954789ccb0100be92e08542a177c51c6b 100644 --- a/src/java.desktop/share/classes/java/awt/FileDialog.java +++ b/src/java.desktop/share/classes/java/awt/FileDialog.java @@ -232,7 +232,7 @@ public class FileDialog extends Dialog { * @param title the title of the dialog * @param mode the mode of the dialog; either * {@code FileDialog.LOAD} or {@code FileDialog.SAVE} - * @exception IllegalArgumentException if an illegal file + * @throws IllegalArgumentException if an illegal file * dialog mode is supplied * @see java.awt.FileDialog#LOAD * @see java.awt.FileDialog#SAVE @@ -255,10 +255,10 @@ public class FileDialog extends Dialog { * displayed. * * @param parent the owner of the dialog - * @exception java.lang.IllegalArgumentException if the {@code parent}'s + * @throws java.lang.IllegalArgumentException if the {@code parent}'s * {@code GraphicsConfiguration} * is not from a screen device; - * @exception java.lang.IllegalArgumentException if {@code parent} + * @throws java.lang.IllegalArgumentException if {@code parent} * is {@code null}; this exception is always thrown when * {@code GraphicsEnvironment.isHeadless} * returns {@code true} @@ -285,10 +285,10 @@ public class FileDialog extends Dialog { * @param title the title of the dialog; a {@code null} value * will be accepted without causing a * {@code NullPointerException} to be thrown - * @exception java.lang.IllegalArgumentException if the {@code parent}'s + * @throws java.lang.IllegalArgumentException if the {@code parent}'s * {@code GraphicsConfiguration} * is not from a screen device; - * @exception java.lang.IllegalArgumentException if {@code parent} + * @throws java.lang.IllegalArgumentException if {@code parent} * is {@code null}; this exception is always thrown when * {@code GraphicsEnvironment.isHeadless} * returns {@code true} @@ -321,12 +321,12 @@ public class FileDialog extends Dialog { * {@code NullPointerException} to be thrown * @param mode the mode of the dialog; either * {@code FileDialog.LOAD} or {@code FileDialog.SAVE} - * @exception java.lang.IllegalArgumentException if an illegal + * @throws java.lang.IllegalArgumentException if an illegal * file dialog mode is supplied; - * @exception java.lang.IllegalArgumentException if the {@code parent}'s + * @throws java.lang.IllegalArgumentException if the {@code parent}'s * {@code GraphicsConfiguration} * is not from a screen device; - * @exception java.lang.IllegalArgumentException if {@code parent} + * @throws java.lang.IllegalArgumentException if {@code parent} * is {@code null}; this exception is always thrown when * {@code GraphicsEnvironment.isHeadless} * returns {@code true} @@ -408,7 +408,7 @@ public class FileDialog extends Dialog { * @see java.awt.FileDialog#LOAD * @see java.awt.FileDialog#SAVE * @see java.awt.FileDialog#getMode - * @exception IllegalArgumentException if an illegal file + * @throws IllegalArgumentException if an illegal file * dialog mode is supplied * @since 1.1 */ diff --git a/src/java.desktop/share/classes/java/awt/Frame.java b/src/java.desktop/share/classes/java/awt/Frame.java index 6dde9373c38714974047be58de9212643f82961f..e01ef082d4229865c0c964723719621ceb99f1cc 100644 --- a/src/java.desktop/share/classes/java/awt/Frame.java +++ b/src/java.desktop/share/classes/java/awt/Frame.java @@ -383,7 +383,7 @@ public class Frame extends Window implements MenuContainer { * Constructs a new instance of {@code Frame} that is * initially invisible. The title of the {@code Frame} * is empty. - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless() * @see Component#setSize @@ -401,9 +401,9 @@ public class Frame extends Window implements MenuContainer { * of the target screen device. If {@code gc} * is {@code null}, the system default * {@code GraphicsConfiguration} is assumed. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code gc} is not from a screen device. - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless() * @since 1.3 @@ -418,7 +418,7 @@ public class Frame extends Window implements MenuContainer { * @param title the title to be displayed in the frame's border. * A {@code null} value * is treated as an empty string, "". - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless() * @see java.awt.Component#setSize @@ -440,9 +440,9 @@ public class Frame extends Window implements MenuContainer { * of the target screen device. If {@code gc} is * {@code null}, the system default * {@code GraphicsConfiguration} is assumed. - * @exception IllegalArgumentException if {@code gc} + * @throws IllegalArgumentException if {@code gc} * is not from a screen device. - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless() * @see java.awt.Component#setSize diff --git a/src/java.desktop/share/classes/java/awt/GraphicsConfiguration.java b/src/java.desktop/share/classes/java/awt/GraphicsConfiguration.java index b698f0f3706d1e08fd328073e4b7ced0f1c3a57f..58d502ac03f47f57a06db6eab39a36ae4c06d706 100644 --- a/src/java.desktop/share/classes/java/awt/GraphicsConfiguration.java +++ b/src/java.desktop/share/classes/java/awt/GraphicsConfiguration.java @@ -261,7 +261,7 @@ public abstract class GraphicsConfiguration { * @param width the width of the returned {@code VolatileImage} * @param height the height of the returned {@code VolatileImage} * @param caps the image capabilities - * @exception AWTException if the supplied image capabilities could not + * @throws AWTException if the supplied image capabilities could not * be met by this graphics configuration * @since 1.4 */ @@ -294,7 +294,7 @@ public abstract class GraphicsConfiguration { * @see Transparency#BITMASK * @see Transparency#TRANSLUCENT * @throws IllegalArgumentException if the transparency is not a valid value - * @exception AWTException if the supplied image capabilities could not + * @throws AWTException if the supplied image capabilities could not * be met by this graphics configuration * @see Component#createVolatileImage(int, int) * @since 1.5 diff --git a/src/java.desktop/share/classes/java/awt/GraphicsDevice.java b/src/java.desktop/share/classes/java/awt/GraphicsDevice.java index d878f610fca9a9d8bc1bcd9e29a81c21ea84254f..c08c5580ae73fc388bc8d67f8e90a697e37b3d86 100644 --- a/src/java.desktop/share/classes/java/awt/GraphicsDevice.java +++ b/src/java.desktop/share/classes/java/awt/GraphicsDevice.java @@ -418,10 +418,10 @@ public abstract class GraphicsDevice { *

    * * @param dm The new display mode of this graphics device. - * @exception IllegalArgumentException if the {@code DisplayMode} + * @throws IllegalArgumentException if the {@code DisplayMode} * supplied is {@code null}, or is not available in the array returned * by {@code getDisplayModes} - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code isDisplayChangeSupported} returns {@code false} * @see #getDisplayMode * @see #getDisplayModes diff --git a/src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java b/src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java index 438f9f399a0471c2c57d4b11090d212fcf943ad7..0265142aee3e9a349bfdf9d366f21e174c78829c 100644 --- a/src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java +++ b/src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java @@ -191,7 +191,7 @@ public abstract class GraphicsEnvironment { * objects. * @return an array containing all the {@code GraphicsDevice} * objects that represent screen devices - * @exception HeadlessException if isHeadless() returns true + * @throws HeadlessException if isHeadless() returns true * @see #isHeadless() */ public abstract GraphicsDevice[] getScreenDevices() @@ -201,7 +201,7 @@ public abstract class GraphicsEnvironment { * Returns the default screen {@code GraphicsDevice}. * @return the {@code GraphicsDevice} that represents the * default screen device - * @exception HeadlessException if isHeadless() returns true + * @throws HeadlessException if isHeadless() returns true * @see #isHeadless() */ public abstract GraphicsDevice getDefaultScreenDevice() @@ -357,9 +357,9 @@ public abstract class GraphicsEnvironment { } /** - * Indicates a preference for proportional over non-proportional (e.g. - * dual-spaced CJK fonts) fonts in the mapping of logical fonts to - * physical fonts. If the default mapping contains fonts for which + * Indicates a preference for proportional over non-proportional (for + * example dual-spaced CJK fonts) fonts in the mapping of logical fonts + * to physical fonts. If the default mapping contains fonts for which * proportional and non-proportional variants exist, then calling * this method indicates the mapping should use a proportional variant. *

    @@ -383,7 +383,7 @@ public abstract class GraphicsEnvironment { * within the available display area using getMaximumWindowBounds(). * @return the point where Windows should be centered * - * @exception HeadlessException if isHeadless() returns true + * @throws HeadlessException if isHeadless() returns true * @see #getMaximumWindowBounds * @since 1.4 */ @@ -409,7 +409,7 @@ public abstract class GraphicsEnvironment { * {@code Toolkit.getScreenInsets()}. * @return the maximum bounds for centered Windows * - * @exception HeadlessException if isHeadless() returns true + * @throws HeadlessException if isHeadless() returns true * @see #getCenterPoint * @see GraphicsConfiguration#getBounds * @see Toolkit#getScreenInsets diff --git a/src/java.desktop/share/classes/java/awt/GridBagLayout.java b/src/java.desktop/share/classes/java/awt/GridBagLayout.java index ff3bec8b1153e36fe2db7d0021452ce0354f3c17..e0692ac0624bb5990201b4fd8745f0973b24c101 100644 --- a/src/java.desktop/share/classes/java/awt/GridBagLayout.java +++ b/src/java.desktop/share/classes/java/awt/GridBagLayout.java @@ -688,7 +688,7 @@ java.io.Serializable { * @param comp the component to be added * @param constraints an object that determines how * the component is added to the layout - * @exception IllegalArgumentException if {@code constraints} + * @throws IllegalArgumentException if {@code constraints} * is not a {@code GridBagConstraint} */ public void addLayoutComponent(Component comp, Object constraints) { diff --git a/src/java.desktop/share/classes/java/awt/GridBagLayoutInfo.java b/src/java.desktop/share/classes/java/awt/GridBagLayoutInfo.java index 64a283546c52aa374323b19a4ef5cc41687f153f..1a4ed2942c505ec03709717fbfaba12a6d39652a 100644 --- a/src/java.desktop/share/classes/java/awt/GridBagLayoutInfo.java +++ b/src/java.desktop/share/classes/java/awt/GridBagLayoutInfo.java @@ -36,7 +36,7 @@ import java.io.Serial; * @see java.awt.GridBagConstraints * @since 1.6 */ -public class GridBagLayoutInfo implements java.io.Serializable { +public final class GridBagLayoutInfo implements java.io.Serializable { /** * Use serialVersionUID from JDK 1.6 for interoperability. diff --git a/src/java.desktop/share/classes/java/awt/GridLayout.java b/src/java.desktop/share/classes/java/awt/GridLayout.java index 4a3b66f4332e86c243260761106a083200453d5e..5c9265bc91214d8d0ca2fa3b977741985dcc3cac 100644 --- a/src/java.desktop/share/classes/java/awt/GridLayout.java +++ b/src/java.desktop/share/classes/java/awt/GridLayout.java @@ -186,7 +186,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable { * any number of columns * @param hgap the horizontal gap * @param vgap the vertical gap - * @exception IllegalArgumentException if the value of both + * @throws IllegalArgumentException if the value of both * {@code rows} and {@code cols} is * set to zero */ @@ -212,7 +212,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable { /** * Sets the number of rows in this layout to the specified value. * @param rows the number of rows in this layout - * @exception IllegalArgumentException if the value of both + * @throws IllegalArgumentException if the value of both * {@code rows} and {@code cols} is set to zero * @since 1.1 */ @@ -240,7 +240,7 @@ public class GridLayout implements LayoutManager, java.io.Serializable { * of columns displayed in the layout is determined by the total * number of components and the number of rows specified. * @param cols the number of columns in this layout - * @exception IllegalArgumentException if the value of both + * @throws IllegalArgumentException if the value of both * {@code rows} and {@code cols} is set to zero * @since 1.1 */ diff --git a/src/java.desktop/share/classes/java/awt/Image.java b/src/java.desktop/share/classes/java/awt/Image.java index 7e6273232694a0a3e6f5ecb14b6956316a81329d..1ad4ec9226f07c4549ea001fde8e02f4a31cf96f 100644 --- a/src/java.desktop/share/classes/java/awt/Image.java +++ b/src/java.desktop/share/classes/java/awt/Image.java @@ -105,7 +105,7 @@ public abstract class Image { * Creates a graphics context for drawing to an off-screen image. * This method can only be called for off-screen images. * @return a graphics context to draw to the off-screen image. - * @exception UnsupportedOperationException if called for a + * @throws UnsupportedOperationException if called for a * non-off-screen image. * @see java.awt.Graphics * @see java.awt.Component#createImage(int, int) @@ -162,7 +162,7 @@ public abstract class Image { * @param hints flags to indicate the type of algorithm to use * for image resampling. * @return a scaled version of the image. - * @exception IllegalArgumentException if {@code width} + * @throws IllegalArgumentException if {@code width} * or {@code height} is zero. * @see java.awt.Image#SCALE_DEFAULT * @see java.awt.Image#SCALE_FAST diff --git a/src/java.desktop/share/classes/java/awt/Label.java b/src/java.desktop/share/classes/java/awt/Label.java index b061efb51700631abef5c58954a7234bcbb1609d..ad8ff4c2b828c17c8bf93ec041ca5fd2a8ed7c28 100644 --- a/src/java.desktop/share/classes/java/awt/Label.java +++ b/src/java.desktop/share/classes/java/awt/Label.java @@ -114,7 +114,7 @@ public class Label extends Component implements Accessible { /** * Constructs an empty label. * The text of the label is the empty string {@code ""}. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -129,7 +129,7 @@ public class Label extends Component implements Accessible { * A {@code null} value * will be accepted without causing a NullPointerException * to be thrown. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -147,7 +147,7 @@ public class Label extends Component implements Accessible { * will be accepted without causing a NullPointerException * to be thrown. * @param alignment the alignment value. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -216,7 +216,7 @@ public class Label extends Component implements Accessible { * Possible values are {@code Label.LEFT}, * {@code Label.RIGHT}, and {@code Label.CENTER}. * @param alignment the alignment to be set. - * @exception IllegalArgumentException if an improper value for + * @throws IllegalArgumentException if an improper value for * {@code alignment} is given. * @see java.awt.Label#getAlignment */ diff --git a/src/java.desktop/share/classes/java/awt/List.java b/src/java.desktop/share/classes/java/awt/List.java index f29374ab6bc062101dd13632dd42eeccaa246a82..fe1a5dc5530434058afe64baa62341928b30b851 100644 --- a/src/java.desktop/share/classes/java/awt/List.java +++ b/src/java.desktop/share/classes/java/awt/List.java @@ -193,7 +193,7 @@ public class List extends Component implements ItemSelectable, Accessible { * not allowed. Note that this is a convenience method for * {@code List(0, false)}. Also note that the number of visible * lines in the list cannot be changed after it has been created. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -209,7 +209,7 @@ public class List extends Component implements ItemSelectable, Accessible { * of visible rows in the list cannot be changed after it has * been created. * @param rows the number of items to show. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.1 @@ -238,7 +238,7 @@ public class List extends Component implements ItemSelectable, Accessible { * @param multipleMode if {@code true}, * then multiple selections are allowed; * otherwise, only one item can be selected at a time. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -411,7 +411,7 @@ public class List extends Component implements ItemSelectable, Accessible { * with the new string. * @param newValue a new string to replace an existing item * @param index the position of the item to replace - * @exception ArrayIndexOutOfBoundsException if {@code index} + * @throws ArrayIndexOutOfBoundsException if {@code index} * is out of range */ public synchronized void replaceItem(String newValue, int index) { @@ -448,7 +448,7 @@ public class List extends Component implements ItemSelectable, Accessible { * If the specified item is selected, and is the only selected * item in the list, the list is set to have no selection. * @param item the item to remove from the list - * @exception IllegalArgumentException + * @throws IllegalArgumentException * if the item doesn't exist in the list * @since 1.1 */ @@ -470,7 +470,7 @@ public class List extends Component implements ItemSelectable, Accessible { * @param position the index of the item to delete * @see #add(String, int) * @since 1.1 - * @exception ArrayIndexOutOfBoundsException + * @throws ArrayIndexOutOfBoundsException * if the {@code position} is less than 0 or * greater than {@code getItemCount()-1} */ @@ -1053,7 +1053,7 @@ public class List extends Component implements ItemSelectable, Accessible { * FooListeners on this list, * or an empty array if no such * listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * @@ -1631,7 +1631,7 @@ public class List extends Component implements ItemSelectable, Accessible { * @return This component's locale. If this component does not have * a locale, the locale of its parent is returned. * - * @exception IllegalComponentStateException + * @throws IllegalComponentStateException * If the Component does not have its own locale and has not yet * been added to a containment hierarchy such that the locale can * be determined from the containing parent. diff --git a/src/java.desktop/share/classes/java/awt/MediaTracker.java b/src/java.desktop/share/classes/java/awt/MediaTracker.java index e2b754c40afd3b2c55469b7a8d6be8e74739ded3..37e372d0d1f6b521031f1090ff4e5ade3e8dbbc6 100644 --- a/src/java.desktop/share/classes/java/awt/MediaTracker.java +++ b/src/java.desktop/share/classes/java/awt/MediaTracker.java @@ -396,7 +396,7 @@ public class MediaTracker implements java.io.Serializable { * @see java.awt.MediaTracker#waitForAll(long) * @see java.awt.MediaTracker#isErrorAny * @see java.awt.MediaTracker#isErrorID - * @exception InterruptedException if any thread has + * @throws InterruptedException if any thread has * interrupted this thread */ public void waitForAll() throws InterruptedException { @@ -421,7 +421,7 @@ public class MediaTracker implements java.io.Serializable { * @see java.awt.MediaTracker#waitForAll(long) * @see java.awt.MediaTracker#isErrorAny * @see java.awt.MediaTracker#isErrorID - * @exception InterruptedException if any thread has + * @throws InterruptedException if any thread has * interrupted this thread. */ public synchronized boolean waitForAll(long ms) @@ -627,7 +627,7 @@ public class MediaTracker implements java.io.Serializable { * @see java.awt.MediaTracker#waitForAll * @see java.awt.MediaTracker#isErrorAny() * @see java.awt.MediaTracker#isErrorID(int) - * @exception InterruptedException if any thread has + * @throws InterruptedException if any thread has * interrupted this thread. */ public void waitForID(int id) throws InterruptedException { @@ -655,7 +655,7 @@ public class MediaTracker implements java.io.Serializable { * @see java.awt.MediaTracker#statusID * @see java.awt.MediaTracker#isErrorAny() * @see java.awt.MediaTracker#isErrorID(int) - * @exception InterruptedException if any thread has + * @throws InterruptedException if any thread has * interrupted this thread. */ public synchronized boolean waitForID(int id, long ms) diff --git a/src/java.desktop/share/classes/java/awt/Menu.java b/src/java.desktop/share/classes/java/awt/Menu.java index 5f24c7cb8bdd8e72965b41d1b1c0c0660e79b279..79c3dfe0d82dd6c417d76d76ae9aac0c9c9cad50 100644 --- a/src/java.desktop/share/classes/java/awt/Menu.java +++ b/src/java.desktop/share/classes/java/awt/Menu.java @@ -125,7 +125,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible { /** * Constructs a new menu with an empty label. This menu is not * a tear-off menu. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.1 @@ -139,7 +139,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible { * a tear-off menu. * @param label the menu's label in the menu bar, or in * another menu of which this menu is a submenu. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -158,7 +158,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible { * another menu of which this menu is a submenu. * @param tearOff if {@code true}, the menu * is a tear-off menu. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -313,7 +313,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible { * item should be inserted. * @see java.awt.Menu#add(java.lang.String) * @see java.awt.Menu#add(java.awt.MenuItem) - * @exception IllegalArgumentException if the value of + * @throws IllegalArgumentException if the value of * {@code index} is less than zero * @since 1.1 */ @@ -357,7 +357,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible { * should be inserted * @see java.awt.Menu#add(java.lang.String) * @see java.awt.Menu#add(java.awt.MenuItem) - * @exception IllegalArgumentException if the value of + * @throws IllegalArgumentException if the value of * {@code index} is less than zero * @since 1.1 */ @@ -378,7 +378,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible { * Inserts a separator at the specified position. * @param index the position at which the * menu separator should be inserted. - * @exception IllegalArgumentException if the value of + * @throws IllegalArgumentException if the value of * {@code index} is less than 0. * @see java.awt.Menu#addSeparator * @since 1.1 diff --git a/src/java.desktop/share/classes/java/awt/MenuBar.java b/src/java.desktop/share/classes/java/awt/MenuBar.java index 2f78371407aa67869ba076feef67d778b8daa374..c1016f5bd0b2f15236438dcefcf05c24ea129046 100644 --- a/src/java.desktop/share/classes/java/awt/MenuBar.java +++ b/src/java.desktop/share/classes/java/awt/MenuBar.java @@ -127,7 +127,7 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible /** * Creates a new menu bar. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ diff --git a/src/java.desktop/share/classes/java/awt/MenuComponent.java b/src/java.desktop/share/classes/java/awt/MenuComponent.java index 2550eea7f520f3f4eab189678a4e594d248cf47b..a2d28fb9e3e3d606eeb306586d2b117616b42bdf 100644 --- a/src/java.desktop/share/classes/java/awt/MenuComponent.java +++ b/src/java.desktop/share/classes/java/awt/MenuComponent.java @@ -176,7 +176,7 @@ public abstract class MenuComponent implements java.io.Serializable { /** * Creates a {@code MenuComponent}. - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless diff --git a/src/java.desktop/share/classes/java/awt/MenuItem.java b/src/java.desktop/share/classes/java/awt/MenuItem.java index d1f6f59aa156bb4b8e8dd91af3ab53db11011fd6..adc37db7111a4c76fc0591ccccebe62677f5a84e 100644 --- a/src/java.desktop/share/classes/java/awt/MenuItem.java +++ b/src/java.desktop/share/classes/java/awt/MenuItem.java @@ -185,7 +185,7 @@ public class MenuItem extends MenuComponent implements Accessible { /** * Constructs a new MenuItem with an empty label and no keyboard * shortcut. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.1 @@ -201,7 +201,7 @@ public class MenuItem extends MenuComponent implements Accessible { * menu items. By default, all menu items except for * separators are enabled. * @param label the label for this menu item. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.0 @@ -218,7 +218,7 @@ public class MenuItem extends MenuComponent implements Accessible { * @param label the label for this menu item. * @param s the instance of {@code MenuShortcut} * associated with this menu item. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.1 @@ -616,7 +616,7 @@ public class MenuItem extends MenuComponent implements Accessible { * FooListeners on this menu item, * or an empty array if no such * listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * diff --git a/src/java.desktop/share/classes/java/awt/MouseInfo.java b/src/java.desktop/share/classes/java/awt/MouseInfo.java index 76b5ed6e39747b28de073524f6fa325f359dcaf3..3dd115e0724f98719e910cfa96df52efb0fd0794 100644 --- a/src/java.desktop/share/classes/java/awt/MouseInfo.java +++ b/src/java.desktop/share/classes/java/awt/MouseInfo.java @@ -62,8 +62,8 @@ public class MouseInfo { * permission before creating and returning a {@code PointerInfo} * object. This may result in a {@code SecurityException}. * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true - * @exception SecurityException if a security manager exists and its + * @throws HeadlessException if GraphicsEnvironment.isHeadless() returns true + * @throws SecurityException if a security manager exists and its * {@code checkPermission} method doesn't allow the operation * @see GraphicsConfiguration * @see SecurityManager#checkPermission @@ -124,7 +124,7 @@ public class MouseInfo { * by requesting the {@code "awt.mouse.numButtons"} desktop property * which is set by the underlying native platform. * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true + * @throws HeadlessException if GraphicsEnvironment.isHeadless() returns true * @return number of buttons on the mouse * @see Toolkit#getDesktopProperty * @since 1.5 diff --git a/src/java.desktop/share/classes/java/awt/PointerInfo.java b/src/java.desktop/share/classes/java/awt/PointerInfo.java index 9b51d6ead3670126b10d85a21c72099e53813bd3..7d74d884cf0d36a604e31167f17b2fd2c6550d50 100644 --- a/src/java.desktop/share/classes/java/awt/PointerInfo.java +++ b/src/java.desktop/share/classes/java/awt/PointerInfo.java @@ -41,7 +41,7 @@ package java.awt; * @author Roman Poborchiy * @since 1.5 */ -public class PointerInfo { +public final class PointerInfo { private final GraphicsDevice device; private final Point location; diff --git a/src/java.desktop/share/classes/java/awt/Polygon.java b/src/java.desktop/share/classes/java/awt/Polygon.java index 64f049cd1c7f7a95362c8c38c5bba02ea1dff420..e74ce5cb10faae4c97860a9495d15eb761e0fb1d 100644 --- a/src/java.desktop/share/classes/java/awt/Polygon.java +++ b/src/java.desktop/share/classes/java/awt/Polygon.java @@ -139,12 +139,12 @@ public class Polygon implements Shape, java.io.Serializable { * @param ypoints an array of Y coordinates * @param npoints the total number of points in the * {@code Polygon} - * @exception NegativeArraySizeException if the value of + * @throws NegativeArraySizeException if the value of * {@code npoints} is negative. - * @exception IndexOutOfBoundsException if {@code npoints} is + * @throws IndexOutOfBoundsException if {@code npoints} is * greater than the length of {@code xpoints} * or the length of {@code ypoints}. - * @exception NullPointerException if {@code xpoints} or + * @throws NullPointerException if {@code xpoints} or * {@code ypoints} is {@code null}. * @since 1.0 */ diff --git a/src/java.desktop/share/classes/java/awt/PopupMenu.java b/src/java.desktop/share/classes/java/awt/PopupMenu.java index fd56461df555ce617b7bfbea82c1cae85afe33d5..e9b88d2a12f4b2c4cf64b34b3cc0cd70243fa7d2 100644 --- a/src/java.desktop/share/classes/java/awt/PopupMenu.java +++ b/src/java.desktop/share/classes/java/awt/PopupMenu.java @@ -69,7 +69,7 @@ public class PopupMenu extends Menu { /** * Creates a new popup menu with an empty name. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -82,7 +82,7 @@ public class PopupMenu extends Menu { * * @param label a non-{@code null} string specifying * the popup menu's label - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -149,12 +149,12 @@ public class PopupMenu extends Menu { * @param origin the component which defines the coordinate space * @param x the x coordinate position to popup the menu * @param y the y coordinate position to popup the menu - * @exception NullPointerException if the parent is {@code null} - * @exception IllegalArgumentException if this {@code PopupMenu} + * @throws NullPointerException if the parent is {@code null} + * @throws IllegalArgumentException if this {@code PopupMenu} * has a non-{@code Component} parent - * @exception IllegalArgumentException if the origin is not in the + * @throws IllegalArgumentException if the origin is not in the * parent's hierarchy - * @exception RuntimeException if the parent is not showing on screen + * @throws RuntimeException if the parent is not showing on screen */ @SuppressWarnings("deprecation") public void show(Component origin, int x, int y) { diff --git a/src/java.desktop/share/classes/java/awt/RenderingHints.java b/src/java.desktop/share/classes/java/awt/RenderingHints.java index d69ed339eee1cd108cca05bc2b3b589aeb33712b..46d2fda103198c9bac6138a6d4c1470f006078d1 100644 --- a/src/java.desktop/share/classes/java/awt/RenderingHints.java +++ b/src/java.desktop/share/classes/java/awt/RenderingHints.java @@ -1064,7 +1064,7 @@ public class RenderingHints * {@code RenderingHints} is to be tested. * @return {@code true} if this {@code RenderingHints} * contains a mapping for the specified key. - * @exception ClassCastException if the key can not + * @throws ClassCastException if the key can not * be cast to {@code RenderingHints.Key} */ public boolean containsKey(Object key) { @@ -1099,7 +1099,7 @@ public class RenderingHints * @return the value to which the key is mapped in this object or * {@code null} if the key is not mapped to any value in * this object. - * @exception ClassCastException if the key can not + * @throws ClassCastException if the key can not * be cast to {@code RenderingHints.Key} * @see #put(Object, Object) */ @@ -1117,11 +1117,11 @@ public class RenderingHints * @param value the rendering hint value. * @return the previous value of the specified key in this object * or {@code null} if it did not have one. - * @exception NullPointerException if the key is + * @throws NullPointerException if the key is * {@code null}. - * @exception ClassCastException if the key can not + * @throws ClassCastException if the key can not * be cast to {@code RenderingHints.Key} - * @exception IllegalArgumentException if the + * @throws IllegalArgumentException if the * {@link Key#isCompatibleValue(java.lang.Object) * Key.isCompatibleValue()} * method of the specified key returns false for the @@ -1163,7 +1163,7 @@ public class RenderingHints * {@code RenderingHints} object. This method does nothing if the * key is not in this {@code RenderingHints} object. * @param key the rendering hints key that needs to be removed - * @exception ClassCastException if the key can not + * @throws ClassCastException if the key can not * be cast to {@code RenderingHints.Key} * @return the value to which the key had previously been mapped in this * {@code RenderingHints} object, or {@code null} @@ -1179,10 +1179,10 @@ public class RenderingHints * any mappings that this {@code RenderingHints} had for any * of the keys currently in the specified {@code Map}. * @param m the specified {@code Map} - * @exception ClassCastException class of a key or value + * @throws ClassCastException class of a key or value * in the specified {@code Map} prevents it from being * stored in this {@code RenderingHints}. - * @exception IllegalArgumentException some aspect + * @throws IllegalArgumentException some aspect * of a key or value in the specified {@code Map} * prevents it from being stored in * this {@code RenderingHints}. diff --git a/src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java b/src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java index d2b3eebdebb3b4a5cec1e56bac1bfd9c39dea54c..d8d70fd2476d565e494bc0927c38a1d8f986e0a6 100644 --- a/src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java +++ b/src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java @@ -40,7 +40,7 @@ import sun.awt.AWTAccessor; * * @since 1.4 */ -public class ScrollPaneAdjustable implements Adjustable, Serializable { +public final class ScrollPaneAdjustable implements Adjustable, Serializable { /** * The {@code ScrollPane} this object is a scrollbar of. diff --git a/src/java.desktop/share/classes/java/awt/Scrollbar.java b/src/java.desktop/share/classes/java/awt/Scrollbar.java index 34cd3ecc79934186f15fa998ac8895e2fa9352ad..c8f100cc1c28f35e4ffbe1d6898e754bf3a9db99 100644 --- a/src/java.desktop/share/classes/java/awt/Scrollbar.java +++ b/src/java.desktop/share/classes/java/awt/Scrollbar.java @@ -349,7 +349,7 @@ public class Scrollbar extends Component implements Adjustable, Accessible { * * * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -366,9 +366,9 @@ public class Scrollbar extends Component implements Adjustable, Accessible { * indicating a horizontal or vertical scroll bar, respectively. * * @param orientation indicates the orientation of the scroll bar - * @exception IllegalArgumentException when an illegal value for + * @throws IllegalArgumentException when an illegal value for * the {@code orientation} argument is supplied - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -394,9 +394,9 @@ public class Scrollbar extends Component implements Adjustable, Accessible { * represented by the size of the bubble * @param minimum the minimum value of the scroll bar * @param maximum the maximum value of the scroll bar - * @exception IllegalArgumentException when an illegal value for + * @throws IllegalArgumentException when an illegal value for * the {@code orientation} argument is supplied - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see #setValues * @see java.awt.GraphicsEnvironment#isHeadless @@ -457,7 +457,7 @@ public class Scrollbar extends Component implements Adjustable, Accessible { * {@code Scrollbar.HORIZONTAL} or * {@code Scrollbar.VERTICAL} * @see java.awt.Scrollbar#getOrientation - * @exception IllegalArgumentException if the value supplied + * @throws IllegalArgumentException if the value supplied * for {@code orientation} is not a * legal value * @since 1.1 @@ -1062,7 +1062,7 @@ public class Scrollbar extends Component implements Adjustable, Accessible { * @return an array of all objects registered as * FooListeners on this component, * or an empty array if no such listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * diff --git a/src/java.desktop/share/classes/java/awt/TextArea.java b/src/java.desktop/share/classes/java/awt/TextArea.java index 5e3e5ca6b331ae3ead354742bb8d7112cbd98aee..fcf37543e5b524e349f249ab15a5c75cc462685c 100644 --- a/src/java.desktop/share/classes/java/awt/TextArea.java +++ b/src/java.desktop/share/classes/java/awt/TextArea.java @@ -55,7 +55,7 @@ import javax.accessibility.AccessibleStateSet; * @author Sami Shaio * @since 1.0 */ -public class TextArea extends TextComponent { +public non-sealed class TextArea extends TextComponent { /** * The number of rows in the {@code TextArea}. @@ -157,7 +157,7 @@ public class TextArea extends TextComponent { * This text area is created with scrollbar visibility equal to * {@link #SCROLLBARS_BOTH}, so both vertical and horizontal * scrollbars will be visible for this text area. - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} returns true * @see java.awt.GraphicsEnvironment#isHeadless() */ @@ -173,7 +173,7 @@ public class TextArea extends TextComponent { * @param text the text to be displayed; if * {@code text} is {@code null}, the empty * string {@code ""} will be displayed - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} returns true * @see java.awt.GraphicsEnvironment#isHeadless() */ @@ -191,7 +191,7 @@ public class TextArea extends TextComponent { * text area. * @param rows the number of rows * @param columns the number of columns - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} returns true * @see java.awt.GraphicsEnvironment#isHeadless() */ @@ -212,7 +212,7 @@ public class TextArea extends TextComponent { * string {@code ""} will be displayed * @param rows the number of rows * @param columns the number of columns - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} returns true * @see java.awt.GraphicsEnvironment#isHeadless() */ @@ -252,7 +252,7 @@ public class TextArea extends TextComponent { * @param scrollbars a constant that determines what * scrollbars are created to view the text area * @since 1.1 - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} returns true * @see java.awt.GraphicsEnvironment#isHeadless() */ @@ -421,7 +421,7 @@ public class TextArea extends TextComponent { * @param rows the number of rows * @see #getRows() * @see #setColumns(int) - * @exception IllegalArgumentException if the value + * @throws IllegalArgumentException if the value * supplied for {@code rows} * is less than {@code 0} * @since 1.1 @@ -452,7 +452,7 @@ public class TextArea extends TextComponent { * @param columns the number of columns * @see #getColumns() * @see #setRows(int) - * @exception IllegalArgumentException if the value + * @throws IllegalArgumentException if the value * supplied for {@code columns} * is less than {@code 0} * @since 1.1 diff --git a/src/java.desktop/share/classes/java/awt/TextComponent.java b/src/java.desktop/share/classes/java/awt/TextComponent.java index 5dc8d4068cc7bfa0007fd7b0249abe0cf9c59240..b1ccc9bd87a79b991ccc4ce3c3b32598ba4835fe 100644 --- a/src/java.desktop/share/classes/java/awt/TextComponent.java +++ b/src/java.desktop/share/classes/java/awt/TextComponent.java @@ -67,7 +67,9 @@ import sun.awt.InputMethodSupport; * @author Arthur van Hoff * @since 1.0 */ -public class TextComponent extends Component implements Accessible { +public sealed class TextComponent extends Component implements Accessible + permits TextArea, + TextField { /** * The value of the text. @@ -137,7 +139,7 @@ public class TextComponent extends Component implements Accessible { * @param text the text to be displayed; if * {@code text} is {@code null}, the empty * string {@code ""} will be displayed - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} * returns true * @see java.awt.GraphicsEnvironment#isHeadless @@ -511,7 +513,7 @@ public class TextComponent extends Component implements Accessible { * is thrown. * * @param position the position of the text insertion caret - * @exception IllegalArgumentException if {@code position} + * @throws IllegalArgumentException if {@code position} * is less than zero * @since 1.1 */ @@ -645,7 +647,7 @@ public class TextComponent extends Component implements Accessible { * FooListeners on this text component, * or an empty array if no such * listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * diff --git a/src/java.desktop/share/classes/java/awt/TextField.java b/src/java.desktop/share/classes/java/awt/TextField.java index 5ca720ee80ef95ecaf7826e06899da202f0eeee3..0d74f238a87c8495cde6df75489e1db164c2610f 100644 --- a/src/java.desktop/share/classes/java/awt/TextField.java +++ b/src/java.desktop/share/classes/java/awt/TextField.java @@ -99,7 +99,7 @@ import javax.accessibility.AccessibleStateSet; * @see java.awt.TextField#addActionListener * @since 1.0 */ -public class TextField extends TextComponent { +public non-sealed class TextField extends TextComponent { /** * The number of columns in the text field. @@ -152,7 +152,7 @@ public class TextField extends TextComponent { /** * Constructs a new text field. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -167,7 +167,7 @@ public class TextField extends TextComponent { * string {@code ""} will be displayed. * If {@code text} contains EOL and/or LF characters, then * each will be replaced by space character. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -182,7 +182,7 @@ public class TextField extends TextComponent { * @param columns the number of columns. If * {@code columns} is less than {@code 0}, * {@code columns} is set to {@code 0}. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -203,7 +203,7 @@ public class TextField extends TextComponent { * @param columns the number of columns. If * {@code columns} is less than {@code 0}, * {@code columns} is set to {@code 0}. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -369,7 +369,7 @@ public class TextField extends TextComponent { * approximate average character width that is platform-dependent. * @param columns the number of columns. * @see java.awt.TextField#getColumns - * @exception IllegalArgumentException if the value + * @throws IllegalArgumentException if the value * supplied for {@code columns} * is less than {@code 0}. * @since 1.1 @@ -585,7 +585,7 @@ public class TextField extends TextComponent { * FooListeners on this textfield, * or an empty array if no such * listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * diff --git a/src/java.desktop/share/classes/java/awt/Toolkit.java b/src/java.desktop/share/classes/java/awt/Toolkit.java index f3f4bcbb5c83041723e4d10ae329ab77dbcd2362..7399ced02bb463ebe410e5acbaa5dde65e98cc46 100644 --- a/src/java.desktop/share/classes/java/awt/Toolkit.java +++ b/src/java.desktop/share/classes/java/awt/Toolkit.java @@ -149,7 +149,7 @@ public abstract class Toolkit { * with the current system color values. * * @param systemColors an integer array. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.1 @@ -181,7 +181,7 @@ public abstract class Toolkit { * @param dynamic If true, Containers should re-layout their * components as the Container is being resized. If false, * the layout will be validated after resizing is completed. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see #isDynamicLayoutSet() * @see #isDynamicLayoutActive() @@ -208,7 +208,7 @@ public abstract class Toolkit { * * @return true if validation of Containers is done dynamically, * false if validation is done after resizing is finished. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see #setDynamicLayout(boolean dynamic) * @see #isDynamicLayoutActive() @@ -274,7 +274,7 @@ public abstract class Toolkit { * available from {@code GraphicsConfiguration} and * {@code GraphicsDevice}. * @return the size of this toolkit's screen, in pixels. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsConfiguration#getBounds * @see java.awt.GraphicsDevice#getDisplayMode @@ -286,7 +286,7 @@ public abstract class Toolkit { /** * Returns the screen resolution in dots-per-inch. * @return this toolkit's screen resolution, in dots-per-inch. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -297,7 +297,7 @@ public abstract class Toolkit { * Gets the insets of the screen. * @param gc a {@code GraphicsConfiguration} * @return the insets of this toolkit's screen, in pixels. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.4 @@ -324,7 +324,7 @@ public abstract class Toolkit { * {@code getColorModel} method * of the {@code Component} class. * @return the color model of this toolkit's screen. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.image.ColorModel @@ -973,7 +973,7 @@ public abstract class Toolkit { * checkPermission} method to check {@code AWTPermission("accessClipboard")}. * * @return the system Clipboard - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.datatransfer.Clipboard @@ -1020,7 +1020,7 @@ public abstract class Toolkit { * @return the system selection as a {@code Clipboard}, or * {@code null} if the native platform does not support a * system selection {@code Clipboard} - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * * @see java.awt.datatransfer.Clipboard @@ -1057,7 +1057,7 @@ public abstract class Toolkit { * Control key isn't the correct key for accelerators. * @return the modifier mask on the {@code Event} class * that is used for menu shortcuts on this toolkit. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.MenuBar @@ -1111,12 +1111,12 @@ public abstract class Toolkit { * @param keyCode the key code * @return {@code true} if the given key is currently in its "on" state; * otherwise {@code false} - * @exception java.lang.IllegalArgumentException if {@code keyCode} + * @throws java.lang.IllegalArgumentException if {@code keyCode} * is not one of the valid key codes - * @exception java.lang.UnsupportedOperationException if the host system doesn't + * @throws java.lang.UnsupportedOperationException if the host system doesn't * allow getting the state of this key programmatically, or if the keyboard * doesn't have this key - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.3 @@ -1147,12 +1147,12 @@ public abstract class Toolkit { * * @param keyCode the key code * @param on the state of the key - * @exception java.lang.IllegalArgumentException if {@code keyCode} + * @throws java.lang.IllegalArgumentException if {@code keyCode} * is not one of the valid key codes - * @exception java.lang.UnsupportedOperationException if the host system doesn't + * @throws java.lang.UnsupportedOperationException if the host system doesn't * allow setting the state of this key programmatically, or if the keyboard * doesn't have this key - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.3 @@ -1193,10 +1193,10 @@ public abstract class Toolkit { * hotSpot values must be less than the Dimension returned by * {@code getBestCursorSize} * @param name a localized description of the cursor, for Java Accessibility use - * @exception IndexOutOfBoundsException if the hotSpot values are outside + * @throws IndexOutOfBoundsException if the hotSpot values are outside * the bounds of the cursor * @return the cursor created - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.2 @@ -1232,7 +1232,7 @@ public abstract class Toolkit { * to use. * @return the closest matching supported cursor size, or a dimension of 0,0 if * the Toolkit implementation doesn't support custom cursors. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.2 @@ -1262,7 +1262,7 @@ public abstract class Toolkit { * * @return the maximum number of colors, or zero if custom cursors are not * supported by this Toolkit implementation. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.2 @@ -1310,7 +1310,7 @@ public abstract class Toolkit { * @param state one of named frame state constants. * @return {@code true} is this frame state is supported by * this Toolkit implementation, {@code false} otherwise. - * @exception HeadlessException + * @throws HeadlessException * if {@code GraphicsEnvironment.isHeadless()} * returns {@code true}. * @see java.awt.Window#addWindowStateListener @@ -2203,7 +2203,7 @@ public abstract class Toolkit { * returned is unmodifiable. * @param highlight input method highlight * @return style attribute map, or {@code null} - * @exception HeadlessException if + * @throws HeadlessException if * {@code GraphicsEnvironment.isHeadless} returns true * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.3 @@ -2360,7 +2360,7 @@ public abstract class Toolkit { * initialized with {@code true}. * Changing this value after the {@code Toolkit} class initialization will have no effect. * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true + * @throws HeadlessException if GraphicsEnvironment.isHeadless() returns true * @return {@code true} if events from extra mouse buttons are allowed to be processed and posted; * {@code false} otherwise * @see System#getProperty(String propertyName) diff --git a/src/java.desktop/share/classes/java/awt/Window.java b/src/java.desktop/share/classes/java/awt/Window.java index 59e63abbb3ca4d958027e0931ba4f9348858ec84..c58b2a5e94a3d0211a0e179bb56a72d3a40935e5 100644 --- a/src/java.desktop/share/classes/java/awt/Window.java +++ b/src/java.desktop/share/classes/java/awt/Window.java @@ -442,9 +442,9 @@ public class Window extends Container implements Accessible { * @param gc the {@code GraphicsConfiguration} of the target screen * device. If {@code gc} is {@code null}, the system default * {@code GraphicsConfiguration} is assumed - * @exception IllegalArgumentException if {@code gc} + * @throws IllegalArgumentException if {@code gc} * is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.GraphicsEnvironment#isHeadless @@ -544,7 +544,7 @@ public class Window extends Container implements Accessible { * If that check fails with a {@code SecurityException} then a warning * banner is created. * - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns {@code true} * * @see java.awt.GraphicsEnvironment#isHeadless @@ -566,9 +566,9 @@ public class Window extends Container implements Accessible { * * @param owner the {@code Frame} to act as owner or {@code null} * if this window has no owner - * @exception IllegalArgumentException if the {@code owner}'s + * @throws IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless} returns {@code true} * * @see java.awt.GraphicsEnvironment#isHeadless @@ -593,9 +593,9 @@ public class Window extends Container implements Accessible { * * @param owner the {@code Window} to act as owner or * {@code null} if this window has no owner - * @exception IllegalArgumentException if the {@code owner}'s + * @throws IllegalArgumentException if the {@code owner}'s * {@code GraphicsConfiguration} is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns * {@code true} * @@ -627,9 +627,9 @@ public class Window extends Container implements Accessible { * @param gc the {@code GraphicsConfiguration} of the target * screen device; if {@code gc} is {@code null}, * the system default {@code GraphicsConfiguration} is assumed - * @exception IllegalArgumentException if {@code gc} + * @throws IllegalArgumentException if {@code gc} * is not from a screen device - * @exception HeadlessException when + * @throws HeadlessException when * {@code GraphicsEnvironment.isHeadless()} returns * {@code true} * @@ -1964,10 +1964,10 @@ public class Window extends Container implements Accessible { * FooListeners on this window, * or an empty array if no such * listeners have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} - * @exception NullPointerException if {@code listenerType} is {@code null} + * @throws NullPointerException if {@code listenerType} is {@code null} * * @see #getWindowListeners * @since 1.3 @@ -3372,8 +3372,8 @@ public class Window extends Container implements Accessible { * Each time this method is called, * the existing buffer strategy for this component is discarded. * @param numBuffers number of buffers to create - * @exception IllegalArgumentException if numBuffers is less than 1. - * @exception IllegalStateException if the component is not displayable + * @throws IllegalArgumentException if numBuffers is less than 1. + * @throws IllegalStateException if the component is not displayable * @see #isDisplayable * @see #getBufferStrategy * @since 1.4 @@ -3393,11 +3393,11 @@ public class Window extends Container implements Accessible { * @param numBuffers number of buffers to create, including the front buffer * @param caps the required capabilities for creating the buffer strategy; * cannot be {@code null} - * @exception AWTException if the capabilities supplied could not be + * @throws AWTException if the capabilities supplied could not be * supported or met; this may happen, for example, if there is not enough * accelerated memory currently available, or if page flipping is specified * but not possible. - * @exception IllegalArgumentException if numBuffers is less than 1, or if + * @throws IllegalArgumentException if numBuffers is less than 1, or if * caps is {@code null} * @see #getBufferStrategy * @since 1.4 diff --git a/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java b/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java index ff8e0745e19d77653bf0551261c300cc743e0703..278e53ae10a0674e5099bd89b4ab86f24e441baf 100644 --- a/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java +++ b/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java @@ -83,7 +83,9 @@ import sun.java2d.cmm.ProfileDeferralInfo; * * @see ICC_ColorSpace */ -public class ICC_Profile implements Serializable { +public sealed class ICC_Profile implements Serializable + permits ICC_ProfileGray, + ICC_ProfileRGB { /** * Use serialVersionUID from JDK 1.2 for interoperability. diff --git a/src/java.desktop/share/classes/java/awt/color/ICC_ProfileGray.java b/src/java.desktop/share/classes/java/awt/color/ICC_ProfileGray.java index 5df533ee47cb28aad201bf19b3ef9ae95efc75e7..b248e996c81c12a79b80114ed46ad03b7fc618ea 100644 --- a/src/java.desktop/share/classes/java/awt/color/ICC_ProfileGray.java +++ b/src/java.desktop/share/classes/java/awt/color/ICC_ProfileGray.java @@ -65,7 +65,7 @@ import sun.java2d.cmm.ProfileDeferralInfo; * The inverse transform is done by converting the PCS Y components to device * Gray via the inverse of the grayTRC. */ -public class ICC_ProfileGray extends ICC_Profile { +public final class ICC_ProfileGray extends ICC_Profile { /** * Use serialVersionUID from JDK 1.2 for interoperability. diff --git a/src/java.desktop/share/classes/java/awt/color/ICC_ProfileRGB.java b/src/java.desktop/share/classes/java/awt/color/ICC_ProfileRGB.java index 56c3e8a848cea8a32c4784261187af22a9b1919a..b3683a941ee9ca94b4c5d48e4cd8812e6a4066f4 100644 --- a/src/java.desktop/share/classes/java/awt/color/ICC_ProfileRGB.java +++ b/src/java.desktop/share/classes/java/awt/color/ICC_ProfileRGB.java @@ -80,7 +80,7 @@ import sun.java2d.cmm.ProfileDeferralInfo; * RGB components through the inverse of the above 3x3 matrix, and then * converting linear RGB to device RGB through inverses of the TRCs. */ -public class ICC_ProfileRGB extends ICC_Profile { +public final class ICC_ProfileRGB extends ICC_Profile { /** * Use serialVersionUID from JDK 1.2 for interoperability. diff --git a/src/java.desktop/share/classes/java/awt/desktop/AppEvent.java b/src/java.desktop/share/classes/java/awt/desktop/AppEvent.java index f2291b4c37b141bdba97cc7a84cbccde8a1aa57d..aeb1a83ea76f89cbcf13b0f0c62820cb15a7404f 100644 --- a/src/java.desktop/share/classes/java/awt/desktop/AppEvent.java +++ b/src/java.desktop/share/classes/java/awt/desktop/AppEvent.java @@ -37,7 +37,18 @@ import java.util.EventObject; * * @since 9 */ -public class AppEvent extends EventObject { +public sealed class AppEvent extends EventObject + permits AboutEvent, + AppForegroundEvent, + AppHiddenEvent, + AppReopenedEvent, + FilesEvent, + OpenURIEvent, + PreferencesEvent, + QuitEvent, + ScreenSleepEvent, + SystemSleepEvent, + UserSessionEvent { /** * Use serialVersionUID from JDK 9 for interoperability. diff --git a/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java b/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java index b53beb36230b0b864bf4eb15528977779bfd89da..9f07814f5ac90c29822b7d9dee9784bb9e48e255 100644 --- a/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java +++ b/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java @@ -38,7 +38,9 @@ import java.util.List; * * @since 9 */ -public class FilesEvent extends AppEvent { +public sealed class FilesEvent extends AppEvent + permits OpenFilesEvent, + PrintFilesEvent { /** * Use serialVersionUID from JDK 9 for interoperability. diff --git a/src/java.desktop/share/classes/java/awt/dnd/DragSource.java b/src/java.desktop/share/classes/java/awt/dnd/DragSource.java index 8bbdfc24c06bf8cbc2ed114895ca3086dfaf946c..71bf6d27c8341b6974aa1e1f1bc9b438b91ebeb5 100644 --- a/src/java.desktop/share/classes/java/awt/dnd/DragSource.java +++ b/src/java.desktop/share/classes/java/awt/dnd/DragSource.java @@ -217,7 +217,7 @@ public class DragSource implements Serializable { * the underlying platform. * * @return the platform DragSource - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -255,7 +255,7 @@ public class DragSource implements Serializable { /** * Creates a new {@code DragSource}. * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -682,7 +682,7 @@ public class DragSource implements Serializable { * FooListeners on this * {@code DragSource}, or an empty array if no such listeners * have been added - * @exception ClassCastException if {@code listenerType} + * @throws ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements * {@code java.util.EventListener} * diff --git a/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java b/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java index 7ba9c9711da065fa8a1950c3663d0fd71bdfa921..fbd086792a5bff6d04010cabf08a4782d0b586c6 100644 --- a/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java +++ b/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java @@ -89,7 +89,7 @@ public class DropTarget implements DropTargetListener, Serializable { * @param dtl The {@code DropTargetListener} for this {@code DropTarget} * @param act Is the {@code DropTarget} accepting drops. * @param fm The {@code FlavorMap} to use, or null for the default {@code FlavorMap} - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -136,7 +136,7 @@ public class DropTarget implements DropTargetListener, Serializable { * @param ops The default acceptable actions for this {@code DropTarget} * @param dtl The {@code DropTargetListener} for this {@code DropTarget} * @param act Is the {@code DropTarget} accepting drops. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -149,7 +149,7 @@ public class DropTarget implements DropTargetListener, Serializable { /** * Creates a {@code DropTarget}. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -165,7 +165,7 @@ public class DropTarget implements DropTargetListener, Serializable { * The Component will receive drops only if it is enabled. * @param c The {@code Component} with which this {@code DropTarget} is associated * @param dtl The {@code DropTargetListener} for this {@code DropTarget} - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -185,7 +185,7 @@ public class DropTarget implements DropTargetListener, Serializable { * @param c The {@code Component} with which this {@code DropTarget} is associated * @param ops The default acceptable actions for this {@code DropTarget} * @param dtl The {@code DropTargetListener} for this {@code DropTarget} - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless */ diff --git a/src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java b/src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java index 8eac26a5fd267d77a3663c9f7d6ce0556e44b94c..ea31203b98823ffd47c33fd930a6b1b54ba43785 100644 --- a/src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java +++ b/src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java @@ -53,7 +53,7 @@ import sun.awt.AWTAccessor.DropTargetContextAccessor; * @since 1.2 */ -public class DropTargetContext implements Serializable { +public final class DropTargetContext implements Serializable { /** * Use serialVersionUID from JDK 1.4 for interoperability. diff --git a/src/java.desktop/share/classes/java/awt/doc-files/FocusCycle.gif b/src/java.desktop/share/classes/java/awt/doc-files/FocusCycle.gif deleted file mode 100644 index 4777e217368b543b9594ef239dc441a48ce33f18..0000000000000000000000000000000000000000 Binary files a/src/java.desktop/share/classes/java/awt/doc-files/FocusCycle.gif and /dev/null differ diff --git a/src/java.desktop/share/classes/java/awt/doc-files/FocusCycle.svg b/src/java.desktop/share/classes/java/awt/doc-files/FocusCycle.svg new file mode 100644 index 0000000000000000000000000000000000000000..316ea25e7e6e2a244f1abfee94d79703bc2e3456 --- /dev/null +++ b/src/java.desktop/share/classes/java/awt/doc-files/FocusCycle.svg @@ -0,0 +1,173 @@ + + + + + + + + + + + A + + + B + + + C + + + D + + + E + + + F + + + G + + + H + + + + + + diff --git a/src/java.desktop/share/classes/java/awt/doc-files/FocusSpec.html b/src/java.desktop/share/classes/java/awt/doc-files/FocusSpec.html index 34528a15ae574fbbb09900228811ae09dcf6446b..94a4a7abdac6f89a18b58e69c0cbce8692725500 100644 --- a/src/java.desktop/share/classes/java/awt/doc-files/FocusSpec.html +++ b/src/java.desktop/share/classes/java/awt/doc-files/FocusSpec.html @@ -5,7 +5,7 @@ The AWT Focus Subsystem + + + + + A + + B + + C + + R + + + + + + + + diff --git a/src/java.desktop/share/classes/java/awt/doc-files/ImplicitFocusTransfer2.svg b/src/java.desktop/share/classes/java/awt/doc-files/ImplicitFocusTransfer2.svg new file mode 100644 index 0000000000000000000000000000000000000000..34fdbb89b65f905a27f8b0b1761244f5b0f0d6b4 --- /dev/null +++ b/src/java.desktop/share/classes/java/awt/doc-files/ImplicitFocusTransfer2.svg @@ -0,0 +1,114 @@ + + + + + + + + A + + B + + C + + R + + + + + + + diff --git a/src/java.desktop/share/classes/java/awt/doc-files/Modality.html b/src/java.desktop/share/classes/java/awt/doc-files/Modality.html index e20d9175fb775a7f8303327cd994efe51bedc1fd..88f9911cbc3ed751e9321a4ea8af58cbcad03192 100644 --- a/src/java.desktop/share/classes/java/awt/doc-files/Modality.html +++ b/src/java.desktop/share/classes/java/awt/doc-files/Modality.html @@ -387,7 +387,7 @@ same document

    - Example 1 + Example 1

    Example 2

    @@ -400,7 +400,7 @@ same document

    - Example 2 + Example 2

    Example 3

    @@ -418,7 +418,7 @@ Dii blocks Di

    - Example 3 + Example 3

    Example 4

    @@ -436,7 +436,7 @@
  • Di remains unblocked

    - Example 4 + Example 4


    diff --git a/src/java.desktop/share/classes/java/awt/doc-files/modal-example1.gif b/src/java.desktop/share/classes/java/awt/doc-files/modal-example1.gif deleted file mode 100644 index e6dfd56c8236e7a94438b84a47a93577e9cc5e61..0000000000000000000000000000000000000000 Binary files a/src/java.desktop/share/classes/java/awt/doc-files/modal-example1.gif and /dev/null differ diff --git a/src/java.desktop/share/classes/java/awt/doc-files/modal-example1.svg b/src/java.desktop/share/classes/java/awt/doc-files/modal-example1.svg new file mode 100644 index 0000000000000000000000000000000000000000..86856788b3223504cf3a8fac18676eb80ad63205 --- /dev/null +++ b/src/java.desktop/share/classes/java/awt/doc-files/modal-example1.svg @@ -0,0 +1,115 @@ + + + + + + + + + + F + 1 + + + Di + 2 + + + Dii + 3 + + + diff --git a/src/java.desktop/share/classes/java/awt/doc-files/modal-example2.gif b/src/java.desktop/share/classes/java/awt/doc-files/modal-example2.gif deleted file mode 100644 index 65a0d25005ae9d3b9b87132eeeb3bff2b819d6ae..0000000000000000000000000000000000000000 Binary files a/src/java.desktop/share/classes/java/awt/doc-files/modal-example2.gif and /dev/null differ diff --git a/src/java.desktop/share/classes/java/awt/doc-files/modal-example2.svg b/src/java.desktop/share/classes/java/awt/doc-files/modal-example2.svg new file mode 100644 index 0000000000000000000000000000000000000000..d1ee40546d1e4c7e85aecbec745d5de6fc17e3f9 --- /dev/null +++ b/src/java.desktop/share/classes/java/awt/doc-files/modal-example2.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + F + 1 + + + Di + 2 + 4 + + + Dii + 3 + + + diff --git a/src/java.desktop/share/classes/java/awt/doc-files/modal-example3.gif b/src/java.desktop/share/classes/java/awt/doc-files/modal-example3.gif deleted file mode 100644 index f073bd7c7d69fe355ff69b453c08d42280f9a9ea..0000000000000000000000000000000000000000 Binary files a/src/java.desktop/share/classes/java/awt/doc-files/modal-example3.gif and /dev/null differ diff --git a/src/java.desktop/share/classes/java/awt/doc-files/modal-example3.svg b/src/java.desktop/share/classes/java/awt/doc-files/modal-example3.svg new file mode 100644 index 0000000000000000000000000000000000000000..82d63465bc020a33f5b75df8cf66cd1e6bdf75fe --- /dev/null +++ b/src/java.desktop/share/classes/java/awt/doc-files/modal-example3.svg @@ -0,0 +1,143 @@ + + + + + + + + + + + F + 1 + + + Di + 2 + 5 + + + Dii + 3 + + + Diii + 4 + + + diff --git a/src/java.desktop/share/classes/java/awt/doc-files/modal-example4.gif b/src/java.desktop/share/classes/java/awt/doc-files/modal-example4.gif deleted file mode 100644 index fd5c278cd5d6d255c1dca3bf00c6ce96dd26e59a..0000000000000000000000000000000000000000 Binary files a/src/java.desktop/share/classes/java/awt/doc-files/modal-example4.gif and /dev/null differ diff --git a/src/java.desktop/share/classes/java/awt/doc-files/modal-example4.svg b/src/java.desktop/share/classes/java/awt/doc-files/modal-example4.svg new file mode 100644 index 0000000000000000000000000000000000000000..6b2ddc9a30a810a7bc90488c401cccbf9709fcfe --- /dev/null +++ b/src/java.desktop/share/classes/java/awt/doc-files/modal-example4.svg @@ -0,0 +1,142 @@ + + + + + + + + + + + F + 1 + + + Di + 2 + + + Dii + 3 + + + Diii + 4 + 5 + + + diff --git a/src/java.desktop/share/classes/java/awt/event/InputEvent.java b/src/java.desktop/share/classes/java/awt/event/InputEvent.java index a4f310dd08cc70681591a9c89f7ddb1e49db9a13..60d3b4d812d9b88d73a743a20b21582049a140ef 100644 --- a/src/java.desktop/share/classes/java/awt/event/InputEvent.java +++ b/src/java.desktop/share/classes/java/awt/event/InputEvent.java @@ -57,7 +57,9 @@ import sun.util.logging.PlatformLogger; * * @since 1.1 */ -public abstract class InputEvent extends ComponentEvent { +public abstract sealed class InputEvent extends ComponentEvent + permits KeyEvent, + MouseEvent { private static final PlatformLogger logger = PlatformLogger.getLogger("java.awt.event.InputEvent"); diff --git a/src/java.desktop/share/classes/java/awt/event/InputMethodEvent.java b/src/java.desktop/share/classes/java/awt/event/InputMethodEvent.java index 94cfcc0bf402bde52ba8d21a46033b471197192c..12ad1a0317130ed2c13916089442167a062adad1 100644 --- a/src/java.desktop/share/classes/java/awt/event/InputMethodEvent.java +++ b/src/java.desktop/share/classes/java/awt/event/InputMethodEvent.java @@ -436,7 +436,7 @@ public class InputMethodEvent extends AWTEvent { * belongs to. * * @param source the source of the event - * @exception IllegalArgumentException if source is null. + * @throws IllegalArgumentException if source is null. * @return most recent event time in the {@code EventQueue} */ private static long getMostRecentEventTimeForSource(Object source) { diff --git a/src/java.desktop/share/classes/java/awt/event/KeyEvent.java b/src/java.desktop/share/classes/java/awt/event/KeyEvent.java index 21bf7ec17162b7f82ee974aa0d18070536243dfe..37f386c8793ce731e0cb27393c235fe77af205e2 100644 --- a/src/java.desktop/share/classes/java/awt/event/KeyEvent.java +++ b/src/java.desktop/share/classes/java/awt/event/KeyEvent.java @@ -151,7 +151,7 @@ import sun.awt.AWTAccessor; * * @since 1.1 */ -public class KeyEvent extends InputEvent { +public non-sealed class KeyEvent extends InputEvent { /** * Stores the state of native event dispatching system diff --git a/src/java.desktop/share/classes/java/awt/event/MouseEvent.java b/src/java.desktop/share/classes/java/awt/event/MouseEvent.java index f681c906fa050bd3520e446f98ffee7b13e0e0d6..42b1fb9c39cc902957d8f740e5ad117641372424 100644 --- a/src/java.desktop/share/classes/java/awt/event/MouseEvent.java +++ b/src/java.desktop/share/classes/java/awt/event/MouseEvent.java @@ -189,7 +189,7 @@ import sun.awt.SunToolkit; * * @since 1.1 */ -public class MouseEvent extends InputEvent { +public non-sealed class MouseEvent extends InputEvent { /** * The first number in the range of ids used for mouse events. diff --git a/src/java.desktop/share/classes/java/awt/font/TextLayout.java b/src/java.desktop/share/classes/java/awt/font/TextLayout.java index ddc5199b8432196a97ad7454e98ed56baf34fbbd..352d3c81df247f84dcb711f1a7fa71eaf62e7671 100644 --- a/src/java.desktop/share/classes/java/awt/font/TextLayout.java +++ b/src/java.desktop/share/classes/java/awt/font/TextLayout.java @@ -789,7 +789,7 @@ public final class TextLayout implements Cloneable { * For best results, it should not be too different from the current * advance of the line. * @return a {@code TextLayout} justified to the specified width. - * @exception Error if this layout has already been justified, an Error is + * @throws Error if this layout has already been justified, an Error is * thrown. */ public TextLayout getJustifiedLayout(float justificationWidth) { diff --git a/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java b/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java index 44324e2d3b9a2f1a731788a140943732f5e14940..7f6fc7c34f986880d3cb2112076c43211cd33848 100644 --- a/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java +++ b/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java @@ -2667,7 +2667,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable { * @return a new {@code AffineTransform} object representing the * inverse transformation. * @see #getDeterminant - * @exception NoninvertibleTransformException + * @throws NoninvertibleTransformException * if the matrix cannot be inverted. * @since 1.2 */ @@ -2762,7 +2762,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable { * transform has no inverse, in which case an exception will be * thrown if the {@code invert} method is called. * @see #getDeterminant - * @exception NoninvertibleTransformException + * @throws NoninvertibleTransformException * if the matrix cannot be inverted. * @since 1.6 */ @@ -3464,7 +3464,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable { * @param ptDst the resulting transformed point * @return {@code ptDst}, which contains the result of the * inverse transform. - * @exception NoninvertibleTransformException if the matrix cannot be + * @throws NoninvertibleTransformException if the matrix cannot be * inverted. * @since 1.2 */ @@ -3550,7 +3550,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable { * @param dstOff the offset to the location of the first * transformed point that is stored in the destination array * @param numPts the number of point objects to be transformed - * @exception NoninvertibleTransformException if the matrix cannot be + * @throws NoninvertibleTransformException if the matrix cannot be * inverted. * @since 1.2 */ diff --git a/src/java.desktop/share/classes/java/awt/geom/CubicCurve2D.java b/src/java.desktop/share/classes/java/awt/geom/CubicCurve2D.java index 76d366c0ec66e6eb0c102f22ffb0a805e62dc72e..cf33fb30438a8367ef5b41d75f7b5b18c97cc522 100644 --- a/src/java.desktop/share/classes/java/awt/geom/CubicCurve2D.java +++ b/src/java.desktop/share/classes/java/awt/geom/CubicCurve2D.java @@ -1564,7 +1564,7 @@ public abstract class CubicCurve2D implements Shape, Cloneable { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @exception OutOfMemoryError if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since 1.2 */ diff --git a/src/java.desktop/share/classes/java/awt/geom/Dimension2D.java b/src/java.desktop/share/classes/java/awt/geom/Dimension2D.java index 180d96a3840ff976f1211cbba91c033d6bdf99b9..0a2015b15a999a15127ca689d263d9b57231aece 100644 --- a/src/java.desktop/share/classes/java/awt/geom/Dimension2D.java +++ b/src/java.desktop/share/classes/java/awt/geom/Dimension2D.java @@ -99,7 +99,7 @@ public abstract class Dimension2D implements Cloneable { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @exception OutOfMemoryError if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since 1.2 */ diff --git a/src/java.desktop/share/classes/java/awt/geom/FlatteningPathIterator.java b/src/java.desktop/share/classes/java/awt/geom/FlatteningPathIterator.java index 40159f2db5ff4aee33cdceefc1304c3713480a67..123e6d60b928f7067d4d2d9870a29549f210ac00 100644 --- a/src/java.desktop/share/classes/java/awt/geom/FlatteningPathIterator.java +++ b/src/java.desktop/share/classes/java/awt/geom/FlatteningPathIterator.java @@ -109,7 +109,7 @@ public class FlatteningPathIterator implements PathIterator { * control points and the flattened curve * @param limit the maximum number of recursive subdivisions * allowed for any curved segment - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code flatness} or {@code limit} * is less than zero */ @@ -336,7 +336,7 @@ public class FlatteningPathIterator implements PathIterator { * @param coords an array that holds the data returned from * this method * @return the path segment type of the current path segment. - * @exception NoSuchElementException if there + * @throws NoSuchElementException if there * are no more elements in the flattening path to be * returned. * @see PathIterator#SEG_MOVETO @@ -371,7 +371,7 @@ public class FlatteningPathIterator implements PathIterator { * @param coords an array that holds the data returned from * this method * @return the path segment type of the current path segment. - * @exception NoSuchElementException if there + * @throws NoSuchElementException if there * are no more elements in the flattening path to be * returned. * @see PathIterator#SEG_MOVETO diff --git a/src/java.desktop/share/classes/java/awt/geom/Line2D.java b/src/java.desktop/share/classes/java/awt/geom/Line2D.java index 3d79e44dfee1caf027f3a0c615b3ef7a7a5a0117..305b51942d9949cacc245b79c46d71fa0b49a72e 100644 --- a/src/java.desktop/share/classes/java/awt/geom/Line2D.java +++ b/src/java.desktop/share/classes/java/awt/geom/Line2D.java @@ -1111,7 +1111,7 @@ public abstract class Line2D implements Shape, Cloneable { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @exception OutOfMemoryError if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since 1.2 */ diff --git a/src/java.desktop/share/classes/java/awt/geom/Path2D.java b/src/java.desktop/share/classes/java/awt/geom/Path2D.java index 6168664452baf40d773e78898ec13a75576f7647..e8d752c2bf31de7eed955151f2349676c3c160a6 100644 --- a/src/java.desktop/share/classes/java/awt/geom/Path2D.java +++ b/src/java.desktop/share/classes/java/awt/geom/Path2D.java @@ -70,7 +70,9 @@ import sun.awt.geom.Curve; * @author Jim Graham * @since 1.6 */ -public abstract class Path2D implements Shape, Cloneable { +public abstract sealed class Path2D implements Shape, Cloneable + permits Path2D.Double, + Path2D.Float { /** * An even-odd winding rule for determining the interior of * a path. @@ -191,7 +193,7 @@ public abstract class Path2D implements Shape, Cloneable { * * @since 1.6 */ - public static class Float extends Path2D implements Serializable { + public static non-sealed class Float extends Path2D implements Serializable { transient float[] floatCoords; /** @@ -842,7 +844,7 @@ public abstract class Path2D implements Shape, Cloneable { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @exception OutOfMemoryError if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since 1.6 */ @@ -1093,7 +1095,7 @@ public abstract class Path2D implements Shape, Cloneable { * * @since 1.6 */ - public static class Double extends Path2D implements Serializable { + public static non-sealed class Double extends Path2D implements Serializable { transient double[] doubleCoords; /** @@ -1638,7 +1640,7 @@ public abstract class Path2D implements Shape, Cloneable { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @exception OutOfMemoryError if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since 1.6 */ @@ -2018,7 +2020,7 @@ public abstract class Path2D implements Shape, Cloneable { * * @param rule an integer representing the specified * winding rule - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code rule} is not either * {@link #WIND_EVEN_ODD} or * {@link #WIND_NON_ZERO} @@ -2530,7 +2532,7 @@ public abstract class Path2D implements Shape, Cloneable { * Creates a new object of the same class as this object. * * @return a clone of this instance. - * @exception OutOfMemoryError if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since 1.6 */ diff --git a/src/java.desktop/share/classes/java/awt/geom/Point2D.java b/src/java.desktop/share/classes/java/awt/geom/Point2D.java index bffb5594cfa0fe94d237150fecf291746ece1807..2b0a2aabef1002003b9dc0772d7a564186263819 100644 --- a/src/java.desktop/share/classes/java/awt/geom/Point2D.java +++ b/src/java.desktop/share/classes/java/awt/geom/Point2D.java @@ -387,7 +387,7 @@ public abstract class Point2D implements Cloneable { * Creates a new object of the same class and with the * same contents as this object. * @return a clone of this instance. - * @exception OutOfMemoryError if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since 1.2 */ diff --git a/src/java.desktop/share/classes/java/awt/geom/QuadCurve2D.java b/src/java.desktop/share/classes/java/awt/geom/QuadCurve2D.java index f7dce7ea8e3c9eab88ecd3bf76bf500aba1e43cd..6f4990df49c122a8faeb3ed9f8b5d8a3bb2aee3e 100644 --- a/src/java.desktop/share/classes/java/awt/geom/QuadCurve2D.java +++ b/src/java.desktop/share/classes/java/awt/geom/QuadCurve2D.java @@ -1388,7 +1388,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable { * as this object. * * @return a clone of this instance. - * @exception OutOfMemoryError if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since 1.2 */ diff --git a/src/java.desktop/share/classes/java/awt/geom/RectangularShape.java b/src/java.desktop/share/classes/java/awt/geom/RectangularShape.java index 892eb634559af6a9bee48b7d2fbbd139535760ef..d0b0792792e69cee55b596035c0fa5512a063d4b 100644 --- a/src/java.desktop/share/classes/java/awt/geom/RectangularShape.java +++ b/src/java.desktop/share/classes/java/awt/geom/RectangularShape.java @@ -382,7 +382,7 @@ public abstract class RectangularShape implements Shape, Cloneable { * Creates a new object of the same class and with the same * contents as this object. * @return a clone of this instance. - * @exception OutOfMemoryError if there is not enough memory. + * @throws OutOfMemoryError if there is not enough memory. * @see java.lang.Cloneable * @since 1.2 */ diff --git a/src/java.desktop/share/classes/java/awt/im/InputContext.java b/src/java.desktop/share/classes/java/awt/im/InputContext.java index 2a73793df2b7c79af656e10d538a80f6278ab94a..5476d9e2518294c8a95502d6a658c48a027bbf62 100644 --- a/src/java.desktop/share/classes/java/awt/im/InputContext.java +++ b/src/java.desktop/share/classes/java/awt/im/InputContext.java @@ -140,7 +140,7 @@ public class InputContext { * @param locale The desired new locale. * @return true if the input method or keyboard layout that's active after * this call supports the desired locale. - * @exception NullPointerException if {@code locale} is null + * @throws NullPointerException if {@code locale} is null */ public boolean selectInputMethod(Locale locale) { // real implementation is in sun.awt.im.InputContext @@ -268,7 +268,7 @@ public class InputContext { * If no input method is available, then the event will never be consumed. * * @param event The event - * @exception NullPointerException if {@code event} is null + * @throws NullPointerException if {@code event} is null */ public void dispatchEvent(AWTEvent event) { // real implementation is in sun.awt.im.InputContext @@ -286,7 +286,7 @@ public class InputContext { * If no input methods are available, then this method has no effect. * * @param client Client component - * @exception NullPointerException if {@code client} is null + * @throws NullPointerException if {@code client} is null */ public void removeNotify(Component client) { // real implementation is in sun.awt.im.InputContext diff --git a/src/java.desktop/share/classes/java/awt/im/InputMethodHighlight.java b/src/java.desktop/share/classes/java/awt/im/InputMethodHighlight.java index 7fcf3c9549bdf8fdb54f6ed69bb9fa41734ef519..4b8d4d5c9ea9e94be2496d53adfb46db66628232 100644 --- a/src/java.desktop/share/classes/java/awt/im/InputMethodHighlight.java +++ b/src/java.desktop/share/classes/java/awt/im/InputMethodHighlight.java @@ -111,7 +111,7 @@ public class InputMethodHighlight { * @param state The conversion state for the text range - RAW_TEXT or CONVERTED_TEXT * @see InputMethodHighlight#RAW_TEXT * @see InputMethodHighlight#CONVERTED_TEXT - * @exception IllegalArgumentException if a state other than RAW_TEXT or CONVERTED_TEXT is given + * @throws IllegalArgumentException if a state other than RAW_TEXT or CONVERTED_TEXT is given */ public InputMethodHighlight(boolean selected, int state) { this(selected, state, 0, null); @@ -125,7 +125,7 @@ public class InputMethodHighlight { * @param variation The style variation for the text range * @see InputMethodHighlight#RAW_TEXT * @see InputMethodHighlight#CONVERTED_TEXT - * @exception IllegalArgumentException if a state other than RAW_TEXT or CONVERTED_TEXT is given + * @throws IllegalArgumentException if a state other than RAW_TEXT or CONVERTED_TEXT is given */ public InputMethodHighlight(boolean selected, int state, int variation) { this(selected, state, variation, null); @@ -140,7 +140,7 @@ public class InputMethodHighlight { * @param style the rendering style attributes for the text range, or null * @see InputMethodHighlight#RAW_TEXT * @see InputMethodHighlight#CONVERTED_TEXT - * @exception IllegalArgumentException if a state other than RAW_TEXT or CONVERTED_TEXT is given + * @throws IllegalArgumentException if a state other than RAW_TEXT or CONVERTED_TEXT is given * @since 1.3 */ public InputMethodHighlight(boolean selected, int state, int variation, diff --git a/src/java.desktop/share/classes/java/awt/im/spi/InputMethod.java b/src/java.desktop/share/classes/java/awt/im/spi/InputMethod.java index 1174493cc580a83228bead35e75af1958664c7fc..c01987bbfeda39a419a5e3a3e8ea21efda6e2738 100644 --- a/src/java.desktop/share/classes/java/awt/im/spi/InputMethod.java +++ b/src/java.desktop/share/classes/java/awt/im/spi/InputMethod.java @@ -59,7 +59,7 @@ public interface InputMethod { * method. * * @param context the input method context for this input method - * @exception NullPointerException if {@code context} is null + * @throws NullPointerException if {@code context} is null */ public void setInputMethodContext(InputMethodContext context); @@ -80,7 +80,7 @@ public interface InputMethod { * * @param locale locale to input * @return whether the specified locale is supported - * @exception NullPointerException if {@code locale} is null + * @throws NullPointerException if {@code locale} is null */ public boolean setLocale(Locale locale); @@ -211,7 +211,7 @@ public interface InputMethod { * This method is called by {@link java.awt.im.InputContext#dispatchEvent InputContext.dispatchEvent}. * * @param event the event being dispatched to the input method - * @exception NullPointerException if {@code event} is null + * @throws NullPointerException if {@code event} is null */ public void dispatchEvent(AWTEvent event); diff --git a/src/java.desktop/share/classes/java/awt/im/spi/InputMethodContext.java b/src/java.desktop/share/classes/java/awt/im/spi/InputMethodContext.java index 09d44a5eda4053754b1d0afb65fedd697289c684..c17c4e4afef18a4fc006e7abaf74fd3d87df7526 100644 --- a/src/java.desktop/share/classes/java/awt/im/spi/InputMethodContext.java +++ b/src/java.desktop/share/classes/java/awt/im/spi/InputMethodContext.java @@ -92,7 +92,7 @@ public interface InputMethodContext extends InputMethodRequests { * @param attachToInputContext whether this window should share the input context * that corresponds to this input method context * @return a window with special characteristics for use by input methods - * @exception HeadlessException if {@code GraphicsEnvironment.isHeadless} + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless} * returns {@code true} */ public Window createInputMethodWindow(String title, boolean attachToInputContext); @@ -124,7 +124,7 @@ public interface InputMethodContext extends InputMethodRequests { * @param attachToInputContext whether this window should share the input context * that corresponds to this input method context * @return a JFrame with special characteristics for use by input methods - * @exception HeadlessException if {@code GraphicsEnvironment.isHeadless} + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless} * returns {@code true} * * @since 1.4 diff --git a/src/java.desktop/share/classes/java/awt/im/spi/InputMethodDescriptor.java b/src/java.desktop/share/classes/java/awt/im/spi/InputMethodDescriptor.java index 885e7ad4e0981368292785acda66349c8444413a..6e3d8f89706b6007af7d7fd56232eca2087f8ad4 100644 --- a/src/java.desktop/share/classes/java/awt/im/spi/InputMethodDescriptor.java +++ b/src/java.desktop/share/classes/java/awt/im/spi/InputMethodDescriptor.java @@ -63,7 +63,7 @@ public interface InputMethodDescriptor { * unavailable. * * @return the locales supported by the input method - * @exception AWTException if it can be determined that the input method + * @throws AWTException if it can be determined that the input method * is inoperable, for example, because of incomplete installation. */ Locale[] getAvailableLocales() throws AWTException; @@ -122,7 +122,7 @@ public interface InputMethodDescriptor { * Creates a new instance of the corresponding input method. * * @return a new instance of the corresponding input method - * @exception Exception any exception that may occur while creating the + * @throws Exception any exception that may occur while creating the * input method instance */ InputMethod createInputMethod() throws Exception; diff --git a/src/java.desktop/share/classes/java/awt/image/BufferedImage.java b/src/java.desktop/share/classes/java/awt/image/BufferedImage.java index 3c937dd38669bac18051badf4215e31b44813914..770fec6e8ab59c1d5b0d03232d78c54a6643dc3d 100644 --- a/src/java.desktop/share/classes/java/awt/image/BufferedImage.java +++ b/src/java.desktop/share/classes/java/awt/image/BufferedImage.java @@ -594,12 +594,12 @@ public class BufferedImage extends java.awt.Image * the raster has been premultiplied with alpha. * @param properties {@code Hashtable} of * {@code String}/{@code Object} pairs. - * @exception RasterFormatException if the number and + * @throws RasterFormatException if the number and * types of bands in the {@code SampleModel} of the * {@code Raster} do not match the number and types required by * the {@code ColorModel} to represent its color and alpha * components. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code raster} is incompatible with {@code cm} * @see ColorModel * @see Raster @@ -1195,7 +1195,7 @@ public class BufferedImage extends java.awt.Image * @param h the height of the specified rectangular region * @return a {@code BufferedImage} that is the subimage of this * {@code BufferedImage}. - * @exception RasterFormatException if the specified + * @throws RasterFormatException if the specified * area is not contained within this {@code BufferedImage}. */ public BufferedImage getSubimage (int x, int y, int w, int h) { @@ -1391,7 +1391,7 @@ public class BufferedImage extends java.awt.Image * @param tileY the y index of the requested tile in the tile array * @return a {@code Raster} that is the tile defined by the * arguments {@code tileX} and {@code tileY}. - * @exception ArrayIndexOutOfBoundsException if both + * @throws ArrayIndexOutOfBoundsException if both * {@code tileX} and {@code tileY} are not * equal to 0 */ @@ -1561,7 +1561,7 @@ public class BufferedImage extends java.awt.Image * @return {@code true} if the tile specified by the specified * indices is checked out for writing; {@code false} * otherwise. - * @exception ArrayIndexOutOfBoundsException if both + * @throws ArrayIndexOutOfBoundsException if both * {@code tileX} and {@code tileY} are not equal * to 0 */ diff --git a/src/java.desktop/share/classes/java/awt/image/ByteLookupTable.java b/src/java.desktop/share/classes/java/awt/image/ByteLookupTable.java index 01bebc12ee23f66ecd69c699cd9162afef0443d8..2bb5a1219ef3971d3ebf2c481e2c6512fe9e3d74 100644 --- a/src/java.desktop/share/classes/java/awt/image/ByteLookupTable.java +++ b/src/java.desktop/share/classes/java/awt/image/ByteLookupTable.java @@ -117,7 +117,7 @@ public class ByteLookupTable extends LookupTable { * same length as {@code src}. * @return the array {@code dst}, an {@code int} array of * samples. - * @exception ArrayIndexOutOfBoundsException if {@code src} is + * @throws ArrayIndexOutOfBoundsException if {@code src} is * longer than {@code dst} or if for any element * {@code i} of {@code src}, * {@code src[i]-offset} is either less than zero or @@ -168,7 +168,7 @@ public class ByteLookupTable extends LookupTable { * same length as {@code src}. * @return the array {@code dst}, an {@code int} array of * samples. - * @exception ArrayIndexOutOfBoundsException if {@code src} is + * @throws ArrayIndexOutOfBoundsException if {@code src} is * longer than {@code dst} or if for any element * {@code i} of {@code src}, * {@code (src[i]&0xff)-offset} is either less than diff --git a/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java b/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java index 023b376d73d80e74440a86c7b9767edfb0e9124b..f5ec86a151a018f0ab91c8b675def97a73ee365b 100644 --- a/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java +++ b/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java @@ -194,9 +194,9 @@ public class ColorConvertOp implements BufferedImageOp, RasterOp { * @param profiles the array of {@code ICC_Profile} objects * @param hints the {@code RenderingHints} object used to control * the color conversion, or {@code null} - * @exception IllegalArgumentException when the profile sequence does not + * @throws IllegalArgumentException when the profile sequence does not * specify a well-defined color conversion - * @exception NullPointerException if profiles is null + * @throws NullPointerException if profiles is null */ public ColorConvertOp (ICC_Profile[] profiles, RenderingHints hints) { @@ -242,7 +242,7 @@ public class ColorConvertOp implements BufferedImageOp, RasterOp { * @return {@code dest} color converted from {@code src} * or a new, converted {@code BufferedImage} * if {@code dest} is {@code null} - * @exception IllegalArgumentException if dest is null and this op was + * @throws IllegalArgumentException if dest is null and this op was * constructed using the constructor which takes only a * RenderingHints argument, since the operation is ill defined. */ @@ -456,7 +456,7 @@ public class ColorConvertOp implements BufferedImageOp, RasterOp { * @return {@code dest} color converted from {@code src} * or a new, converted {@code WritableRaster} * if {@code dest} is {@code null} - * @exception IllegalArgumentException if the number of source or + * @throws IllegalArgumentException if the number of source or * destination bands is incorrect, the source or destination * color spaces are undefined, or this op was constructed * with one of the constructors that applies only to diff --git a/src/java.desktop/share/classes/java/awt/image/DirectColorModel.java b/src/java.desktop/share/classes/java/awt/image/DirectColorModel.java index bf7ad07a22e710fd18ddbd4c98b5f86d470ac269..5853f3802a4a07a85f32f637afd2645a3c7f9b50 100644 --- a/src/java.desktop/share/classes/java/awt/image/DirectColorModel.java +++ b/src/java.desktop/share/classes/java/awt/image/DirectColorModel.java @@ -642,12 +642,12 @@ public class DirectColorModel extends PackedColorModel { * @param inData the specified pixel * @return the alpha component of the specified pixel, scaled from * 0 to 255. - * @exception ClassCastException if {@code inData} + * @throws ClassCastException if {@code inData} * is not a primitive array of type {@code transferType} - * @exception ArrayIndexOutOfBoundsException if + * @throws ArrayIndexOutOfBoundsException if * {@code inData} is not large enough to hold a pixel value * for this {@code ColorModel} - * @exception UnsupportedOperationException if this + * @throws UnsupportedOperationException if this * {@code tranferType} is not supported by this * {@code ColorModel} */ @@ -694,7 +694,7 @@ public class DirectColorModel extends PackedColorModel { * * @param inData the specified pixel * @return the color and alpha components of the specified pixel. - * @exception UnsupportedOperationException if this + * @throws UnsupportedOperationException if this * {@code transferType} is not supported by this * {@code ColorModel} * @see ColorModel#getRGBdefault @@ -744,12 +744,12 @@ public class DirectColorModel extends PackedColorModel { * @param pixel the specified pixel * @return an array representation of the specified pixel in this * {@code ColorModel} - * @exception ClassCastException if {@code pixel} + * @throws ClassCastException if {@code pixel} * is not a primitive array of type {@code transferType} - * @exception ArrayIndexOutOfBoundsException if + * @throws ArrayIndexOutOfBoundsException if * {@code pixel} is not large enough to hold a pixel value * for this {@code ColorModel} - * @exception UnsupportedOperationException if this + * @throws UnsupportedOperationException if this * {@code transferType} is not supported by this * {@code ColorModel} * @see WritableRaster#setDataElements @@ -963,14 +963,14 @@ public class DirectColorModel extends PackedColorModel { * which to start storing the color and alpha components * @return an array containing the color and alpha components of the * specified pixel starting at the specified offset. - * @exception ClassCastException if {@code pixel} + * @throws ClassCastException if {@code pixel} * is not a primitive array of type {@code transferType} - * @exception ArrayIndexOutOfBoundsException if + * @throws ArrayIndexOutOfBoundsException if * {@code pixel} is not large enough to hold a pixel value * for this {@code ColorModel}, or if {@code components} * is not {@code null} and is not large enough to hold all the * color and alpha components, starting at {@code offset} - * @exception UnsupportedOperationException if this + * @throws UnsupportedOperationException if this * {@code transferType} is not supported by this * color model */ @@ -1055,7 +1055,7 @@ public class DirectColorModel extends PackedColorModel { * begin retrieving the color and alpha components * @return an {@code int} pixel value in this * {@code ColorModel} corresponding to the specified components. - * @exception ArrayIndexOutOfBoundsException if + * @throws ArrayIndexOutOfBoundsException if * the {@code components} array is not large enough to * hold all of the color and alpha components starting at * {@code offset} @@ -1097,14 +1097,14 @@ public class DirectColorModel extends PackedColorModel { * and alpha components * @return an {@code Object} representing an array of color and * alpha components. - * @exception ClassCastException if {@code obj} + * @throws ClassCastException if {@code obj} * is not a primitive array of type {@code transferType} - * @exception ArrayIndexOutOfBoundsException if + * @throws ArrayIndexOutOfBoundsException if * {@code obj} is not large enough to hold a pixel value * for this {@code ColorModel} or the {@code components} * array is not large enough to hold all of the color and alpha * components starting at {@code offset} - * @exception UnsupportedOperationException if this + * @throws UnsupportedOperationException if this * {@code transferType} is not supported by this * color model * @see WritableRaster#setDataElements @@ -1169,7 +1169,7 @@ public class DirectColorModel extends PackedColorModel { * premultiplied; {@code false} otherwise * @return a {@code ColorModel} object that represents the * coerced data. - * @exception UnsupportedOperationException if this + * @throws UnsupportedOperationException if this * {@code transferType} is not supported by this * color model */ diff --git a/src/java.desktop/share/classes/java/awt/image/ImageFilter.java b/src/java.desktop/share/classes/java/awt/image/ImageFilter.java index d136e16fc6b8c3e6fd18f7c101fcf17f24e1df43..94586b851ae71b22e5295dcb70c70be57bd7c7f0 100644 --- a/src/java.desktop/share/classes/java/awt/image/ImageFilter.java +++ b/src/java.desktop/share/classes/java/awt/image/ImageFilter.java @@ -107,7 +107,7 @@ public class ImageFilter implements ImageConsumer, Cloneable { * with the filtering operation. * * @param props the properties from the source object - * @exception NullPointerException if {@code props} is null + * @throws NullPointerException if {@code props} is null */ public void setProperties(Hashtable props) { @SuppressWarnings("unchecked") @@ -245,7 +245,7 @@ public class ImageFilter implements ImageConsumer, Cloneable { * @param ip the ImageProducer that is feeding this instance of * the filter - also the ImageProducer that the request should be * forwarded to if necessary - * @exception NullPointerException if {@code ip} is null + * @throws NullPointerException if {@code ip} is null */ public void resendTopDownLeftRight(ImageProducer ip) { ip.requestTopDownLeftRightResend(this); diff --git a/src/java.desktop/share/classes/java/awt/image/MultiPixelPackedSampleModel.java b/src/java.desktop/share/classes/java/awt/image/MultiPixelPackedSampleModel.java index dcec78fb34833e0ff4c308c6c1487922ebf58227..9254d9fa71717edfbc055e88f382786d8a3b0830 100644 --- a/src/java.desktop/share/classes/java/awt/image/MultiPixelPackedSampleModel.java +++ b/src/java.desktop/share/classes/java/awt/image/MultiPixelPackedSampleModel.java @@ -130,7 +130,7 @@ public class MultiPixelPackedSampleModel extends SampleModel * @param scanlineStride the line stride of the image data * @param dataBitOffset the data bit offset for the region of image * data described - * @exception RasterFormatException if the number of bits per pixel + * @throws RasterFormatException if the number of bits per pixel * is not a power of 2 or if a power of 2 number of * pixels do not fit in one data element. * @throws IllegalArgumentException if {@code w} or @@ -321,7 +321,7 @@ public class MultiPixelPackedSampleModel extends SampleModel * @param bands the specified bands * @return a new {@code SampleModel} with a subset of bands of * this {@code MultiPixelPackedSampleModel}. - * @exception RasterFormatException if the number of bands requested + * @throws RasterFormatException if the number of bands requested * is not one. * @throws IllegalArgumentException if {@code w} or * {@code h} is not greater than 0 @@ -348,7 +348,7 @@ public class MultiPixelPackedSampleModel extends SampleModel * data * @return the specified band containing the sample of the specified * pixel. - * @exception ArrayIndexOutOfBoundsException if the specified + * @throws ArrayIndexOutOfBoundsException if the specified * coordinates are not in bounds. * @see #setSample(int, int, int, int, DataBuffer) */ @@ -377,7 +377,7 @@ public class MultiPixelPackedSampleModel extends SampleModel * @param b the band to return, which is assumed to be 0 * @param s the input sample as an {@code int} * @param data the {@code DataBuffer} where image data is stored - * @exception ArrayIndexOutOfBoundsException if the coordinates are + * @throws ArrayIndexOutOfBoundsException if the coordinates are * not in bounds. * @see #getSample(int, int, int, DataBuffer) */ @@ -442,9 +442,9 @@ public class MultiPixelPackedSampleModel extends SampleModel * @param data the {@code DataBuffer} containing the image data. * @return an {@code Object} containing data for the specified * pixel. - * @exception ClassCastException if {@code obj} is not a + * @throws ClassCastException if {@code obj} is not a * primitive array of type TransferType or is not {@code null} - * @exception ArrayIndexOutOfBoundsException if the coordinates are + * @throws ArrayIndexOutOfBoundsException if the coordinates are * not in bounds, or if {@code obj} is not {@code null} or * not large enough to hold the pixel data * @see #setDataElements(int, int, Object, DataBuffer) @@ -526,7 +526,7 @@ public class MultiPixelPackedSampleModel extends SampleModel * {@code null} * @param data the {@code DataBuffer} where image data is stored * @return an array containing the specified pixel. - * @exception ArrayIndexOutOfBoundsException if the coordinates + * @throws ArrayIndexOutOfBoundsException if the coordinates * are not in bounds * @see #setPixel(int, int, int[], DataBuffer) */ diff --git a/src/java.desktop/share/classes/java/awt/image/PixelGrabber.java b/src/java.desktop/share/classes/java/awt/image/PixelGrabber.java index 3855316d986d5e7babb8b1eb80160e628cfc9457..fb66a95f5398f9035d0952eca33c094a6b4183f0 100644 --- a/src/java.desktop/share/classes/java/awt/image/PixelGrabber.java +++ b/src/java.desktop/share/classes/java/awt/image/PixelGrabber.java @@ -219,7 +219,7 @@ public class PixelGrabber implements ImageConsumer { * delivered. * @return true if the pixels were successfully grabbed, false on * abort, error or timeout - * @exception InterruptedException + * @throws InterruptedException * Another thread has interrupted this thread. */ public boolean grabPixels() throws InterruptedException { @@ -243,7 +243,7 @@ public class PixelGrabber implements ImageConsumer { * to arrive before timing out * @return true if the pixels were successfully grabbed, false on * abort, error or timeout - * @exception InterruptedException + * @throws InterruptedException * Another thread has interrupted this thread. */ public synchronized boolean grabPixels(long ms) diff --git a/src/java.desktop/share/classes/java/awt/image/RGBImageFilter.java b/src/java.desktop/share/classes/java/awt/image/RGBImageFilter.java index 44302923d1779f0b971918f8f8d36445baa592f0..9838fdfe8b6c3ec60924e62a6ca59e10ab6e7d54 100644 --- a/src/java.desktop/share/classes/java/awt/image/RGBImageFilter.java +++ b/src/java.desktop/share/classes/java/awt/image/RGBImageFilter.java @@ -146,7 +146,7 @@ public abstract class RGBImageFilter extends ImageFilter { * a color table entry is being filtered rather than an actual * pixel value. * @param icm the IndexColorModel object to be filtered - * @exception NullPointerException if {@code icm} is null + * @throws NullPointerException if {@code icm} is null * @return a new IndexColorModel representing the filtered colors */ public IndexColorModel filterIndexColorModel(IndexColorModel icm) { diff --git a/src/java.desktop/share/classes/java/awt/image/Raster.java b/src/java.desktop/share/classes/java/awt/image/Raster.java index 32d45078b3800796f45631cca0c197a5002421a1..d388aa1f79cf4b2d4333a4c605f37686b2f6e262 100644 --- a/src/java.desktop/share/classes/java/awt/image/Raster.java +++ b/src/java.desktop/share/classes/java/awt/image/Raster.java @@ -1375,7 +1375,7 @@ public class Raster { * @param h the specified height of the new {@code WritableRaster} * @return a compatible {@code WritableRaster} with the specified * size and a new sample model and data buffer. - * @exception RasterFormatException if the width or height is less than + * @throws RasterFormatException if the width or height is less than * or equal to zero. */ public WritableRaster createCompatibleWritableRaster(int w, int h) { @@ -1501,7 +1501,7 @@ public class Raster { * of the returned Raster * @param bandList Array of band indices, or null to use all bands * @return a new {@code Raster}. - * @exception RasterFormatException if the specified subregion is outside + * @throws RasterFormatException if the specified subregion is outside * of the raster bounds. * @throws RasterFormatException if {@code width} or * {@code height} diff --git a/src/java.desktop/share/classes/java/awt/image/ShortLookupTable.java b/src/java.desktop/share/classes/java/awt/image/ShortLookupTable.java index 3f4e236b9bc76cd542e5c32f17ca2fdb235950ac..e9c97ad864eb6316c2da9cd2393d5a3d7accfca8 100644 --- a/src/java.desktop/share/classes/java/awt/image/ShortLookupTable.java +++ b/src/java.desktop/share/classes/java/awt/image/ShortLookupTable.java @@ -111,7 +111,7 @@ public class ShortLookupTable extends LookupTable { * same length as {@code src}. * @return the array {@code dst}, an {@code int} array of * samples. - * @exception ArrayIndexOutOfBoundsException if {@code src} is + * @throws ArrayIndexOutOfBoundsException if {@code src} is * longer than {@code dst} or if for any element * {@code i} of {@code src}, * {@code (src[i]&0xffff)-offset} is either less than @@ -162,7 +162,7 @@ public class ShortLookupTable extends LookupTable { * same length as {@code src}. * @return the array {@code dst}, an {@code int} array of * samples. - * @exception ArrayIndexOutOfBoundsException if {@code src} is + * @throws ArrayIndexOutOfBoundsException if {@code src} is * longer than {@code dst} or if for any element * {@code i} of {@code src}, * {@code (src[i]&0xffff)-offset} is either less than diff --git a/src/java.desktop/share/classes/java/awt/image/SinglePixelPackedSampleModel.java b/src/java.desktop/share/classes/java/awt/image/SinglePixelPackedSampleModel.java index 864ed00cf7617590c71d9de8fc59c50c219d1b1e..abb669e02c6699f2b27c4d17479d3b120d058aa0 100644 --- a/src/java.desktop/share/classes/java/awt/image/SinglePixelPackedSampleModel.java +++ b/src/java.desktop/share/classes/java/awt/image/SinglePixelPackedSampleModel.java @@ -302,7 +302,7 @@ public class SinglePixelPackedSampleModel extends SampleModel * SinglePixelPackedSampleModel/DataBuffer combination will represent * an image with a subset of the bands of the original * SinglePixelPackedSampleModel/DataBuffer combination. - * @exception RasterFormatException if the length of the bands argument is + * @throws RasterFormatException if the length of the bands argument is * greater than the number of bands in * the sample model. */ diff --git a/src/java.desktop/share/classes/java/awt/image/WritableRaster.java b/src/java.desktop/share/classes/java/awt/image/WritableRaster.java index 0e345026c2b526ce5d098221f7e20425c724c687..729317d85a3c9eda95fdb512d8c88322379e37fd 100644 --- a/src/java.desktop/share/classes/java/awt/image/WritableRaster.java +++ b/src/java.desktop/share/classes/java/awt/image/WritableRaster.java @@ -204,7 +204,7 @@ public class WritableRaster extends Raster { * @param bandList Array of band indices, or null to use all bands. * @return a {@code WritableRaster} sharing all or part of the * {@code DataBuffer} of this {@code WritableRaster}. - * @exception RasterFormatException if the subregion is outside of the + * @throws RasterFormatException if the subregion is outside of the * raster bounds. * @throws RasterFormatException if {@code w} or * {@code h} diff --git a/src/java.desktop/share/classes/java/awt/print/PageFormat.java b/src/java.desktop/share/classes/java/awt/print/PageFormat.java index b7709eb581eb36cc1fca8d6c05a83fd4bda06266..019c5d0bdcc1ec533b6bb599ee074f5d4ee0bc22 100644 --- a/src/java.desktop/share/classes/java/awt/print/PageFormat.java +++ b/src/java.desktop/share/classes/java/awt/print/PageFormat.java @@ -286,7 +286,7 @@ public class PageFormat implements Cloneable * {@code PageFormat}. * @param paper the {@code Paper} object to which to set * the {@code Paper} object for this {@code PageFormat}. - * @exception NullPointerException + * @throws NullPointerException * a null paper instance was passed as a parameter. * @see #getPaper */ diff --git a/src/java.desktop/share/classes/java/awt/print/Printable.java b/src/java.desktop/share/classes/java/awt/print/Printable.java index 28a01cc9a16405194be435f64df4d3d476f01eab..1fbf1f7c61620f2a7864f175f7fb868d7d1b3d6e 100644 --- a/src/java.desktop/share/classes/java/awt/print/Printable.java +++ b/src/java.desktop/share/classes/java/awt/print/Printable.java @@ -134,7 +134,7 @@ public interface Printable { * @return PAGE_EXISTS if the page is rendered successfully * or NO_SUCH_PAGE if {@code pageIndex} specifies a * non-existent page. - * @exception java.awt.print.PrinterException + * @throws java.awt.print.PrinterException * thrown when the print job is terminated. */ int print(Graphics graphics, PageFormat pageFormat, int pageIndex) diff --git a/src/java.desktop/share/classes/java/awt/print/PrinterJob.java b/src/java.desktop/share/classes/java/awt/print/PrinterJob.java index 416563671838c5cd2d3aa092e7e962aadf9620b9..ddf565f3ce3b1b0cbe0c6d0c35c143a47d31fe36 100644 --- a/src/java.desktop/share/classes/java/awt/print/PrinterJob.java +++ b/src/java.desktop/share/classes/java/awt/print/PrinterJob.java @@ -168,7 +168,7 @@ public abstract class PrinterJob { * cannot support the {@code Pageable} and * {@code Printable} interfaces necessary to support 2D printing. * @param service a print service that supports 2D printing - * @exception PrinterException if the specified service does not support + * @throws PrinterException if the specified service does not support * 2D printing, or this PrinterJob class does not support * setting a 2D print service, or the specified service is * otherwise not a valid print service. @@ -212,7 +212,7 @@ public abstract class PrinterJob { * {@code document}. * @param document the pages to be printed. It can not be * {@code null}. - * @exception NullPointerException the {@code Pageable} passed in + * @throws NullPointerException the {@code Pageable} passed in * was {@code null}. * @see PageFormat * @see Printable @@ -235,7 +235,7 @@ public abstract class PrinterJob { * selected by the user. * @return {@code true} if the user does not cancel the dialog; * {@code false} otherwise. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -279,9 +279,9 @@ public abstract class PrinterJob { * This parameter may not be null. * @return {@code true} if the user does not cancel the dialog; * {@code false} otherwise. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. - * @exception NullPointerException if {@code attributes} parameter + * @throws NullPointerException if {@code attributes} parameter * is null. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.4 @@ -313,7 +313,7 @@ public abstract class PrinterJob { * is cancelled; a new {@code PageFormat} object * containing the format indicated by the user if the * dialog is acknowledged. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.2 @@ -342,9 +342,9 @@ public abstract class PrinterJob { * This parameter may not be null. * @return a page format if the user does not cancel the dialog; * {@code null} otherwise. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. - * @exception NullPointerException if {@code attributes} parameter + * @throws NullPointerException if {@code attributes} parameter * is null. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.4 @@ -495,7 +495,7 @@ public abstract class PrinterJob { /** * Prints a set of pages. - * @exception PrinterException an error in the print system + * @throws PrinterException an error in the print system * caused the job to be aborted. * @see Book * @see Pageable @@ -533,7 +533,7 @@ public abstract class PrinterJob { * this print() method. * * @param attributes a set of attributes for the job - * @exception PrinterException an error in the print system + * @throws PrinterException an error in the print system * caused the job to be aborted. * @see Book * @see Pageable diff --git a/src/java.desktop/share/classes/java/beans/Beans.java b/src/java.desktop/share/classes/java/beans/Beans.java index dbe678b70927e881cc8446bb0e3758bd9f19c8e6..36a424664de35480b36ce4a9d270a1cd02596d5d 100644 --- a/src/java.desktop/share/classes/java/beans/Beans.java +++ b/src/java.desktop/share/classes/java/beans/Beans.java @@ -75,9 +75,9 @@ public class Beans { * @param beanName the name of the bean within the class-loader. * For example "sun.beanbox.foobah" * - * @exception ClassNotFoundException if the class of a serialized + * @throws ClassNotFoundException if the class of a serialized * object could not be found. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public static Object instantiate(ClassLoader cls, String beanName) throws IOException, ClassNotFoundException { @@ -97,9 +97,9 @@ public class Beans { * For example "sun.beanbox.foobah" * @param beanContext The BeanContext in which to nest the new bean * - * @exception ClassNotFoundException if the class of a serialized + * @throws ClassNotFoundException if the class of a serialized * object could not be found. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @since 1.2 */ @SuppressWarnings("deprecation") @@ -156,9 +156,9 @@ public class Beans { * @param beanContext The BeanContext in which to nest the new bean * @param initializer The AppletInitializer for the new bean * - * @exception ClassNotFoundException if the class of a serialized + * @throws ClassNotFoundException if the class of a serialized * object could not be found. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * @since 1.2 * * @deprecated It is recommended to use @@ -432,7 +432,7 @@ public class Beans { * method is called. This could result in a SecurityException. * * @param isDesignTime True if we're in an application builder tool. - * @exception SecurityException if a security manager exists and its + * @throws SecurityException if a security manager exists and its * {@code checkPropertiesAccess} method doesn't allow setting * of system properties. * @see SecurityManager#checkPropertiesAccess @@ -459,7 +459,7 @@ public class Beans { * method is called. This could result in a SecurityException. * * @param isGuiAvailable True if GUI interaction is available. - * @exception SecurityException if a security manager exists and its + * @throws SecurityException if a security manager exists and its * {@code checkPropertiesAccess} method doesn't allow setting * of system properties. * @see SecurityManager#checkPropertiesAccess diff --git a/src/java.desktop/share/classes/java/beans/EventSetDescriptor.java b/src/java.desktop/share/classes/java/beans/EventSetDescriptor.java index 87fa860cf7caf59046832e0bb004ebef150cac29..8826ff27902730b6edc54030f320bd9dae821fef 100644 --- a/src/java.desktop/share/classes/java/beans/EventSetDescriptor.java +++ b/src/java.desktop/share/classes/java/beans/EventSetDescriptor.java @@ -69,7 +69,7 @@ public class EventSetDescriptor extends FeatureDescriptor { * will get delivered to. * @param listenerMethodName The method that will get called when the event gets * delivered to its target listener interface. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. */ public EventSetDescriptor(Class sourceClass, String eventSetName, @@ -114,7 +114,7 @@ public class EventSetDescriptor extends FeatureDescriptor { * that can be used to register an event listener object. * @param removeListenerMethodName The name of the method on the event source * that can be used to de-register an event listener object. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. */ public EventSetDescriptor(Class sourceClass, @@ -146,7 +146,7 @@ public class EventSetDescriptor extends FeatureDescriptor { * that can be used to de-register an event listener object. * @param getListenerMethodName The method on the event source that * can be used to access the array of event listener objects. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. * @since 1.4 */ @@ -210,7 +210,7 @@ public class EventSetDescriptor extends FeatureDescriptor { * that can be used to register an event listener object. * @param removeListenerMethod The method on the event source * that can be used to de-register an event listener object. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. */ public EventSetDescriptor(String eventSetName, @@ -237,7 +237,7 @@ public class EventSetDescriptor extends FeatureDescriptor { * that can be used to de-register an event listener object. * @param getListenerMethod The method on the event source * that can be used to access the array of event listener objects. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. * @since 1.4 */ @@ -280,7 +280,7 @@ public class EventSetDescriptor extends FeatureDescriptor { * that can be used to register an event listener object. * @param removeListenerMethod The method on the event source * that can be used to de-register an event listener object. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. */ public EventSetDescriptor(String eventSetName, diff --git a/src/java.desktop/share/classes/java/beans/IndexedPropertyDescriptor.java b/src/java.desktop/share/classes/java/beans/IndexedPropertyDescriptor.java index b49b1cb07a950673185fe6fcfca011f347fa5a16..a46c8ec9d6e7b64ecdaf3d7715d0c7abaf98a8f7 100644 --- a/src/java.desktop/share/classes/java/beans/IndexedPropertyDescriptor.java +++ b/src/java.desktop/share/classes/java/beans/IndexedPropertyDescriptor.java @@ -63,7 +63,7 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor { * * @param propertyName The programmatic name of the property. * @param beanClass The Class object for the target bean. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. */ public IndexedPropertyDescriptor(String propertyName, Class beanClass) @@ -94,7 +94,7 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor { * @param indexedWriteMethodName The name of the method used for writing * an indexed property value. * May be null if the property is read-only. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. */ public IndexedPropertyDescriptor(String propertyName, Class beanClass, @@ -129,7 +129,7 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor { * May be null if the property is write-only. * @param indexedWriteMethod The method used for writing an indexed property value. * May be null if the property is read-only. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. */ public IndexedPropertyDescriptor(String propertyName, Method readMethod, Method writeMethod, diff --git a/src/java.desktop/share/classes/java/beans/Introspector.java b/src/java.desktop/share/classes/java/beans/Introspector.java index f73444a54ef9d4b0e05fb1b9cf3255b274df093c..88225ab01d4e703f4b0b401bd299a4de5f83f086 100644 --- a/src/java.desktop/share/classes/java/beans/Introspector.java +++ b/src/java.desktop/share/classes/java/beans/Introspector.java @@ -178,7 +178,7 @@ public class Introspector { * * @param beanClass The bean class to be analyzed. * @return A BeanInfo object describing the target bean. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. * @see #flushCaches * @see #flushFromCaches @@ -216,7 +216,7 @@ public class Introspector { * associated with the specified beanClass or any of its * parent classes. * @return A BeanInfo object describing the target bean. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. * @since 1.2 */ @@ -237,7 +237,7 @@ public class Introspector { * @param stopClass The baseclass at which to stop the analysis. Any * methods/properties/events in the stopClass or in its baseclasses * will be ignored in the analysis. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. */ public static BeanInfo getBeanInfo(Class beanClass, Class stopClass) @@ -269,7 +269,7 @@ public class Introspector { * @param stopClass the parent class at which to stop the analysis * @param flags flags to control the introspection * @return a BeanInfo object describing the target bean - * @exception IntrospectionException if an exception occurs during introspection + * @throws IntrospectionException if an exception occurs during introspection * * @since 1.7 */ @@ -339,7 +339,7 @@ public class Introspector { * method is called. This could result in a SecurityException. * * @param path Array of package names. - * @exception SecurityException if a security manager exists and its + * @throws SecurityException if a security manager exists and its * {@code checkPropertiesAccess} method doesn't allow setting * of system properties. * @see SecurityManager#checkPropertiesAccess diff --git a/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java b/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java index d63c446f37375e8b9af3f28fc9167998cdc99290..ae4bb69c18cf43ca26b3de96677e982fbcd4e6f5 100644 --- a/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java +++ b/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java @@ -66,7 +66,7 @@ public class PropertyDescriptor extends FeatureDescriptor { * @param propertyName The programmatic name of the property. * @param beanClass The Class object for the target bean. For * example sun.beans.OurButton.class. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. */ public PropertyDescriptor(String propertyName, Class beanClass) @@ -87,7 +87,7 @@ public class PropertyDescriptor extends FeatureDescriptor { * value. May be null if the property is write-only. * @param writeMethodName The name of the method used for writing the property * value. May be null if the property is read-only. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. */ public PropertyDescriptor(String propertyName, Class beanClass, @@ -129,7 +129,7 @@ public class PropertyDescriptor extends FeatureDescriptor { * May be null if the property is write-only. * @param writeMethod The method used for writing the property value. * May be null if the property is read-only. - * @exception IntrospectionException if an exception occurs during + * @throws IntrospectionException if an exception occurs during * introspection. */ public PropertyDescriptor(String propertyName, Method readMethod, Method writeMethod) diff --git a/src/java.desktop/share/classes/java/beans/PropertyEditorManager.java b/src/java.desktop/share/classes/java/beans/PropertyEditorManager.java index 3642c0c58be518d6fe9988b2cb3d3708474d942f..a692c9214212207ea0bfa232960f8dd323403443 100644 --- a/src/java.desktop/share/classes/java/beans/PropertyEditorManager.java +++ b/src/java.desktop/share/classes/java/beans/PropertyEditorManager.java @@ -118,7 +118,7 @@ public class PropertyEditorManager { * method is called. This could result in a SecurityException. * * @param path Array of package names. - * @exception SecurityException if a security manager exists and its + * @throws SecurityException if a security manager exists and its * {@code checkPropertiesAccess} method doesn't allow setting * of system properties. * @see SecurityManager#checkPropertiesAccess diff --git a/src/java.desktop/share/classes/java/beans/VetoableChangeListener.java b/src/java.desktop/share/classes/java/beans/VetoableChangeListener.java index ae473becad91423a7a4b0c9700a61a96d5e7152a..1c20a9926e55341102a76c8930da98383eedb142 100644 --- a/src/java.desktop/share/classes/java/beans/VetoableChangeListener.java +++ b/src/java.desktop/share/classes/java/beans/VetoableChangeListener.java @@ -37,7 +37,7 @@ public interface VetoableChangeListener extends java.util.EventListener { * * @param evt a {@code PropertyChangeEvent} object describing the * event source and the property that has changed. - * @exception PropertyVetoException if the recipient wishes the property + * @throws PropertyVetoException if the recipient wishes the property * change to be rolled back. */ void vetoableChange(PropertyChangeEvent evt) diff --git a/src/java.desktop/share/classes/java/beans/VetoableChangeListenerProxy.java b/src/java.desktop/share/classes/java/beans/VetoableChangeListenerProxy.java index 9a0438790c12f01288851bdb3ca14f48a40aa0ac..4e4ad96ebd8dc7bd8f792bc1a2611ba40bea7949 100644 --- a/src/java.desktop/share/classes/java/beans/VetoableChangeListenerProxy.java +++ b/src/java.desktop/share/classes/java/beans/VetoableChangeListenerProxy.java @@ -66,7 +66,7 @@ public class VetoableChangeListenerProxy * * @param event the property change event * - * @exception PropertyVetoException if the recipient wishes the property + * @throws PropertyVetoException if the recipient wishes the property * change to be rolled back */ public void vetoableChange(PropertyChangeEvent event) throws PropertyVetoException{ diff --git a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java index 13279894ce6ef7772be0e04ab91a5f434a2fdfdb..ecdd4794d38b560b31c868fb7c6ba099533d8d4b 100644 --- a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java +++ b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java @@ -81,7 +81,7 @@ public class BeanContextMembershipEvent extends BeanContextEvent { * * @param bc The BeanContext source * @param changes The Children effected - * @exception NullPointerException if changes associated with this + * @throws NullPointerException if changes associated with this * event are null. */ diff --git a/src/java.desktop/share/classes/javax/imageio/IIOImage.java b/src/java.desktop/share/classes/javax/imageio/IIOImage.java index ad1c18444ef7527ffc6f4f7722a79a106c5765ec..c830189d0ba5aed6114e484279730692652ef907 100644 --- a/src/java.desktop/share/classes/javax/imageio/IIOImage.java +++ b/src/java.desktop/share/classes/javax/imageio/IIOImage.java @@ -99,7 +99,7 @@ public class IIOImage { * @param metadata an {@code IIOMetadata} object, or * {@code null}. * - * @exception IllegalArgumentException if {@code image} is + * @throws IllegalArgumentException if {@code image} is * {@code null}. */ public IIOImage(RenderedImage image, @@ -127,7 +127,7 @@ public class IIOImage { * @param metadata an {@code IIOMetadata} object, or * {@code null}. * - * @exception IllegalArgumentException if {@code raster} is + * @throws IllegalArgumentException if {@code raster} is * {@code null}. */ public IIOImage(Raster raster, @@ -163,7 +163,7 @@ public class IIOImage { * * @param image a {@code RenderedImage}. * - * @exception IllegalArgumentException if {@code image} is + * @throws IllegalArgumentException if {@code image} is * {@code null}. * * @see #getRenderedImage @@ -213,7 +213,7 @@ public class IIOImage { * * @param raster a {@code Raster}. * - * @exception IllegalArgumentException if {@code raster} is + * @throws IllegalArgumentException if {@code raster} is * {@code null}. * * @see #getRaster @@ -245,9 +245,9 @@ public class IIOImage { * * @return a thumbnail image, as a {@code BufferedImage}. * - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IndexOutOfBoundsException if the supplied index is * negative or larger than the largest valid index. - * @exception ClassCastException if a + * @throws ClassCastException if a * non-{@code BufferedImage} object is encountered in the * list of thumbnails at the given index. * diff --git a/src/java.desktop/share/classes/javax/imageio/IIOParam.java b/src/java.desktop/share/classes/javax/imageio/IIOParam.java index 360ec5328955a4066b0d0e02e762efe0f4b001bb..36b10f1eacc3aff08090a260e3212e84cc059f4b 100644 --- a/src/java.desktop/share/classes/javax/imageio/IIOParam.java +++ b/src/java.desktop/share/classes/javax/imageio/IIOParam.java @@ -162,15 +162,15 @@ public abstract class IIOParam { * @param sourceRegion a {@code Rectangle} specifying the * source region of interest, or {@code null}. * - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code sourceRegion} is non-{@code null} and either * {@code sourceRegion.x} or {@code sourceRegion.y} is * negative. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code sourceRegion} is non-{@code null} and either * {@code sourceRegion.width} or * {@code sourceRegion.height} is negative or 0. - * @exception IllegalStateException if subsampling is such that + * @throws IllegalStateException if subsampling is such that * this region will have a subsampled width or height of zero. * * @see #getSourceRegion @@ -290,10 +290,10 @@ public abstract class IIOParam { * within the region, or within the image if no region is set. * @param subsamplingYOffset the horizontal offset of the first subsample * within the region, or within the image if no region is set. - * @exception IllegalArgumentException if either period is + * @throws IllegalArgumentException if either period is * negative or 0, or if either grid offset is negative or greater than * the corresponding period. - * @exception IllegalStateException if the source region is such that + * @throws IllegalStateException if the source region is such that * the subsampled output would contain no pixels. */ public void setSourceSubsampling(int sourceXSubsampling, @@ -413,7 +413,7 @@ public abstract class IIOParam { * @param sourceBands an array of integer band indices to be * used. * - * @exception IllegalArgumentException if {@code sourceBands} + * @throws IllegalArgumentException if {@code sourceBands} * contains a negative or duplicate value. * * @see #getSourceBands @@ -537,7 +537,7 @@ public abstract class IIOParam { * @param destinationOffset the offset in the destination, as a * {@code Point}. * - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code destinationOffset} is {@code null}. * * @see #getDestinationOffset @@ -658,7 +658,7 @@ public abstract class IIOParam { * * @return {@code true} if the controller completed normally. * - * @exception IllegalStateException if there is no controller + * @throws IllegalStateException if there is no controller * currently installed. * * @see IIOParamController diff --git a/src/java.desktop/share/classes/javax/imageio/IIOParamController.java b/src/java.desktop/share/classes/javax/imageio/IIOParamController.java index 5d8a7017ccd12dd0fd547682702696a3930e0f57..9389a0093cd3a8fb3a08cd66909a6edbbb91850d 100644 --- a/src/java.desktop/share/classes/javax/imageio/IIOParamController.java +++ b/src/java.desktop/share/classes/javax/imageio/IIOParamController.java @@ -111,7 +111,7 @@ public interface IIOParamController { * @return {@code true} if the {@code IIOParam} has been * modified, {@code false} otherwise. * - * @exception IllegalArgumentException if {@code param} is + * @throws IllegalArgumentException if {@code param} is * {@code null} or is not an instance of the correct class. */ boolean activate(IIOParam param); diff --git a/src/java.desktop/share/classes/javax/imageio/ImageIO.java b/src/java.desktop/share/classes/javax/imageio/ImageIO.java index 8c62ef92b116bd11546fe61dc90740bf909170e9..9e87640967bd30d54bbbdf521bf72326f7fb99bc 100644 --- a/src/java.desktop/share/classes/javax/imageio/ImageIO.java +++ b/src/java.desktop/share/classes/javax/imageio/ImageIO.java @@ -277,9 +277,9 @@ public final class ImageIO { * * @see File#createTempFile(String, String, File) * - * @exception SecurityException if the security manager denies + * @throws SecurityException if the security manager denies * access to the directory. - * @exception IllegalArgumentException if {@code cacheDir} is + * @throws IllegalArgumentException if {@code cacheDir} is * non-{@code null} but is not a directory. * * @see #getCacheDirectory @@ -326,9 +326,9 @@ public final class ImageIO { * * @return an {@code ImageInputStream}, or {@code null}. * - * @exception IllegalArgumentException if {@code input} + * @throws IllegalArgumentException if {@code input} * is {@code null}. - * @exception IOException if a cache file is needed but cannot be + * @throws IOException if a cache file is needed but cannot be * created. * * @see javax.imageio.spi.ImageInputStreamSpi @@ -388,9 +388,9 @@ public final class ImageIO { * @return an {@code ImageOutputStream}, or * {@code null}. * - * @exception IllegalArgumentException if {@code output} is + * @throws IllegalArgumentException if {@code output} is * {@code null}. - * @exception IOException if a cache file is needed but cannot be + * @throws IOException if a cache file is needed but cannot be * created. * * @see javax.imageio.spi.ImageOutputStreamSpi @@ -637,7 +637,7 @@ public final class ImageIO { * * @return an {@code Iterator} containing {@code ImageReader}s. * - * @exception IllegalArgumentException if {@code input} is + * @throws IllegalArgumentException if {@code input} is * {@code null}. * * @see javax.imageio.spi.ImageReaderSpi#canDecodeInput @@ -697,7 +697,7 @@ public final class ImageIO { * @return an {@code Iterator} containing * {@code ImageReader}s. * - * @exception IllegalArgumentException if {@code formatName} + * @throws IllegalArgumentException if {@code formatName} * is {@code null}. * * @see javax.imageio.spi.ImageReaderSpi#getFormatNames @@ -732,7 +732,7 @@ public final class ImageIO { * @return an {@code Iterator} containing * {@code ImageReader}s. * - * @exception IllegalArgumentException if {@code fileSuffix} + * @throws IllegalArgumentException if {@code fileSuffix} * is {@code null}. * * @see javax.imageio.spi.ImageReaderSpi#getFileSuffixes @@ -767,7 +767,7 @@ public final class ImageIO { * @return an {@code Iterator} containing * {@code ImageReader}s. * - * @exception IllegalArgumentException if {@code MIMEType} is + * @throws IllegalArgumentException if {@code MIMEType} is * {@code null}. * * @see javax.imageio.spi.ImageReaderSpi#getMIMETypes @@ -880,7 +880,7 @@ public final class ImageIO { * @return an {@code Iterator} containing * {@code ImageWriter}s. * - * @exception IllegalArgumentException if {@code formatName} is + * @throws IllegalArgumentException if {@code formatName} is * {@code null}. * * @see javax.imageio.spi.ImageWriterSpi#getFormatNames @@ -914,7 +914,7 @@ public final class ImageIO { * * @return an {@code Iterator} containing {@code ImageWriter}s. * - * @exception IllegalArgumentException if {@code fileSuffix} is + * @throws IllegalArgumentException if {@code fileSuffix} is * {@code null}. * * @see javax.imageio.spi.ImageWriterSpi#getFileSuffixes @@ -948,7 +948,7 @@ public final class ImageIO { * * @return an {@code Iterator} containing {@code ImageWriter}s. * - * @exception IllegalArgumentException if {@code MIMEType} is + * @throws IllegalArgumentException if {@code MIMEType} is * {@code null}. * * @see javax.imageio.spi.ImageWriterSpi#getMIMETypes @@ -995,7 +995,7 @@ public final class ImageIO { * * @return an {@code ImageWriter}, or null. * - * @exception IllegalArgumentException if {@code reader} is + * @throws IllegalArgumentException if {@code reader} is * {@code null}. * * @see #getImageReader(ImageWriter) @@ -1075,7 +1075,7 @@ public final class ImageIO { * * @return an {@code ImageReader}, or null. * - * @exception IllegalArgumentException if {@code writer} is + * @throws IllegalArgumentException if {@code writer} is * {@code null}. * * @see #getImageWriter(ImageReader) @@ -1151,7 +1151,7 @@ public final class ImageIO { * * @return an {@code Iterator} containing {@code ImageWriter}s. * - * @exception IllegalArgumentException if any parameter is + * @throws IllegalArgumentException if any parameter is * {@code null}. * * @see javax.imageio.spi.ImageWriterSpi#canEncodeImage(ImageTypeSpecifier) @@ -1238,7 +1238,7 @@ public final class ImageIO { * @return an {@code Iterator} containing * {@code ImageTranscoder}s. * - * @exception IllegalArgumentException if {@code reader} or + * @throws IllegalArgumentException if {@code reader} or * {@code writer} is {@code null}. */ public static Iterator @@ -1295,9 +1295,9 @@ public final class ImageIO { * @return a {@code BufferedImage} containing the decoded * contents of the input, or {@code null}. * - * @exception IllegalArgumentException if {@code input} is + * @throws IllegalArgumentException if {@code input} is * {@code null}. - * @exception IOException if an error occurs during reading or when not + * @throws IOException if an error occurs during reading or when not * able to create required ImageInputStream. */ public static BufferedImage read(File input) throws IOException { @@ -1346,9 +1346,9 @@ public final class ImageIO { * @return a {@code BufferedImage} containing the decoded * contents of the input, or {@code null}. * - * @exception IllegalArgumentException if {@code input} is + * @throws IllegalArgumentException if {@code input} is * {@code null}. - * @exception IOException if an error occurs during reading or when not + * @throws IOException if an error occurs during reading or when not * able to create required ImageInputStream. */ public static BufferedImage read(InputStream input) throws IOException { @@ -1390,9 +1390,9 @@ public final class ImageIO { * @return a {@code BufferedImage} containing the decoded * contents of the input, or {@code null}. * - * @exception IllegalArgumentException if {@code input} is + * @throws IllegalArgumentException if {@code input} is * {@code null}. - * @exception IOException if an error occurs during reading or when not + * @throws IOException if an error occurs during reading or when not * able to create required ImageInputStream. */ public static BufferedImage read(URL input) throws IOException { @@ -1443,9 +1443,9 @@ public final class ImageIO { * @return a {@code BufferedImage} containing the decoded * contents of the input, or {@code null}. * - * @exception IllegalArgumentException if {@code stream} is + * @throws IllegalArgumentException if {@code stream} is * {@code null}. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public static BufferedImage read(ImageInputStream stream) throws IOException { @@ -1489,9 +1489,9 @@ public final class ImageIO { * * @return {@code false} if no appropriate writer is found. * - * @exception IllegalArgumentException if any parameter is + * @throws IllegalArgumentException if any parameter is * {@code null}. - * @exception IOException if an error occurs during writing. + * @throws IOException if an error occurs during writing. */ public static boolean write(RenderedImage im, String formatName, @@ -1522,9 +1522,9 @@ public final class ImageIO { * * @return {@code false} if no appropriate writer is found. * - * @exception IllegalArgumentException if any parameter is + * @throws IllegalArgumentException if any parameter is * {@code null}. - * @exception IOException if an error occurs during writing or when not + * @throws IOException if an error occurs during writing or when not * able to create required ImageOutputStream. */ public static boolean write(RenderedImage im, @@ -1570,9 +1570,9 @@ public final class ImageIO { * * @return {@code false} if no appropriate writer is found. * - * @exception IllegalArgumentException if any parameter is + * @throws IllegalArgumentException if any parameter is * {@code null}. - * @exception IOException if an error occurs during writing or when not + * @throws IOException if an error occurs during writing or when not * able to create required ImageOutputStream. */ public static boolean write(RenderedImage im, diff --git a/src/java.desktop/share/classes/javax/imageio/ImageReadParam.java b/src/java.desktop/share/classes/javax/imageio/ImageReadParam.java index d2181a18115cd6d5d465f3a14185371d3fdcab79..00866f60e7b135d85322a735861b16fc23883fd7 100644 --- a/src/java.desktop/share/classes/javax/imageio/ImageReadParam.java +++ b/src/java.desktop/share/classes/javax/imageio/ImageReadParam.java @@ -272,7 +272,7 @@ public class ImageReadParam extends IIOParam { * @param destinationBands an array of integer band indices to be * used. * - * @exception IllegalArgumentException if {@code destinationBands} + * @throws IllegalArgumentException if {@code destinationBands} * contains a negative or duplicate value. * * @see #getDestinationBands @@ -360,9 +360,9 @@ public class ImageReadParam extends IIOParam { * @param size a {@code Dimension} indicating the desired * width and height. * - * @exception IllegalArgumentException if either the width or the + * @throws IllegalArgumentException if either the width or the * height is negative or 0. - * @exception UnsupportedOperationException if image resizing + * @throws UnsupportedOperationException if image resizing * is not supported by this plug-in. * * @see #getSourceRenderSize @@ -433,7 +433,7 @@ public class ImageReadParam extends IIOParam { * @param minPass the index of the first pass to be decoded. * @param numPasses the maximum number of passes to be decoded. * - * @exception IllegalArgumentException if {@code minPass} is + * @throws IllegalArgumentException if {@code minPass} is * negative, {@code numPasses} is negative or 0, or * {@code numPasses} is smaller than * {@code Integer.MAX_VALUE} but diff --git a/src/java.desktop/share/classes/javax/imageio/ImageReader.java b/src/java.desktop/share/classes/javax/imageio/ImageReader.java index e17a5f2e7962598696a6318613a9547ff3e59708..97092ec7de9c6cca08155c1a3b0bcef78a71ac26 100644 --- a/src/java.desktop/share/classes/javax/imageio/ImageReader.java +++ b/src/java.desktop/share/classes/javax/imageio/ImageReader.java @@ -196,7 +196,7 @@ public abstract class ImageReader { * provider, or which desire a different naming policy should * override this method. * - * @exception IOException if an error occurs reading the + * @throws IOException if an error occurs reading the * information from the input source. * * @return the format name, as a {@code String}. @@ -276,7 +276,7 @@ public abstract class ImageReader { * @param ignoreMetadata if {@code true}, metadata * may be ignored during reads. * - * @exception IllegalArgumentException if {@code input} is + * @throws IllegalArgumentException if {@code input} is * not an instance of one of the classes returned by the * originating service provider's {@code getInputTypes} * method, or is not an {@code ImageInputStream}. @@ -343,7 +343,7 @@ public abstract class ImageReader { * @param seekForwardOnly if {@code true}, images and metadata * may only be read in ascending order from this input source. * - * @exception IllegalArgumentException if {@code input} is + * @throws IllegalArgumentException if {@code input} is * not an instance of one of the classes returned by the * originating service provider's {@code getInputTypes} * method, or is not an {@code ImageInputStream}. @@ -369,7 +369,7 @@ public abstract class ImageReader { * @param input the {@code ImageInputStream} or other * {@code Object} to use for future decoding. * - * @exception IllegalArgumentException if {@code input} is + * @throws IllegalArgumentException if {@code input} is * not an instance of one of the classes returned by the * originating service provider's {@code getInputTypes} * method, or is not an {@code ImageInputStream}. @@ -470,7 +470,7 @@ public abstract class ImageReader { * @param locale the desired {@code Locale}, or * {@code null}. * - * @exception IllegalArgumentException if {@code locale} is + * @throws IllegalArgumentException if {@code locale} is * non-{@code null} but is not one of the values returned by * {@code getAvailableLocales}. * @@ -538,10 +538,10 @@ public abstract class ImageReader { * {@code -1} if {@code allowSearch} is * {@code false} and a search would be required. * - * @exception IllegalStateException if the input source has not been set, + * @throws IllegalStateException if the input source has not been set, * or if the input has been specified with {@code seekForwardOnly} * set to {@code true}. - * @exception IOException if an error occurs reading the + * @throws IOException if an error occurs reading the * information from the input source. * * @see #setInput @@ -559,10 +559,10 @@ public abstract class ImageReader { * * @return the width of the image, as an {@code int}. * - * @exception IllegalStateException if the input source has not been set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IllegalStateException if the input source has not been set. + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IOException if an error occurs reading the width + * @throws IOException if an error occurs reading the width * information from the input source. */ public abstract int getWidth(int imageIndex) throws IOException; @@ -578,10 +578,10 @@ public abstract class ImageReader { * * @return the height of the image, as an {@code int}. * - * @exception IllegalStateException if the input source has not been set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IllegalStateException if the input source has not been set. + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IOException if an error occurs reading the height + * @throws IOException if an error occurs reading the height * information from the input source. */ public abstract int getHeight(int imageIndex) throws IOException; @@ -617,12 +617,12 @@ public abstract class ImageReader { * @return {@code true} if reading a region of interest of * the given image is likely to be efficient. * - * @exception IllegalStateException if an input source is required + * @throws IllegalStateException if an input source is required * to determine the return value, but none has been set. - * @exception IndexOutOfBoundsException if an image must be + * @throws IndexOutOfBoundsException if an image must be * accessed to determine the return value, but the supplied index * is out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public boolean isRandomAccessEasy(int imageIndex) throws IOException { return false; @@ -644,10 +644,10 @@ public abstract class ImageReader { * @return a {@code float} indicating the aspect ratio of the * given image. * - * @exception IllegalStateException if the input source has not been set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IllegalStateException if the input source has not been set. + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public float getAspectRatio(int imageIndex) throws IOException { return (float)getWidth(imageIndex)/getHeight(imageIndex); @@ -669,10 +669,10 @@ public abstract class ImageReader { * * @return an {@code ImageTypeSpecifier}. * - * @exception IllegalStateException if the input source has not been set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IllegalStateException if the input source has not been set. + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IOException if an error occurs reading the format + * @throws IOException if an error occurs reading the format * information from the input source. */ public ImageTypeSpecifier getRawImageType(int imageIndex) @@ -699,10 +699,10 @@ public abstract class ImageReader { * {@code ImageTypeSpecifier} representing suggested image * types for decoding the current given image. * - * @exception IllegalStateException if the input source has not been set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IllegalStateException if the input source has not been set. + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IOException if an error occurs reading the format + * @throws IOException if an error occurs reading the format * information from the input source. * * @see ImageReadParam#setDestination(BufferedImage) @@ -739,7 +739,7 @@ public abstract class ImageReader { * * @return an {@code IIOMetadata} object, or {@code null}. * - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public abstract IIOMetadata getStreamMetadata() throws IOException; @@ -778,11 +778,11 @@ public abstract class ImageReader { * * @return an {@code IIOMetadata} object, or {@code null}. * - * @exception IllegalArgumentException if {@code formatName} + * @throws IllegalArgumentException if {@code formatName} * is {@code null}. - * @exception IllegalArgumentException if {@code nodeNames} + * @throws IllegalArgumentException if {@code nodeNames} * is {@code null}. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public IIOMetadata getStreamMetadata(String formatName, Set nodeNames) @@ -839,11 +839,11 @@ public abstract class ImageReader { * @return an {@code IIOMetadata} object, or * {@code null}. * - * @exception IllegalStateException if the input source has not been + * @throws IllegalStateException if the input source has not been * set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public abstract IIOMetadata getImageMetadata(int imageIndex) throws IOException; @@ -885,15 +885,15 @@ public abstract class ImageReader { * * @return an {@code IIOMetadata} object, or {@code null}. * - * @exception IllegalStateException if the input source has not been + * @throws IllegalStateException if the input source has not been * set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IllegalArgumentException if {@code formatName} + * @throws IllegalArgumentException if {@code formatName} * is {@code null}. - * @exception IllegalArgumentException if {@code nodeNames} + * @throws IllegalArgumentException if {@code nodeNames} * is {@code null}. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public IIOMetadata getImageMetadata(int imageIndex, String formatName, @@ -928,11 +928,11 @@ public abstract class ImageReader { * @return the desired portion of the image as a * {@code BufferedImage}. * - * @exception IllegalStateException if the input source has not been + * @throws IllegalStateException if the input source has not been * set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public BufferedImage read(int imageIndex) throws IOException { return read(imageIndex, null); @@ -980,18 +980,18 @@ public abstract class ImageReader { * @return the desired portion of the image as a * {@code BufferedImage}. * - * @exception IllegalStateException if the input source has not been + * @throws IllegalStateException if the input source has not been * set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IllegalArgumentException if the set of source and + * @throws IllegalArgumentException if the set of source and * destination bands specified by * {@code param.getSourceBands} and * {@code param.getDestinationBands} differ in length or * include indices that are out of bounds. - * @exception IllegalArgumentException if the resulting image would + * @throws IllegalArgumentException if the resulting image would * have a width or height less than 1. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public abstract BufferedImage read(int imageIndex, ImageReadParam param) throws IOException; @@ -1043,18 +1043,18 @@ public abstract class ImageReader { * of the image, a set of thumbnails, and associated image * metadata. * - * @exception IllegalStateException if the input source has not been + * @throws IllegalStateException if the input source has not been * set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IllegalArgumentException if the set of source and + * @throws IllegalArgumentException if the set of source and * destination bands specified by * {@code param.getSourceBands} and * {@code param.getDestinationBands} differ in length or * include indices that are out of bounds. - * @exception IllegalArgumentException if the resulting image + * @throws IllegalArgumentException if the resulting image * would have a width or height less than 1. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public IIOImage readAll(int imageIndex, ImageReadParam param) throws IOException { @@ -1134,19 +1134,19 @@ public abstract class ImageReader { * @return an {@code Iterator} representing the * contents of the input source as {@code IIOImage}s. * - * @exception IllegalStateException if the input source has not been + * @throws IllegalStateException if the input source has not been * set. - * @exception IllegalArgumentException if any + * @throws IllegalArgumentException if any * non-{@code null} element of {@code params} is not an * {@code ImageReadParam}. - * @exception IllegalArgumentException if the set of source and + * @throws IllegalArgumentException if the set of source and * destination bands specified by * {@code param.getSourceBands} and * {@code param.getDestinationBands} differ in length or * include indices that are out of bounds. - * @exception IllegalArgumentException if a resulting image would + * @throws IllegalArgumentException if a resulting image would * have a width or height less than 1. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. * * @see ImageReadParam * @see IIOImage @@ -1267,13 +1267,13 @@ public abstract class ImageReader { * @return the desired portion of the image as a * {@code Raster}. * - * @exception UnsupportedOperationException if this plug-in does not + * @throws UnsupportedOperationException if this plug-in does not * support reading raw {@code Raster}s. - * @exception IllegalStateException if the input source has not been + * @throws IllegalStateException if the input source has not been * set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. * * @see #canReadRaster * @see #read @@ -1310,12 +1310,12 @@ public abstract class ImageReader { * * @return {@code true} if the image is tiled. * - * @exception IllegalStateException if an input source is required + * @throws IllegalStateException if an input source is required * to determine the return value, but none has been set. - * @exception IndexOutOfBoundsException if an image must be + * @throws IndexOutOfBoundsException if an image must be * accessed to determine the return value, but the supplied index * is out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public boolean isImageTiled(int imageIndex) throws IOException { return false; @@ -1333,10 +1333,10 @@ public abstract class ImageReader { * * @param imageIndex the index of the image to be queried. * - * @exception IllegalStateException if the input source has not been set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IllegalStateException if the input source has not been set. + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public int getTileWidth(int imageIndex) throws IOException { return getWidth(imageIndex); @@ -1354,10 +1354,10 @@ public abstract class ImageReader { * * @param imageIndex the index of the image to be queried. * - * @exception IllegalStateException if the input source has not been set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IllegalStateException if the input source has not been set. + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public int getTileHeight(int imageIndex) throws IOException { return getHeight(imageIndex); @@ -1382,12 +1382,12 @@ public abstract class ImageReader { * * @param imageIndex the index of the image to be queried. * - * @exception IllegalStateException if an input source is required + * @throws IllegalStateException if an input source is required * to determine the return value, but none has been set. - * @exception IndexOutOfBoundsException if an image must be + * @throws IndexOutOfBoundsException if an image must be * accessed to determine the return value, but the supplied index * is out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public int getTileGridXOffset(int imageIndex) throws IOException { return 0; @@ -1412,12 +1412,12 @@ public abstract class ImageReader { * * @param imageIndex the index of the image to be queried. * - * @exception IllegalStateException if an input source is required + * @throws IllegalStateException if an input source is required * to determine the return value, but none has been set. - * @exception IndexOutOfBoundsException if an image must be + * @throws IndexOutOfBoundsException if an image must be * accessed to determine the return value, but the supplied index * is out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public int getTileGridYOffset(int imageIndex) throws IOException { return 0; @@ -1455,13 +1455,13 @@ public abstract class ImageReader { * * @return the tile as a {@code BufferedImage}. * - * @exception IllegalStateException if the input source has not been + * @throws IllegalStateException if the input source has not been * set. - * @exception IndexOutOfBoundsException if {@code imageIndex} + * @throws IndexOutOfBoundsException if {@code imageIndex} * is out of bounds. - * @exception IllegalArgumentException if the tile indices are + * @throws IllegalArgumentException if the tile indices are * out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public BufferedImage readTile(int imageIndex, int tileX, int tileY) throws IOException { @@ -1495,15 +1495,15 @@ public abstract class ImageReader { * * @return the tile as a {@code Raster}. * - * @exception UnsupportedOperationException if this plug-in does not + * @throws UnsupportedOperationException if this plug-in does not * support reading raw {@code Raster}s. - * @exception IllegalArgumentException if the tile indices are + * @throws IllegalArgumentException if the tile indices are * out of bounds. - * @exception IllegalStateException if the input source has not been + * @throws IllegalStateException if the input source has not been * set. - * @exception IndexOutOfBoundsException if {@code imageIndex} + * @throws IndexOutOfBoundsException if {@code imageIndex} * is out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. * * @see #readTile * @see #readRaster @@ -1554,18 +1554,18 @@ public abstract class ImageReader { * @return a {@code RenderedImage} object providing a view of * the image. * - * @exception IllegalStateException if the input source has not been + * @throws IllegalStateException if the input source has not been * set. - * @exception IndexOutOfBoundsException if the supplied index is + * @throws IndexOutOfBoundsException if the supplied index is * out of bounds. - * @exception IllegalArgumentException if the set of source and + * @throws IllegalArgumentException if the set of source and * destination bands specified by * {@code param.getSourceBands} and * {@code param.getDestinationBands} differ in length or * include indices that are out of bounds. - * @exception IllegalArgumentException if the resulting image + * @throws IllegalArgumentException if the resulting image * would have a width or height less than 1. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public RenderedImage readAsRenderedImage(int imageIndex, ImageReadParam param) @@ -1611,11 +1611,11 @@ public abstract class ImageReader { * * @return {@code true} if the given image has thumbnails. * - * @exception IllegalStateException if the reader supports + * @throws IllegalStateException if the reader supports * thumbnails but the input source has not been set. - * @exception IndexOutOfBoundsException if the reader supports + * @throws IndexOutOfBoundsException if the reader supports * thumbnails but {@code imageIndex} is out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public boolean hasThumbnails(int imageIndex) throws IOException { return getNumThumbnails(imageIndex) > 0; @@ -1637,11 +1637,11 @@ public abstract class ImageReader { * @return the number of thumbnails associated with the given * image. * - * @exception IllegalStateException if the reader supports + * @throws IllegalStateException if the reader supports * thumbnails but the input source has not been set. - * @exception IndexOutOfBoundsException if the reader supports + * @throws IndexOutOfBoundsException if the reader supports * thumbnails but {@code imageIndex} is out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public int getNumThumbnails(int imageIndex) throws IOException { @@ -1669,12 +1669,12 @@ public abstract class ImageReader { * * @return the width of the desired thumbnail as an {@code int}. * - * @exception UnsupportedOperationException if thumbnails are not + * @throws UnsupportedOperationException if thumbnails are not * supported. - * @exception IllegalStateException if the input source has not been set. - * @exception IndexOutOfBoundsException if either of the supplied + * @throws IllegalStateException if the input source has not been set. + * @throws IndexOutOfBoundsException if either of the supplied * indices are out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public int getThumbnailWidth(int imageIndex, int thumbnailIndex) throws IOException { @@ -1702,12 +1702,12 @@ public abstract class ImageReader { * * @return the height of the desired thumbnail as an {@code int}. * - * @exception UnsupportedOperationException if thumbnails are not + * @throws UnsupportedOperationException if thumbnails are not * supported. - * @exception IllegalStateException if the input source has not been set. - * @exception IndexOutOfBoundsException if either of the supplied + * @throws IllegalStateException if the input source has not been set. + * @throws IndexOutOfBoundsException if either of the supplied * indices are out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public int getThumbnailHeight(int imageIndex, int thumbnailIndex) throws IOException { @@ -1738,12 +1738,12 @@ public abstract class ImageReader { * * @return the desired thumbnail as a {@code BufferedImage}. * - * @exception UnsupportedOperationException if thumbnails are not + * @throws UnsupportedOperationException if thumbnails are not * supported. - * @exception IllegalStateException if the input source has not been set. - * @exception IndexOutOfBoundsException if either of the supplied + * @throws IllegalStateException if the input source has not been set. + * @throws IndexOutOfBoundsException if either of the supplied * indices are out of bounds. - * @exception IOException if an error occurs during reading. + * @throws IOException if an error occurs during reading. */ public BufferedImage readThumbnail(int imageIndex, int thumbnailIndex) @@ -2388,7 +2388,7 @@ public abstract class ImageReader { * * @param warning the warning message to send. * - * @exception IllegalArgumentException if {@code warning} + * @throws IllegalArgumentException if {@code warning} * is {@code null}. */ protected void processWarningOccurred(String warning) { @@ -2420,15 +2420,15 @@ public abstract class ImageReader { * @param keyword the keyword used to index the warning message * within the set of {@code ResourceBundle}s. * - * @exception IllegalArgumentException if {@code baseName} + * @throws IllegalArgumentException if {@code baseName} * is {@code null}. - * @exception IllegalArgumentException if {@code keyword} + * @throws IllegalArgumentException if {@code keyword} * is {@code null}. - * @exception IllegalArgumentException if no appropriate + * @throws IllegalArgumentException if no appropriate * {@code ResourceBundle} may be located. - * @exception IllegalArgumentException if the named resource is + * @throws IllegalArgumentException if the named resource is * not found in the located {@code ResourceBundle}. - * @exception IllegalArgumentException if the object retrieved + * @throws IllegalArgumentException if the object retrieved * from the {@code ResourceBundle} is not a * {@code String}. */ @@ -2594,11 +2594,11 @@ public abstract class ImageReader { * the source region of interest. * @param destRegion a {@code Rectangle} that will be filled with * the destination region of interest. - * @exception IllegalArgumentException if {@code srcRegion} + * @throws IllegalArgumentException if {@code srcRegion} * is {@code null}. - * @exception IllegalArgumentException if {@code dstRegion} + * @throws IllegalArgumentException if {@code dstRegion} * is {@code null}. - * @exception IllegalArgumentException if the resulting source or + * @throws IllegalArgumentException if the resulting source or * destination region is empty. */ protected static void computeRegions(ImageReadParam param, @@ -2720,7 +2720,7 @@ public abstract class ImageReader { * @param numDstBands the number of bands in the destination image * being written. * - * @exception IllegalArgumentException if {@code param} + * @throws IllegalArgumentException if {@code param} * contains an invalid specification of a source and/or * destination band subset. */ @@ -2797,15 +2797,15 @@ public abstract class ImageReader { * @return the {@code BufferedImage} to which decoded pixel * data should be written. * - * @exception IIOException if the {@code ImageTypeSpecifier} + * @throws IIOException if the {@code ImageTypeSpecifier} * specified by {@code param} does not match any of the legal * ones from {@code imageTypes}. - * @exception IllegalArgumentException if {@code imageTypes} + * @throws IllegalArgumentException if {@code imageTypes} * is {@code null} or empty, or if an object not of type * {@code ImageTypeSpecifier} is retrieved from it. - * @exception IllegalArgumentException if the resulting image would + * @throws IllegalArgumentException if the resulting image would * have a width or height less than 1. - * @exception IllegalArgumentException if the product of + * @throws IllegalArgumentException if the product of * {@code width} and {@code height} is greater than * {@code Integer.MAX_VALUE}. */ diff --git a/src/java.desktop/share/classes/javax/imageio/ImageTranscoder.java b/src/java.desktop/share/classes/javax/imageio/ImageTranscoder.java index 3ce8fc88710b59386f8b9b9028dc518f9b806aee..d2832c49a1fdd2190006304261f5bf736d1a5871 100644 --- a/src/java.desktop/share/classes/javax/imageio/ImageTranscoder.java +++ b/src/java.desktop/share/classes/javax/imageio/ImageTranscoder.java @@ -109,7 +109,7 @@ public interface ImageTranscoder { * {@code null} if the plug-in does not provide metadata * encoding capabilities. * - * @exception IllegalArgumentException if {@code inData} is + * @throws IllegalArgumentException if {@code inData} is * {@code null}. */ IIOMetadata convertStreamMetadata(IIOMetadata inData, @@ -142,7 +142,7 @@ public interface ImageTranscoder { * or {@code null} if the plug-in does not provide * metadata encoding capabilities. * - * @exception IllegalArgumentException if either of + * @throws IllegalArgumentException if either of * {@code inData} or {@code imageType} is * {@code null}. */ diff --git a/src/java.desktop/share/classes/javax/imageio/ImageTypeSpecifier.java b/src/java.desktop/share/classes/javax/imageio/ImageTypeSpecifier.java index e328d7499bcd28be7794db995a9c1cfc5116a9d0..b94b7709d2bf0cdaa8473c3c877583f978a8e917 100644 --- a/src/java.desktop/share/classes/javax/imageio/ImageTypeSpecifier.java +++ b/src/java.desktop/share/classes/javax/imageio/ImageTypeSpecifier.java @@ -90,9 +90,9 @@ public class ImageTypeSpecifier { * @param colorModel a {@code ColorModel}. * @param sampleModel a {@code SampleModel}. * - * @exception IllegalArgumentException if either parameter is + * @throws IllegalArgumentException if either parameter is * {@code null}. - * @exception IllegalArgumentException if {@code sampleModel} + * @throws IllegalArgumentException if {@code sampleModel} * is not compatible with {@code colorModel}. */ public ImageTypeSpecifier(ColorModel colorModel, SampleModel sampleModel) { @@ -120,7 +120,7 @@ public class ImageTypeSpecifier { * * @param image a {@code RenderedImage}. * - * @exception IllegalArgumentException if the argument is + * @throws IllegalArgumentException if the argument is * {@code null}. */ public ImageTypeSpecifier(RenderedImage image) { @@ -208,13 +208,13 @@ public class ImageTypeSpecifier { * @return an {@code ImageTypeSpecifier} with the desired * characteristics. * - * @exception IllegalArgumentException if {@code colorSpace} + * @throws IllegalArgumentException if {@code colorSpace} * is {@code null}. - * @exception IllegalArgumentException if {@code colorSpace} + * @throws IllegalArgumentException if {@code colorSpace} * is not of type {@code TYPE_RGB}. - * @exception IllegalArgumentException if no mask has at least 1 + * @throws IllegalArgumentException if no mask has at least 1 * bit set. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code transferType} if not one of * {@code DataBuffer.TYPE_BYTE}, * {@code DataBuffer.TYPE_USHORT}, or @@ -375,13 +375,13 @@ public class ImageTypeSpecifier { * @return an {@code ImageTypeSpecifier} with the desired * characteristics. * - * @exception IllegalArgumentException if {@code colorSpace} + * @throws IllegalArgumentException if {@code colorSpace} * is {@code null}. - * @exception IllegalArgumentException if {@code bandOffsets} + * @throws IllegalArgumentException if {@code bandOffsets} * is {@code null}. - * @exception IllegalArgumentException if {@code dataType} is + * @throws IllegalArgumentException if {@code dataType} is * not one of the legal {@code DataBuffer.TYPE_*} constants. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code bandOffsets.length} does not equal the number of * color space components, plus 1 if {@code hasAlpha} is * {@code true}. @@ -525,19 +525,19 @@ public class ImageTypeSpecifier { * @return an {@code ImageTypeSpecifier} with the desired * characteristics. * - * @exception IllegalArgumentException if {@code colorSpace} + * @throws IllegalArgumentException if {@code colorSpace} * is {@code null}. - * @exception IllegalArgumentException if {@code bankIndices} + * @throws IllegalArgumentException if {@code bankIndices} * is {@code null}. - * @exception IllegalArgumentException if {@code bandOffsets} + * @throws IllegalArgumentException if {@code bandOffsets} * is {@code null}. - * @exception IllegalArgumentException if the lengths of + * @throws IllegalArgumentException if the lengths of * {@code bankIndices} and {@code bandOffsets} differ. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code bandOffsets.length} does not equal the number of * color space components, plus 1 if {@code hasAlpha} is * {@code true}. - * @exception IllegalArgumentException if {@code dataType} is + * @throws IllegalArgumentException if {@code dataType} is * not one of the legal {@code DataBuffer.TYPE_*} constants. */ public static ImageTypeSpecifier @@ -661,13 +661,13 @@ public class ImageTypeSpecifier { * @return an {@code ImageTypeSpecifier} with the desired * characteristics. * - * @exception IllegalArgumentException if {@code bits} is + * @throws IllegalArgumentException if {@code bits} is * not one of 1, 2, 4, 8, or 16. - * @exception IllegalArgumentException if {@code dataType} is + * @throws IllegalArgumentException if {@code dataType} is * not one of {@code DataBuffer.TYPE_BYTE}, * {@code DataBuffer.TYPE_SHORT}, or * {@code DataBuffer.TYPE_USHORT}. - * @exception IllegalArgumentException if {@code bits} is + * @throws IllegalArgumentException if {@code bits} is * larger than the bit size of the given {@code dataType}. */ public static ImageTypeSpecifier @@ -697,13 +697,13 @@ public class ImageTypeSpecifier { * @return an {@code ImageTypeSpecifier} with the desired * characteristics. * - * @exception IllegalArgumentException if {@code bits} is + * @throws IllegalArgumentException if {@code bits} is * not one of 1, 2, 4, 8, or 16. - * @exception IllegalArgumentException if {@code dataType} is + * @throws IllegalArgumentException if {@code dataType} is * not one of {@code DataBuffer.TYPE_BYTE}, * {@code DataBuffer.TYPE_SHORT}, or * {@code DataBuffer.TYPE_USHORT}. - * @exception IllegalArgumentException if {@code bits} is + * @throws IllegalArgumentException if {@code bits} is * larger than the bit size of the given {@code dataType}. */ public static ImageTypeSpecifier @@ -822,23 +822,23 @@ public class ImageTypeSpecifier { * @return an {@code ImageTypeSpecifier} with the desired * characteristics. * - * @exception IllegalArgumentException if {@code redLUT} is + * @throws IllegalArgumentException if {@code redLUT} is * {@code null}. - * @exception IllegalArgumentException if {@code greenLUT} is + * @throws IllegalArgumentException if {@code greenLUT} is * {@code null}. - * @exception IllegalArgumentException if {@code blueLUT} is + * @throws IllegalArgumentException if {@code blueLUT} is * {@code null}. - * @exception IllegalArgumentException if {@code bits} is + * @throws IllegalArgumentException if {@code bits} is * not one of 1, 2, 4, 8, or 16. - * @exception IllegalArgumentException if the + * @throws IllegalArgumentException if the * non-{@code null} LUT parameters do not have lengths of * exactly {@code 1 << bits}. - * @exception IllegalArgumentException if {@code dataType} is + * @throws IllegalArgumentException if {@code dataType} is * not one of {@code DataBuffer.TYPE_BYTE}, * {@code DataBuffer.TYPE_SHORT}, * {@code DataBuffer.TYPE_USHORT}, * or {@code DataBuffer.TYPE_INT}. - * @exception IllegalArgumentException if {@code bits} is + * @throws IllegalArgumentException if {@code bits} is * larger than the bit size of the given {@code dataType}. */ public static ImageTypeSpecifier @@ -867,7 +867,7 @@ public class ImageTypeSpecifier { * @return an {@code ImageTypeSpecifier} with the desired * characteristics. * - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code bufferedImageType} is not one of the standard * types, or is equal to {@code TYPE_CUSTOM}. * @@ -908,7 +908,7 @@ public class ImageTypeSpecifier { * @return an {@code ImageTypeSpecifier} with the desired * characteristics. * - * @exception IllegalArgumentException if {@code image} is + * @throws IllegalArgumentException if {@code image} is * {@code null}. */ public static @@ -985,7 +985,7 @@ public class ImageTypeSpecifier { * * @return an int specifying a number of bits. * - * @exception IllegalArgumentException if {@code band} is + * @throws IllegalArgumentException if {@code band} is * negative or greater than the largest band index. */ public int getBitsPerBand(int band) { @@ -1017,9 +1017,9 @@ public class ImageTypeSpecifier { * * @return a {@code SampleModel} with the given dimensions. * - * @exception IllegalArgumentException if either {@code width} or + * @throws IllegalArgumentException if either {@code width} or * {@code height} are negative or zero. - * @exception IllegalArgumentException if the product of + * @throws IllegalArgumentException if the product of * {@code width} and {@code height} is greater than * {@code Integer.MAX_VALUE} */ @@ -1051,9 +1051,9 @@ public class ImageTypeSpecifier { * * @return a new {@code BufferedImage} * - * @exception IllegalArgumentException if either {@code width} or + * @throws IllegalArgumentException if either {@code width} or * {@code height} are negative or zero. - * @exception IllegalArgumentException if the product of + * @throws IllegalArgumentException if the product of * {@code width} and {@code height} is greater than * {@code Integer.MAX_VALUE}, or if the number of array * elements needed to store the image is greater than diff --git a/src/java.desktop/share/classes/javax/imageio/ImageWriteParam.java b/src/java.desktop/share/classes/javax/imageio/ImageWriteParam.java index cbaa5781271616e0009d1be73822cc8de1b88cf2..482730ba888616035eb6cbc9a383136d16f7abd9 100644 --- a/src/java.desktop/share/classes/javax/imageio/ImageWriteParam.java +++ b/src/java.desktop/share/classes/javax/imageio/ImageWriteParam.java @@ -474,9 +474,9 @@ public class ImageWriteParam extends IIOParam { * * @param mode The mode to use for tiling. * - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canWriteTiles} returns {@code false}. - * @exception IllegalArgumentException if {@code mode} is not + * @throws IllegalArgumentException if {@code mode} is not * one of the modes listed above. * * @see #setTiling @@ -501,7 +501,7 @@ public class ImageWriteParam extends IIOParam { * * @return the current tiling mode. * - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canWriteTiles} returns {@code false}. * * @see #setTilingMode @@ -530,7 +530,7 @@ public class ImageWriteParam extends IIOParam { *

    If no array is specified on the constructor, but tiling is * allowed, then this method returns {@code null}. * - * @exception UnsupportedOperationException if the plug-in does + * @throws UnsupportedOperationException if the plug-in does * not support tiling. * * @return an array of {@code Dimension}s with an even length @@ -559,16 +559,16 @@ public class ImageWriteParam extends IIOParam { * @param tileGridXOffset the horizontal offset of the tile grid. * @param tileGridYOffset the vertical offset of the tile grid. * - * @exception UnsupportedOperationException if the plug-in does not + * @throws UnsupportedOperationException if the plug-in does not * support tiling. - * @exception IllegalStateException if the tiling mode is not + * @throws IllegalStateException if the tiling mode is not * {@code MODE_EXPLICIT}. - * @exception UnsupportedOperationException if the plug-in does not + * @throws UnsupportedOperationException if the plug-in does not * support grid offsets, and the grid offsets are not both zero. - * @exception IllegalArgumentException if the tile size is not + * @throws IllegalArgumentException if the tile size is not * within one of the allowable ranges returned by * {@code getPreferredTileSizes}. - * @exception IllegalArgumentException if {@code tileWidth} + * @throws IllegalArgumentException if {@code tileWidth} * or {@code tileHeight} is less than or equal to 0. * * @see #canWriteTiles @@ -630,9 +630,9 @@ public class ImageWriteParam extends IIOParam { * {@code tileGridXOffset}, and * {@code tileGridYOffset} to {@code 0}. * - * @exception UnsupportedOperationException if the plug-in does not + * @throws UnsupportedOperationException if the plug-in does not * support tiling. - * @exception IllegalStateException if the tiling mode is not + * @throws IllegalStateException if the tiling mode is not * {@code MODE_EXPLICIT}. * * @see #setTiling(int, int, int, int) @@ -658,11 +658,11 @@ public class ImageWriteParam extends IIOParam { * * @return the tile width to be used for encoding. * - * @exception UnsupportedOperationException if the plug-in does not + * @throws UnsupportedOperationException if the plug-in does not * support tiling. - * @exception IllegalStateException if the tiling mode is not + * @throws IllegalStateException if the tiling mode is not * {@code MODE_EXPLICIT}. - * @exception IllegalStateException if the tiling parameters have + * @throws IllegalStateException if the tiling parameters have * not been set. * * @see #setTiling(int, int, int, int) @@ -688,11 +688,11 @@ public class ImageWriteParam extends IIOParam { * * @return the tile height to be used for encoding. * - * @exception UnsupportedOperationException if the plug-in does not + * @throws UnsupportedOperationException if the plug-in does not * support tiling. - * @exception IllegalStateException if the tiling mode is not + * @throws IllegalStateException if the tiling mode is not * {@code MODE_EXPLICIT}. - * @exception IllegalStateException if the tiling parameters have + * @throws IllegalStateException if the tiling parameters have * not been set. * * @see #setTiling(int, int, int, int) @@ -718,11 +718,11 @@ public class ImageWriteParam extends IIOParam { * * @return the tile grid X offset to be used for encoding. * - * @exception UnsupportedOperationException if the plug-in does not + * @throws UnsupportedOperationException if the plug-in does not * support tiling. - * @exception IllegalStateException if the tiling mode is not + * @throws IllegalStateException if the tiling mode is not * {@code MODE_EXPLICIT}. - * @exception IllegalStateException if the tiling parameters have + * @throws IllegalStateException if the tiling parameters have * not been set. * * @see #setTiling(int, int, int, int) @@ -748,11 +748,11 @@ public class ImageWriteParam extends IIOParam { * * @return the tile grid Y offset to be used for encoding. * - * @exception UnsupportedOperationException if the plug-in does not + * @throws UnsupportedOperationException if the plug-in does not * support tiling. - * @exception IllegalStateException if the tiling mode is not + * @throws IllegalStateException if the tiling mode is not * {@code MODE_EXPLICIT}. - * @exception IllegalStateException if the tiling parameters have + * @throws IllegalStateException if the tiling parameters have * not been set. * * @see #setTiling(int, int, int, int) @@ -818,9 +818,9 @@ public class ImageWriteParam extends IIOParam { * @param mode The mode for setting progression in the output * stream. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support progressive encoding. - * @exception IllegalArgumentException if {@code mode} is not + * @throws IllegalArgumentException if {@code mode} is not * one of the modes listed above. * * @see #getProgressiveMode @@ -846,7 +846,7 @@ public class ImageWriteParam extends IIOParam { * * @return the current mode for progressive encoding. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support progressive encoding. * * @see #setProgressiveMode @@ -902,9 +902,9 @@ public class ImageWriteParam extends IIOParam { * @param mode The mode for setting compression in the output * stream. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression, or does not support the requested mode. - * @exception IllegalArgumentException if {@code mode} is not + * @throws IllegalArgumentException if {@code mode} is not * one of the modes listed above. * * @see #getCompressionMode @@ -929,7 +929,7 @@ public class ImageWriteParam extends IIOParam { * * @return the current compression mode. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression. * * @see #setCompressionMode @@ -965,7 +965,7 @@ public class ImageWriteParam extends IIOParam { * (non-localized) names of available compression types, or * {@code null}. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression. */ public String[] getCompressionTypes() { @@ -998,13 +998,13 @@ public class ImageWriteParam extends IIOParam { * by {@code getCompressionTypes}, or {@code null} to * remove any previous setting. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression. - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. - * @exception UnsupportedOperationException if there are no + * @throws UnsupportedOperationException if there are no * settable compression types. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code compressionType} is non-{@code null} but is not * one of the values returned by {@code getCompressionTypes}. * @@ -1059,9 +1059,9 @@ public class ImageWriteParam extends IIOParam { * @return the current compression type as a {@code String}, * or {@code null} if no type is set. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression. - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. * * @see #setCompressionType @@ -1086,9 +1086,9 @@ public class ImageWriteParam extends IIOParam { * instance variable {@code compressionQuality} to * {@code 1.0F}. * - * @exception UnsupportedOperationException if the plug-in does not + * @throws UnsupportedOperationException if the plug-in does not * support compression. - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. * * @see #setCompressionType @@ -1122,11 +1122,11 @@ public class ImageWriteParam extends IIOParam { * @return a {@code String} containing a localized version of * the name of the current compression type. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression. - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. - * @exception IllegalStateException if no compression type is set. + * @throws IllegalStateException if no compression type is set. */ public String getLocalizedCompressionTypeName() { if (!canWriteCompressed()) { @@ -1162,11 +1162,11 @@ public class ImageWriteParam extends IIOParam { * @return {@code true} if the current compression type is * lossless. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression. - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. - * @exception IllegalStateException if the set of legal + * @throws IllegalStateException if the set of legal * compression types is non-{@code null} and the current * compression type is {@code null}. */ @@ -1218,14 +1218,14 @@ public class ImageWriteParam extends IIOParam { * @param quality a {@code float} between {@code 0} and * {@code 1} indicating the desired quality level. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression. - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. - * @exception IllegalStateException if the set of legal + * @throws IllegalStateException if the set of legal * compression types is non-{@code null} and the current * compression type is {@code null}. - * @exception IllegalArgumentException if {@code quality} is + * @throws IllegalArgumentException if {@code quality} is * not between {@code 0} and {@code 1}, inclusive. * * @see #getCompressionQuality @@ -1264,11 +1264,11 @@ public class ImageWriteParam extends IIOParam { * * @return the current compression quality setting. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression. - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. - * @exception IllegalStateException if the set of legal + * @throws IllegalStateException if the set of legal * compression types is non-{@code null} and the current * compression type is {@code null}. * @@ -1317,14 +1317,14 @@ public class ImageWriteParam extends IIOParam { * @return an estimate of the compressed bit rate, or * {@code -1.0F} if no estimate is available. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression. - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. - * @exception IllegalStateException if the set of legal + * @throws IllegalStateException if the set of legal * compression types is non-{@code null} and the current * compression type is {@code null}. - * @exception IllegalArgumentException if {@code quality} is + * @throws IllegalArgumentException if {@code quality} is * not between {@code 0} and {@code 1}, inclusive. */ public float getBitRate(float quality) { @@ -1389,11 +1389,11 @@ public class ImageWriteParam extends IIOParam { * @return an array of {@code String}s containing localized * descriptions of the compression quality levels. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression. - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. - * @exception IllegalStateException if the set of legal + * @throws IllegalStateException if the set of legal * compression types is non-{@code null} and the current * compression type is {@code null}. * @@ -1442,11 +1442,11 @@ public class ImageWriteParam extends IIOParam { * by the {@code String}s from * {@code getCompressionQualityDescriptions}. * - * @exception UnsupportedOperationException if the writer does not + * @throws UnsupportedOperationException if the writer does not * support compression. - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. - * @exception IllegalStateException if the set of legal + * @throws IllegalStateException if the set of legal * compression types is non-{@code null} and the current * compression type is {@code null}. * diff --git a/src/java.desktop/share/classes/javax/imageio/ImageWriter.java b/src/java.desktop/share/classes/javax/imageio/ImageWriter.java index 8723c50773e527d22039c02b26ab9135a95a477c..a688d9aea911bf4af262051e7afa87547a3ec173 100644 --- a/src/java.desktop/share/classes/javax/imageio/ImageWriter.java +++ b/src/java.desktop/share/classes/javax/imageio/ImageWriter.java @@ -194,7 +194,7 @@ public abstract class ImageWriter implements ImageTranscoder { * @param output the {@code ImageOutputStream} or other * {@code Object} to use for future writing. * - * @exception IllegalArgumentException if {@code output} is + * @throws IllegalArgumentException if {@code output} is * not an instance of one of the classes returned by the * originating service provider's {@code getOutputTypes} * method. @@ -276,7 +276,7 @@ public abstract class ImageWriter implements ImageTranscoder { * @param locale the desired {@code Locale}, or * {@code null}. * - * @exception IllegalArgumentException if {@code locale} is + * @throws IllegalArgumentException if {@code locale} is * non-{@code null} but is not one of the values returned by * {@code getAvailableLocales}. * @@ -561,14 +561,14 @@ public abstract class ImageWriter implements ImageTranscoder { * {@code null} to use a default * {@code ImageWriteParam}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if {@code image} + * @throws UnsupportedOperationException if {@code image} * contains a {@code Raster} and {@code canWriteRasters} * returns {@code false}. - * @exception IllegalArgumentException if {@code image} is + * @throws IllegalArgumentException if {@code image} is * {@code null}. - * @exception IOException if an error occurs during writing. + * @throws IOException if an error occurs during writing. */ public abstract void write(IIOMetadata streamMetadata, IIOImage image, @@ -582,14 +582,14 @@ public abstract class ImageWriter implements ImageTranscoder { * @param image an {@code IIOImage} object containing an * image, thumbnails, and metadata to be written. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception IllegalArgumentException if {@code image} is + * @throws IllegalArgumentException if {@code image} is * {@code null}. - * @exception UnsupportedOperationException if {@code image} + * @throws UnsupportedOperationException if {@code image} * contains a {@code Raster} and {@code canWriteRasters} * returns {@code false}. - * @exception IOException if an error occurs during writing. + * @throws IOException if an error occurs during writing. */ public void write(IIOImage image) throws IOException { write(null, image, null); @@ -603,11 +603,11 @@ public abstract class ImageWriter implements ImageTranscoder { * * @param image a {@code RenderedImage} to be written. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception IllegalArgumentException if {@code image} is + * @throws IllegalArgumentException if {@code image} is * {@code null}. - * @exception IOException if an error occurs during writing. + * @throws IOException if an error occurs during writing. */ public void write(RenderedImage image) throws IOException { write(null, new IIOImage(image, null, null), null); @@ -671,11 +671,11 @@ public abstract class ImageWriter implements ImageTranscoder { * * @param streamMetadata A stream metadata object, or {@code null}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canWriteSequence} returns {@code false}. - * @exception IOException if an error occurs writing the stream + * @throws IOException if an error occurs writing the stream * metadata. */ public void prepareWriteSequence(IIOMetadata streamMetadata) @@ -732,16 +732,16 @@ public abstract class ImageWriter implements ImageTranscoder { * {@code null} to use a default * {@code ImageWriteParam}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set, or {@code prepareWriteSequence} has not been called. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canWriteSequence} returns {@code false}. - * @exception IllegalArgumentException if {@code image} is + * @throws IllegalArgumentException if {@code image} is * {@code null}. - * @exception UnsupportedOperationException if {@code image} + * @throws UnsupportedOperationException if {@code image} * contains a {@code Raster} and {@code canWriteRasters} * returns {@code false}. - * @exception IOException if an error occurs during writing. + * @throws IOException if an error occurs during writing. */ public void writeToSequence(IIOImage image, ImageWriteParam param) throws IOException { @@ -767,11 +767,11 @@ public abstract class ImageWriter implements ImageTranscoder { * {@code null}, and otherwise throws an * {@code UnsupportedOperationException}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set, or {@code prepareWriteSequence} has not been called. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canWriteSequence} returns {@code false}. - * @exception IOException if an error occurs during writing. + * @throws IOException if an error occurs during writing. */ public void endWriteSequence() throws IOException { unsupported(); @@ -790,9 +790,9 @@ public abstract class ImageWriter implements ImageTranscoder { * @return {@code true} if replacement of stream metadata is * allowed. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception IOException if an I/O error occurs during the query. + * @throws IOException if an I/O error occurs during the query. */ public boolean canReplaceStreamMetadata() throws IOException { if (getOutput() == null) { @@ -821,12 +821,12 @@ public abstract class ImageWriter implements ImageTranscoder { * @param streamMetadata an {@code IIOMetadata} object representing * stream metadata, or {@code null} to use default values. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if the + * @throws UnsupportedOperationException if the * {@code canReplaceStreamMetadata} returns * {@code false}. modes do not include - * @exception IOException if an error occurs during writing. + * @throws IOException if an error occurs during writing. */ public void replaceStreamMetadata(IIOMetadata streamMetadata) throws IOException { @@ -856,13 +856,13 @@ public abstract class ImageWriter implements ImageTranscoder { * @return {@code true} if the image metadata of the given * image can be replaced. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception IndexOutOfBoundsException if the writer supports + * @throws IndexOutOfBoundsException if the writer supports * image metadata replacement in general, but * {@code imageIndex} is less than 0 or greater than the * largest available index. - * @exception IOException if an I/O error occurs during the query. + * @throws IOException if an I/O error occurs during the query. */ public boolean canReplaceImageMetadata(int imageIndex) throws IOException { @@ -889,14 +889,14 @@ public abstract class ImageWriter implements ImageTranscoder { * @param imageMetadata an {@code IIOMetadata} object * representing image metadata, or {@code null}. * - * @exception IllegalStateException if the output has not been + * @throws IllegalStateException if the output has not been * set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canReplaceImageMetadata} returns * {@code false}. - * @exception IndexOutOfBoundsException if {@code imageIndex} + * @throws IndexOutOfBoundsException if {@code imageIndex} * is less than 0 or greater than the largest available index. - * @exception IOException if an error occurs during writing. + * @throws IOException if an error occurs during writing. */ public void replaceImageMetadata(int imageIndex, IIOMetadata imageMetadata) @@ -929,12 +929,12 @@ public abstract class ImageWriter implements ImageTranscoder { * @return {@code true} if an image may be inserted at the * given index. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception IndexOutOfBoundsException if the writer supports + * @throws IndexOutOfBoundsException if the writer supports * image insertion in general, but {@code imageIndex} is less * than -1 or greater than the largest available index. - * @exception IOException if an I/O error occurs during the query. + * @throws IOException if an I/O error occurs during the query. */ public boolean canInsertImage(int imageIndex) throws IOException { if (getOutput() == null) { @@ -978,18 +978,18 @@ public abstract class ImageWriter implements ImageTranscoder { * {@code null} to use a default * {@code ImageWriteParam}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canInsertImage(imageIndex)} returns {@code false}. - * @exception IllegalArgumentException if {@code image} is + * @throws IllegalArgumentException if {@code image} is * {@code null}. - * @exception IndexOutOfBoundsException if {@code imageIndex} + * @throws IndexOutOfBoundsException if {@code imageIndex} * is less than -1 or greater than the largest available index. - * @exception UnsupportedOperationException if {@code image} + * @throws UnsupportedOperationException if {@code image} * contains a {@code Raster} and {@code canWriteRasters} * returns {@code false}. - * @exception IOException if an error occurs during writing. + * @throws IOException if an error occurs during writing. */ public void writeInsert(int imageIndex, IIOImage image, @@ -1019,12 +1019,12 @@ public abstract class ImageWriter implements ImageTranscoder { * @return {@code true} if it is possible to remove the given * image. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception IndexOutOfBoundsException if the writer supports + * @throws IndexOutOfBoundsException if the writer supports * image removal in general, but {@code imageIndex} is less * than 0 or greater than the largest available index. - * @exception IOException if an I/O error occurs during the + * @throws IOException if an I/O error occurs during the * query. */ public boolean canRemoveImage(int imageIndex) throws IOException { @@ -1050,13 +1050,13 @@ public abstract class ImageWriter implements ImageTranscoder { * * @param imageIndex the index of the image to be removed. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canRemoveImage(imageIndex)} returns {@code false}. - * @exception IndexOutOfBoundsException if {@code imageIndex} + * @throws IndexOutOfBoundsException if {@code imageIndex} * is less than 0 or greater than the largest available index. - * @exception IOException if an I/O error occurs during the + * @throws IOException if an I/O error occurs during the * removal. */ public void removeImage(int imageIndex) throws IOException { @@ -1082,9 +1082,9 @@ public abstract class ImageWriter implements ImageTranscoder { * @return {@code true} if the writing of complete image * stream with contents to be defined later is supported. * - * @exception IllegalStateException if the output has not been + * @throws IllegalStateException if the output has not been * set. - * @exception IOException if an I/O error occurs during the + * @throws IOException if an I/O error occurs during the * query. */ public boolean canWriteEmpty() throws IOException { @@ -1144,23 +1144,23 @@ public abstract class ImageWriter implements ImageTranscoder { * {@code null} to use a default * {@code ImageWriteParam}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canWriteEmpty} returns {@code false}. - * @exception IllegalStateException if a previous call to + * @throws IllegalStateException if a previous call to * {@code prepareWriteEmpty} has been made without a * corresponding call to {@code endWriteEmpty}. - * @exception IllegalStateException if a previous call to + * @throws IllegalStateException if a previous call to * {@code prepareInsertEmpty} has been made without a * corresponding call to {@code endInsertEmpty}. - * @exception IllegalArgumentException if {@code imageType} + * @throws IllegalArgumentException if {@code imageType} * is {@code null} or {@code thumbnails} contains * {@code null} references or objects other than * {@code BufferedImage}s. - * @exception IllegalArgumentException if width or height are less + * @throws IllegalArgumentException if width or height are less * than 1. - * @exception IOException if an I/O error occurs during writing. + * @throws IOException if an I/O error occurs during writing. */ public void prepareWriteEmpty(IIOMetadata streamMetadata, ImageTypeSpecifier imageType, @@ -1183,21 +1183,21 @@ public abstract class ImageWriter implements ImageTranscoder { * {@code null}, and otherwise throws an * {@code UnsupportedOperationException}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canWriteEmpty(imageIndex)} returns * {@code false}. - * @exception IllegalStateException if a previous call to + * @throws IllegalStateException if a previous call to * {@code prepareWriteEmpty} without a corresponding call to * {@code endWriteEmpty} has not been made. - * @exception IllegalStateException if a previous call to + * @throws IllegalStateException if a previous call to * {@code prepareInsertEmpty} without a corresponding call to * {@code endInsertEmpty} has been made. - * @exception IllegalStateException if a call to + * @throws IllegalStateException if a call to * {@code prepareReiplacePixels} has been made without a * matching call to {@code endReplacePixels}. - * @exception IOException if an I/O error occurs during writing. + * @throws IOException if an I/O error occurs during writing. */ public void endWriteEmpty() throws IOException { if (getOutput() == null) { @@ -1231,12 +1231,12 @@ public abstract class ImageWriter implements ImageTranscoder { * @return {@code true} if an empty image may be inserted at * the given index. * - * @exception IllegalStateException if the output has not been + * @throws IllegalStateException if the output has not been * set. - * @exception IndexOutOfBoundsException if the writer supports + * @throws IndexOutOfBoundsException if the writer supports * empty image insertion in general, but {@code imageIndex} * is less than -1 or greater than the largest available index. - * @exception IOException if an I/O error occurs during the + * @throws IOException if an I/O error occurs during the * query. */ public boolean canInsertEmpty(int imageIndex) throws IOException { @@ -1301,26 +1301,26 @@ public abstract class ImageWriter implements ImageTranscoder { * {@code null} to use a default * {@code ImageWriteParam}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canInsertEmpty(imageIndex)} returns * {@code false}. - * @exception IndexOutOfBoundsException if {@code imageIndex} + * @throws IndexOutOfBoundsException if {@code imageIndex} * is less than -1 or greater than the largest available index. - * @exception IllegalStateException if a previous call to + * @throws IllegalStateException if a previous call to * {@code prepareInsertEmpty} has been made without a * corresponding call to {@code endInsertEmpty}. - * @exception IllegalStateException if a previous call to + * @throws IllegalStateException if a previous call to * {@code prepareWriteEmpty} has been made without a * corresponding call to {@code endWriteEmpty}. - * @exception IllegalArgumentException if {@code imageType} + * @throws IllegalArgumentException if {@code imageType} * is {@code null} or {@code thumbnails} contains * {@code null} references or objects other than * {@code BufferedImage}s. - * @exception IllegalArgumentException if width or height are less + * @throws IllegalArgumentException if width or height are less * than 1. - * @exception IOException if an I/O error occurs during writing. + * @throws IOException if an I/O error occurs during writing. */ public void prepareInsertEmpty(int imageIndex, ImageTypeSpecifier imageType, @@ -1340,21 +1340,21 @@ public abstract class ImageWriter implements ImageTranscoder { * {@code null}, and otherwise throws an * {@code UnsupportedOperationException}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canInsertEmpty(imageIndex)} returns * {@code false}. - * @exception IllegalStateException if a previous call to + * @throws IllegalStateException if a previous call to * {@code prepareInsertEmpty} without a corresponding call to * {@code endInsertEmpty} has not been made. - * @exception IllegalStateException if a previous call to + * @throws IllegalStateException if a previous call to * {@code prepareWriteEmpty} without a corresponding call to * {@code endWriteEmpty} has been made. - * @exception IllegalStateException if a call to + * @throws IllegalStateException if a call to * {@code prepareReplacePixels} has been made without a * matching call to {@code endReplacePixels}. - * @exception IOException if an I/O error occurs during writing. + * @throws IOException if an I/O error occurs during writing. */ public void endInsertEmpty() throws IOException { unsupported(); @@ -1382,12 +1382,12 @@ public abstract class ImageWriter implements ImageTranscoder { * @return {@code true} if the pixels of the given * image can be replaced. * - * @exception IllegalStateException if the output has not been + * @throws IllegalStateException if the output has not been * set. - * @exception IndexOutOfBoundsException if the writer supports + * @throws IndexOutOfBoundsException if the writer supports * pixel replacement in general, but {@code imageIndex} is * less than 0 or greater than the largest available index. - * @exception IOException if an I/O error occurs during the query. + * @throws IOException if an I/O error occurs during the query. */ public boolean canReplacePixels(int imageIndex) throws IOException { if (getOutput() == null) { @@ -1415,20 +1415,20 @@ public abstract class ImageWriter implements ImageTranscoder { * @param region a {@code Rectangle} that will be used to clip * future pixel regions. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canReplacePixels(imageIndex)} returns * {@code false}. - * @exception IndexOutOfBoundsException if {@code imageIndex} + * @throws IndexOutOfBoundsException if {@code imageIndex} * is less than 0 or greater than the largest available index. - * @exception IllegalStateException if there is a previous call to + * @throws IllegalStateException if there is a previous call to * {@code prepareReplacePixels} without a matching call to * {@code endReplacePixels} (i.e., nesting is not * allowed). - * @exception IllegalArgumentException if {@code region} is + * @throws IllegalArgumentException if {@code region} is * {@code null} or has a width or height less than 1. - * @exception IOException if an I/O error occurs during the + * @throws IOException if an I/O error occurs during the * preparation. */ public void prepareReplacePixels(int imageIndex, @@ -1471,22 +1471,22 @@ public abstract class ImageWriter implements ImageTranscoder { * {@code null} to use a default * {@code ImageWriteParam}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canReplacePixels(imageIndex)} returns * {@code false}. - * @exception IllegalStateException if there is no previous call to + * @throws IllegalStateException if there is no previous call to * {@code prepareReplacePixels} without a matching call to * {@code endReplacePixels}. - * @exception IllegalArgumentException if any of the following are true: + * @throws IllegalArgumentException if any of the following are true: *

      *
    • {@code image} is {@code null}. *
    • the intersected region does not contain at least one pixel. *
    • the layout of {@code image} does not match, or this * writer cannot convert it to, the existing image layout. *
    - * @exception IOException if an I/O error occurs during writing. + * @throws IOException if an I/O error occurs during writing. */ public void replacePixels(RenderedImage image, ImageWriteParam param) throws IOException { @@ -1529,24 +1529,24 @@ public abstract class ImageWriter implements ImageTranscoder { * {@code null} to use a default * {@code ImageWriteParam}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canReplacePixels(imageIndex)} returns * {@code false}. - * @exception IllegalStateException if there is no previous call to + * @throws IllegalStateException if there is no previous call to * {@code prepareReplacePixels} without a matching call to * {@code endReplacePixels}. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canWriteRasters} returns {@code false}. - * @exception IllegalArgumentException if any of the following are true: + * @throws IllegalArgumentException if any of the following are true: *
      *
    • {@code raster} is {@code null}. *
    • the intersected region does not contain at least one pixel. *
    • the layout of {@code raster} does not match, or this * writer cannot convert it to, the existing image layout. *
    - * @exception IOException if an I/O error occurs during writing. + * @throws IOException if an I/O error occurs during writing. */ public void replacePixels(Raster raster, ImageWriteParam param) throws IOException { @@ -1565,15 +1565,15 @@ public abstract class ImageWriter implements ImageTranscoder { * {@code null}, and otherwise throws an * {@code UnsupportedOperationException}. * - * @exception IllegalStateException if the output has not + * @throws IllegalStateException if the output has not * been set. - * @exception UnsupportedOperationException if + * @throws UnsupportedOperationException if * {@code canReplacePixels(imageIndex)} returns * {@code false}. - * @exception IllegalStateException if there is no previous call + * @throws IllegalStateException if there is no previous call * to {@code prepareReplacePixels} without a matching call to * {@code endReplacePixels}. - * @exception IOException if an I/O error occurs during writing. + * @throws IOException if an I/O error occurs during writing. */ public void endReplacePixels() throws IOException { unsupported(); @@ -1886,7 +1886,7 @@ public abstract class ImageWriter implements ImageTranscoder { * occurred. * @param warning the warning message. * - * @exception IllegalArgumentException if {@code warning} + * @throws IllegalArgumentException if {@code warning} * is {@code null}. */ protected void processWarningOccurred(int imageIndex, @@ -1921,15 +1921,15 @@ public abstract class ImageWriter implements ImageTranscoder { * @param keyword the keyword used to index the warning message * within the set of {@code ResourceBundle}s. * - * @exception IllegalArgumentException if {@code baseName} + * @throws IllegalArgumentException if {@code baseName} * is {@code null}. - * @exception IllegalArgumentException if {@code keyword} + * @throws IllegalArgumentException if {@code keyword} * is {@code null}. - * @exception IllegalArgumentException if no appropriate + * @throws IllegalArgumentException if no appropriate * {@code ResourceBundle} may be located. - * @exception IllegalArgumentException if the named resource is + * @throws IllegalArgumentException if the named resource is * not found in the located {@code ResourceBundle}. - * @exception IllegalArgumentException if the object retrieved + * @throws IllegalArgumentException if the object retrieved * from the {@code ResourceBundle} is not a * {@code String}. */ diff --git a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadata.java b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadata.java index 9952544b48745c3dd87de2d630f25fe3efa72247..3954f886f47f7ecab728e54c6ad4575dbd4483b6 100644 --- a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadata.java +++ b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadata.java @@ -165,9 +165,9 @@ public abstract class IIOMetadata { * indicating the class names of any additional formats supported by * this object, or {@code null} if there are none. * - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code extraMetadataFormatNames} has length 0. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code extraMetadataFormatNames} and * {@code extraMetadataFormatClassNames} are neither both * {@code null}, nor of the same length. @@ -368,10 +368,10 @@ public abstract class IIOMetadata { * * @return an {@code IIOMetadataFormat} object. * - * @exception IllegalArgumentException if {@code formatName} + * @throws IllegalArgumentException if {@code formatName} * is {@code null} or is not one of the names recognized by * the plug-in. - * @exception IllegalStateException if the class corresponding to + * @throws IllegalStateException if the class corresponding to * the format name cannot be loaded. */ public IIOMetadataFormat getMetadataFormat(String formatName) { @@ -452,7 +452,7 @@ public abstract class IIOMetadata { * @return an XML DOM {@code Node} object forming the * root of a tree. * - * @exception IllegalArgumentException if {@code formatName} + * @throws IllegalArgumentException if {@code formatName} * is {@code null} or is not one of the names returned by * {@code getMetadataFormatNames}. * @@ -481,13 +481,13 @@ public abstract class IIOMetadata { * @param root an XML DOM {@code Node} object forming the * root of a tree. * - * @exception IllegalStateException if this object is read-only. - * @exception IllegalArgumentException if {@code formatName} + * @throws IllegalStateException if this object is read-only. + * @throws IllegalArgumentException if {@code formatName} * is {@code null} or is not one of the names returned by * {@code getMetadataFormatNames}. - * @exception IllegalArgumentException if {@code root} is + * @throws IllegalArgumentException if {@code root} is * {@code null}. - * @exception IIOInvalidTreeException if the tree cannot be parsed + * @throws IIOInvalidTreeException if the tree cannot be parsed * successfully using the rules of the given format. * * @see #getMetadataFormatNames @@ -731,13 +731,13 @@ public abstract class IIOMetadata { * @param root an XML DOM {@code Node} object forming the * root of a tree. * - * @exception IllegalStateException if this object is read-only. - * @exception IllegalArgumentException if {@code formatName} + * @throws IllegalStateException if this object is read-only. + * @throws IllegalArgumentException if {@code formatName} * is {@code null} or is not one of the names returned by * {@code getMetadataFormatNames}. - * @exception IllegalArgumentException if {@code root} is + * @throws IllegalArgumentException if {@code root} is * {@code null}. - * @exception IIOInvalidTreeException if the tree cannot be parsed + * @throws IIOInvalidTreeException if the tree cannot be parsed * successfully using the rules of the given format. * * @see #getMetadataFormatNames @@ -757,7 +757,7 @@ public abstract class IIOMetadata { * Note that there are many possible default values, depending on * how the object was created. * - * @exception IllegalStateException if this object is read-only. + * @throws IllegalStateException if this object is read-only. * * @see javax.imageio.ImageReader#getStreamMetadata * @see javax.imageio.ImageReader#getImageMetadata @@ -873,7 +873,7 @@ public abstract class IIOMetadata { * * @return {@code true} if the controller completed normally. * - * @exception IllegalStateException if there is no controller + * @throws IllegalStateException if there is no controller * currently installed. * * @see IIOMetadataController diff --git a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataController.java b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataController.java index ddf105763f0a59e326945389272ef48433e717cb..88f8727aad5cf90bd3ddbf1ede445397666ca22c 100644 --- a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataController.java +++ b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataController.java @@ -79,7 +79,7 @@ public interface IIOMetadataController { * @return {@code true} if the {@code IIOMetadata} has been * modified, {@code false} otherwise. * - * @exception IllegalArgumentException if {@code metadata} is + * @throws IllegalArgumentException if {@code metadata} is * {@code null} or is not an instance of the correct class. */ boolean activate(IIOMetadata metadata); diff --git a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormat.java b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormat.java index 797ecc5618084d026d42a7645b1761b4d6005f8c..b0cd40b6f6ebd458e8e49dba8d66150bb9785b07 100644 --- a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormat.java +++ b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormat.java @@ -319,10 +319,10 @@ public interface IIOMetadataFormat { * * @return an {@code int}. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if the named element does + * @throws IllegalArgumentException if the named element does * not have a child policy of {@code CHILD_POLICY_REPEAT}. */ int getElementMinChildren(String elementName); @@ -339,10 +339,10 @@ public interface IIOMetadataFormat { * * @return an {@code int}. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if the named element does + * @throws IllegalArgumentException if the named element does * not have a child policy of {@code CHILD_POLICY_REPEAT}. */ int getElementMaxChildren(String elementName); @@ -362,7 +362,7 @@ public interface IIOMetadataFormat { * * @return the element description. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this format. */ String getElementDescription(String elementName, Locale locale); @@ -378,7 +378,7 @@ public interface IIOMetadataFormat { * * @return one of the {@code CHILD_POLICY_*} constants. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. */ @@ -394,7 +394,7 @@ public interface IIOMetadataFormat { * * @return an array of {@code String}s, or null. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. */ @@ -410,7 +410,7 @@ public interface IIOMetadataFormat { * * @return an array of {@code String}s. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. */ @@ -428,10 +428,10 @@ public interface IIOMetadataFormat { * * @return one of the {@code VALUE_*} constants. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null} or is not a legal attribute name for this * element. */ @@ -450,10 +450,10 @@ public interface IIOMetadataFormat { * * @return one of the {@code DATATYPE_*} constants. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null} or is not a legal attribute name for this * element. */ @@ -468,10 +468,10 @@ public interface IIOMetadataFormat { * * @return {@code true} if the attribute must be present. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null} or is not a legal attribute name for this * element. */ @@ -489,10 +489,10 @@ public interface IIOMetadataFormat { * @return a {@code String} containing the default value, or * {@code null}. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null} or is not a legal attribute name for this * element. */ @@ -510,13 +510,13 @@ public interface IIOMetadataFormat { * * @return an array of {@code String}s. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null} or is not a legal attribute name for this * element. - * @exception IllegalArgumentException if the given attribute is + * @throws IllegalArgumentException if the given attribute is * not defined as an enumeration. */ String[] getAttributeEnumerations(String elementName, String attrName); @@ -537,13 +537,13 @@ public interface IIOMetadataFormat { * @return a {@code String} containing the smallest legal * value for the attribute. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null} or is not a legal attribute name for this * element. - * @exception IllegalArgumentException if the given attribute is + * @throws IllegalArgumentException if the given attribute is * not defined as a range. */ String getAttributeMinValue(String elementName, String attrName); @@ -565,13 +565,13 @@ public interface IIOMetadataFormat { * @return a {@code String} containing the largest legal * value for the attribute. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null} or is not a legal attribute name for this * element. - * @exception IllegalArgumentException if the given attribute is + * @throws IllegalArgumentException if the given attribute is * not defined as a range. */ String getAttributeMaxValue(String elementName, String attrName); @@ -590,13 +590,13 @@ public interface IIOMetadataFormat { * @return the smallest legal number of list items for the * attribute. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null} or is not a legal attribute name for this * element. - * @exception IllegalArgumentException if the given attribute is + * @throws IllegalArgumentException if the given attribute is * not defined as a list. */ int getAttributeListMinLength(String elementName, String attrName); @@ -617,13 +617,13 @@ public interface IIOMetadataFormat { * @return the largest legal number of list items for the * attribute. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null} or is not a legal attribute name for this * element. - * @exception IllegalArgumentException if the given attribute is + * @throws IllegalArgumentException if the given attribute is * not defined as a list. */ int getAttributeListMaxLength(String elementName, String attrName); @@ -644,9 +644,9 @@ public interface IIOMetadataFormat { * * @return the attribute description. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null} or is not a legal attribute name for this * element. */ @@ -671,7 +671,7 @@ public interface IIOMetadataFormat { * * @return one of the {@code VALUE_*} constants. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. * @@ -696,10 +696,10 @@ public interface IIOMetadataFormat { * * @return a {@code Class} object. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if the named element cannot + * @throws IllegalArgumentException if the named element cannot * contain an object value (i.e., if * {@code getObjectValueType(elementName) == VALUE_NONE}). */ @@ -714,10 +714,10 @@ public interface IIOMetadataFormat { * * @return an {@code Object}. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if the named element cannot + * @throws IllegalArgumentException if the named element cannot * contain an object value (i.e., if * {@code getObjectValueType(elementName) == VALUE_NONE}). */ @@ -739,13 +739,13 @@ public interface IIOMetadataFormat { * * @return an array of {@code Object}s. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if the named element cannot + * @throws IllegalArgumentException if the named element cannot * contain an object value (i.e., if * {@code getObjectValueType(elementName) == VALUE_NONE}). - * @exception IllegalArgumentException if the {@code Object} + * @throws IllegalArgumentException if the {@code Object} * is not defined as an enumeration. */ Object[] getObjectEnumerations(String elementName); @@ -762,13 +762,13 @@ public interface IIOMetadataFormat { * * @return the smallest legal value for the attribute. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if the named element cannot + * @throws IllegalArgumentException if the named element cannot * contain an object value (i.e., if * {@code getObjectValueType(elementName) == VALUE_NONE}). - * @exception IllegalArgumentException if the {@code Object} + * @throws IllegalArgumentException if the {@code Object} * is not defined as a range. */ Comparable getObjectMinValue(String elementName); @@ -785,13 +785,13 @@ public interface IIOMetadataFormat { * * @param elementName the name of the element being queried. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if the named element cannot + * @throws IllegalArgumentException if the named element cannot * contain an object value (i.e., if * {@code getObjectValueType(elementName) == VALUE_NONE}). - * @exception IllegalArgumentException if the {@code Object} + * @throws IllegalArgumentException if the {@code Object} * is not defined as a range. */ Comparable getObjectMaxValue(String elementName); @@ -808,13 +808,13 @@ public interface IIOMetadataFormat { * @return the smallest valid array length for the * {@code Object} reference. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if the named element cannot + * @throws IllegalArgumentException if the named element cannot * contain an object value (i.e., if * {@code getObjectValueType(elementName) == VALUE_NONE}). - * @exception IllegalArgumentException if the {@code Object} is not + * @throws IllegalArgumentException if the {@code Object} is not * an array. */ int getObjectArrayMinLength(String elementName); @@ -832,13 +832,13 @@ public interface IIOMetadataFormat { * @return the largest valid array length for the * {@code Object} reference. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null} or is not a legal element name for this * format. - * @exception IllegalArgumentException if the named element cannot + * @throws IllegalArgumentException if the named element cannot * contain an object value (i.e., if * {@code getObjectValueType(elementName) == VALUE_NONE}). - * @exception IllegalArgumentException if the {@code Object} is not + * @throws IllegalArgumentException if the {@code Object} is not * an array. */ int getObjectArrayMaxLength(String elementName); diff --git a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java index 8b5de4089efb912f3fc255a6361651db6fd075d0..d81b0df3c876ffea34e2772ba1321e6f277239e4 100644 --- a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java +++ b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java @@ -160,9 +160,9 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * @param childPolicy one of the {@code CHILD_POLICY_*} constants, * other than {@code CHILD_POLICY_REPEAT}. * - * @exception IllegalArgumentException if {@code rootName} is + * @throws IllegalArgumentException if {@code rootName} is * {@code null}. - * @exception IllegalArgumentException if {@code childPolicy} is + * @throws IllegalArgumentException if {@code childPolicy} is * not one of the predefined constants. */ public IIOMetadataFormatImpl(String rootName, @@ -196,9 +196,9 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * @param minChildren the minimum number of children of the node. * @param maxChildren the maximum number of children of the node. * - * @exception IllegalArgumentException if {@code rootName} is + * @throws IllegalArgumentException if {@code rootName} is * {@code null}. - * @exception IllegalArgumentException if {@code minChildren} + * @throws IllegalArgumentException if {@code minChildren} * is negative or larger than {@code maxChildren}. */ public IIOMetadataFormatImpl(String rootName, @@ -236,7 +236,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * @param resourceBaseName a {@code String} containing the new * base name. * - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code resourceBaseName} is {@code null}. * * @see #getResourceBaseName @@ -307,10 +307,10 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * constants, other than {@code CHILD_POLICY_REPEAT}, * indicating the child policy of the new element. * - * @exception IllegalArgumentException if {@code parentName} + * @throws IllegalArgumentException if {@code parentName} * is {@code null}, or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code childPolicy} + * @throws IllegalArgumentException if {@code childPolicy} * is not one of the predefined constants. */ protected void addElement(String elementName, @@ -344,10 +344,10 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * @param minChildren the minimum number of children of the node. * @param maxChildren the maximum number of children of the node. * - * @exception IllegalArgumentException if {@code parentName} + * @throws IllegalArgumentException if {@code parentName} * is {@code null}, or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code minChildren} + * @throws IllegalArgumentException if {@code minChildren} * is negative or larger than {@code maxChildren}. */ protected void addElement(String elementName, @@ -383,10 +383,10 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * @param elementName the name of the element to be added as a * child. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code parentName} + * @throws IllegalArgumentException if {@code parentName} * is {@code null}, or is not a legal element name for this * format. */ @@ -429,12 +429,12 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * @param defaultValue the default value for the attribute, or * {@code null}. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null}. - * @exception IllegalArgumentException if {@code dataType} is + * @throws IllegalArgumentException if {@code dataType} is * not one of the predefined constants. */ protected void addAttribute(String elementName, @@ -476,19 +476,19 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * {@code String}s containing the legal values for the * attribute. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null}. - * @exception IllegalArgumentException if {@code dataType} is + * @throws IllegalArgumentException if {@code dataType} is * not one of the predefined constants. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code enumeratedValues} is {@code null}. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code enumeratedValues} does not contain at least one * entry. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code enumeratedValues} contains an element that is not a * {@code String} or is {@code null}. */ @@ -556,12 +556,12 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * @param maxInclusive {@code true} if {@code maxValue} * is inclusive. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null}. - * @exception IllegalArgumentException if {@code dataType} is + * @throws IllegalArgumentException if {@code dataType} is * not one of the predefined constants. */ protected void addAttribute(String elementName, @@ -612,14 +612,14 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * @param listMinLength the smallest legal number of list items. * @param listMaxLength the largest legal number of list items. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null}. - * @exception IllegalArgumentException if {@code dataType} is + * @throws IllegalArgumentException if {@code dataType} is * not one of the predefined constants. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code listMinLength} is negative or larger than * {@code listMaxLength}. */ @@ -666,10 +666,10 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * {@code boolean}, ignored if {@code hasDefaultValue} * is {@code false}. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this * format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null}. */ protected void addBooleanAttribute(String elementName, @@ -700,7 +700,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * @param elementName the name of the element. * @param attrName the name of the attribute being removed. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this format. */ protected void removeAttribute(String elementName, String attrName) { @@ -726,7 +726,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * {@code Object} reference, or {@code null}. * @param the type of the object. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this format. */ protected void addObjectValue(String elementName, @@ -763,14 +763,14 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * object reference. * @param the type of the object. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this format. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code enumeratedValues} is {@code null}. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code enumeratedValues} does not contain at least one * entry. - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code enumeratedValues} contains an element that is not * an instance of the class type denoted by {@code classType} * or is {@code null}. @@ -833,7 +833,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * is inclusive. * @param the type of the object. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this * format. */ @@ -880,7 +880,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * @param arrayMinLength the smallest legal length for the array. * @param arrayMaxLength the largest legal length for the array. * - * @exception IllegalArgumentException if {@code elementName} is + * @throws IllegalArgumentException if {@code elementName} is * not a legal element name for this format. */ protected void addObjectValue(String elementName, @@ -903,7 +903,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * * @param elementName the name of the element. * - * @exception IllegalArgumentException if {@code elementName} is + * @throws IllegalArgumentException if {@code elementName} is * not a legal element name for this format. */ protected void removeObjectValue(String elementName) { @@ -990,7 +990,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * * @return the element description. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this format. * * @see #setResourceBaseName @@ -1130,9 +1130,9 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat { * * @return the attribute description. * - * @exception IllegalArgumentException if {@code elementName} + * @throws IllegalArgumentException if {@code elementName} * is {@code null}, or is not a legal element name for this format. - * @exception IllegalArgumentException if {@code attrName} is + * @throws IllegalArgumentException if {@code attrName} is * {@code null} or is not a legal attribute name for this * element. * diff --git a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataNode.java b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataNode.java index 227bc8dcb317f846a42d119c2d5b57054c2c9570..e57d0ba00fd80f68c22ba3f4628b884ec7da2cf7 100644 --- a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataNode.java +++ b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataNode.java @@ -464,7 +464,7 @@ public class IIOMetadataNode implements Element, NodeList { * * @return the node being inserted. * - * @exception IllegalArgumentException if {@code newChild} is + * @throws IllegalArgumentException if {@code newChild} is * {@code null}. */ public Node insertBefore(Node newChild, @@ -522,7 +522,7 @@ public class IIOMetadataNode implements Element, NodeList { * * @return the node replaced. * - * @exception IllegalArgumentException if {@code newChild} is + * @throws IllegalArgumentException if {@code newChild} is * {@code null}. */ public Node replaceChild(Node newChild, @@ -573,7 +573,7 @@ public class IIOMetadataNode implements Element, NodeList { * * @return the node removed. * - * @exception IllegalArgumentException if {@code oldChild} is + * @throws IllegalArgumentException if {@code oldChild} is * {@code null}. */ public Node removeChild(Node oldChild) { @@ -617,7 +617,7 @@ public class IIOMetadataNode implements Element, NodeList { * * @return the node added. * - * @exception IllegalArgumentException if {@code newChild} is + * @throws IllegalArgumentException if {@code newChild} is * {@code null}. */ public Node appendChild(Node newChild) { diff --git a/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGImageReadParam.java b/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGImageReadParam.java index 8904c89fff2f7d7d0b16946001a40ebd8be17412..507d2c2804115fa605627b0b7502a3858aef6a9a 100644 --- a/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGImageReadParam.java +++ b/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGImageReadParam.java @@ -113,7 +113,7 @@ public class JPEGImageReadParam extends ImageReadParam { * @param DCHuffmanTables an array of Huffman table objects. * @param ACHuffmanTables an array of Huffman table objects. * - * @exception IllegalArgumentException if any of the arguments + * @throws IllegalArgumentException if any of the arguments * is {@code null}, has more than 4 elements, or if the * numbers of DC and AC tables differ. * diff --git a/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java b/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java index 986d302decc2359057d01832124455015fb2274b..de9c077d8c7e9d4769f04fd104c93a550292793a 100644 --- a/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java +++ b/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java @@ -130,7 +130,7 @@ public class JPEGImageWriteParam extends ImageWriteParam { *

    The default implementation resets the compression quality * to {@code 0.75F}. * - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. */ public void unsetCompression() { @@ -147,7 +147,7 @@ public class JPEGImageWriteParam extends ImageWriteParam { * * @return {@code false}. * - * @exception IllegalStateException if the compression mode is not + * @throws IllegalStateException if the compression mode is not * {@code MODE_EXPLICIT}. */ public boolean isCompressionLossless() { @@ -204,7 +204,7 @@ public class JPEGImageWriteParam extends ImageWriteParam { * @param DCHuffmanTables An array of Huffman table objects. * @param ACHuffmanTables An array of Huffman table objects. * - * @exception IllegalArgumentException if any of the arguments + * @throws IllegalArgumentException if any of the arguments * is {@code null} or has more than 4 elements, or if the * numbers of DC and AC tables differ. * diff --git a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/FaxTIFFTagSet.java b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/FaxTIFFTagSet.java index f31663bfa6382772d97c166910364c607ab3d1d2..881df65993f7ef2ef84617f891e6fac1ef9f43f5 100644 --- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/FaxTIFFTagSet.java +++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/FaxTIFFTagSet.java @@ -29,7 +29,7 @@ import java.util.List; /** * A class representing the extra tags found in a - * TIFF-F (RFC 2036) file. + * TIFF-F (RFC 2036) file. * * @since 9 */ diff --git a/src/java.desktop/share/classes/javax/imageio/spi/IIOServiceProvider.java b/src/java.desktop/share/classes/javax/imageio/spi/IIOServiceProvider.java index 95f0ec0edaba4f9c99c0572105a4e101debd42e3..9bb3cbac97e5d63b072c435c38805ecf83fe8df8 100644 --- a/src/java.desktop/share/classes/javax/imageio/spi/IIOServiceProvider.java +++ b/src/java.desktop/share/classes/javax/imageio/spi/IIOServiceProvider.java @@ -65,9 +65,9 @@ public abstract class IIOServiceProvider implements RegisterableService { * @param vendorName the vendor name. * @param version a version identifier. * - * @exception IllegalArgumentException if {@code vendorName} + * @throws IllegalArgumentException if {@code vendorName} * is {@code null}. - * @exception IllegalArgumentException if {@code version} + * @throws IllegalArgumentException if {@code version} * is {@code null}. */ public IIOServiceProvider(String vendorName, diff --git a/src/java.desktop/share/classes/javax/imageio/spi/ImageInputStreamSpi.java b/src/java.desktop/share/classes/javax/imageio/spi/ImageInputStreamSpi.java index e7f7264287cd340773eb746682557463508ef7e6..fb3b8d58e31148efdc143082cfa5a442f6f676d8 100644 --- a/src/java.desktop/share/classes/javax/imageio/spi/ImageInputStreamSpi.java +++ b/src/java.desktop/share/classes/javax/imageio/spi/ImageInputStreamSpi.java @@ -79,9 +79,9 @@ public abstract class ImageInputStreamSpi extends IIOServiceProvider { * legal object type for use by the * {@code createInputStreamInstance} method. * - * @exception IllegalArgumentException if {@code vendorName} + * @throws IllegalArgumentException if {@code vendorName} * is {@code null}. - * @exception IllegalArgumentException if {@code version} + * @throws IllegalArgumentException if {@code version} * is {@code null}. */ public ImageInputStreamSpi(String vendorName, @@ -159,12 +159,12 @@ public abstract class ImageInputStreamSpi extends IIOServiceProvider { * * @return an {@code ImageInputStream} instance. * - * @exception IllegalArgumentException if {@code input} is + * @throws IllegalArgumentException if {@code input} is * not an instance of the correct class or is {@code null}. - * @exception IllegalArgumentException if a cache file is needed + * @throws IllegalArgumentException if a cache file is needed * but {@code cacheDir} is non-{@code null} and is not a * directory. - * @exception IOException if a cache file is needed but cannot be + * @throws IOException if a cache file is needed but cannot be * created. * * @see #getInputClass @@ -187,9 +187,9 @@ public abstract class ImageInputStreamSpi extends IIOServiceProvider { * * @return an {@code ImageInputStream} instance. * - * @exception IllegalArgumentException if {@code input} is + * @throws IllegalArgumentException if {@code input} is * not an instance of the correct class or is {@code null}. - * @exception IOException if a cache file is needed but cannot be + * @throws IOException if a cache file is needed but cannot be * created. * * @see #getInputClass() diff --git a/src/java.desktop/share/classes/javax/imageio/spi/ImageOutputStreamSpi.java b/src/java.desktop/share/classes/javax/imageio/spi/ImageOutputStreamSpi.java index d3cf9593d0473ce2c8a66e5719d91841fb481fc9..a8fcf7ef19f704bdb5792109188d17995b50e3f8 100644 --- a/src/java.desktop/share/classes/javax/imageio/spi/ImageOutputStreamSpi.java +++ b/src/java.desktop/share/classes/javax/imageio/spi/ImageOutputStreamSpi.java @@ -80,9 +80,9 @@ public abstract class ImageOutputStreamSpi extends IIOServiceProvider { * legal object type for use by the * {@code createOutputStreamInstance} method. * - * @exception IllegalArgumentException if {@code vendorName} + * @throws IllegalArgumentException if {@code vendorName} * is {@code null}. - * @exception IllegalArgumentException if {@code version} + * @throws IllegalArgumentException if {@code version} * is {@code null}. */ public ImageOutputStreamSpi(String vendorName, @@ -159,12 +159,12 @@ public abstract class ImageOutputStreamSpi extends IIOServiceProvider { * * @return an {@code ImageOutputStream} instance. * - * @exception IllegalArgumentException if {@code output} is + * @throws IllegalArgumentException if {@code output} is * not an instance of the correct class or is {@code null}. - * @exception IllegalArgumentException if a cache file is needed, + * @throws IllegalArgumentException if a cache file is needed, * but {@code cacheDir} is non-{@code null} and is not a * directory. - * @exception IOException if a cache file is needed but cannot be + * @throws IOException if a cache file is needed but cannot be * created. * * @see #getOutputClass @@ -186,9 +186,9 @@ public abstract class ImageOutputStreamSpi extends IIOServiceProvider { * * @return an {@code ImageOutputStream} instance. * - * @exception IllegalArgumentException if {@code output} is + * @throws IllegalArgumentException if {@code output} is * not an instance of the correct class or is {@code null}. - * @exception IOException if a cache file is needed but cannot be + * @throws IOException if a cache file is needed but cannot be * created. * * @see #getOutputClass() diff --git a/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderSpi.java b/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderSpi.java index 4777f989c4b4e156cf0a12ab9448c5961b846679..f20f1bd6eb0a5afc5240fbba922a043896371cad 100644 --- a/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderSpi.java +++ b/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderSpi.java @@ -180,15 +180,15 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi { * {@code getImageMetadataFormat}. An array of length * 0 is normalized to {@code null}. * - * @exception IllegalArgumentException if {@code vendorName} + * @throws IllegalArgumentException if {@code vendorName} * is {@code null}. - * @exception IllegalArgumentException if {@code version} + * @throws IllegalArgumentException if {@code version} * is {@code null}. - * @exception IllegalArgumentException if {@code names} + * @throws IllegalArgumentException if {@code names} * is {@code null} or has length 0. - * @exception IllegalArgumentException if {@code readerClassName} + * @throws IllegalArgumentException if {@code readerClassName} * is {@code null}. - * @exception IllegalArgumentException if {@code inputTypes} + * @throws IllegalArgumentException if {@code inputTypes} * is {@code null} or has length 0. */ public ImageReaderSpi(String vendorName, @@ -294,9 +294,9 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi { * @return {@code true} if it is likely that this stream can * be decoded. * - * @exception IllegalArgumentException if {@code source} is + * @throws IllegalArgumentException if {@code source} is * {@code null}. - * @exception IOException if an I/O error occurs while reading the + * @throws IOException if an I/O error occurs while reading the * stream. */ public abstract boolean canDecodeInput(Object source) throws IOException; @@ -312,7 +312,7 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi { * * @return an {@code ImageReader} instance. * - * @exception IOException if an error occurs during loading, + * @throws IOException if an error occurs during loading, * or initialization of the reader class, or during instantiation * or initialization of the reader object. */ @@ -338,9 +338,9 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi { * * @return an {@code ImageReader} instance. * - * @exception IOException if the attempt to instantiate + * @throws IOException if the attempt to instantiate * the reader fails. - * @exception IllegalArgumentException if the + * @throws IllegalArgumentException if the * {@code ImageReader}'s constructor throws an * {@code IllegalArgumentException} to indicate that the * extension object is unsuitable. @@ -362,7 +362,7 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi { * * @return {@code true} if {@code reader} is recognized. * - * @exception IllegalArgumentException if {@code reader} is + * @throws IllegalArgumentException if {@code reader} is * {@code null}. */ public boolean isOwnReader(ImageReader reader) { diff --git a/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java b/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java index 29ed6de0d50dea580db71cedcd86b88bdaa95db0..7abefdd9431a4207fe3267b748d7f0d162ce408b 100644 --- a/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java +++ b/src/java.desktop/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java @@ -199,13 +199,13 @@ public abstract class ImageReaderWriterSpi extends IIOServiceProvider { * {@code getImageMetadataFormat}. An array of length * 0 is normalized to {@code null}. * - * @exception IllegalArgumentException if {@code vendorName} + * @throws IllegalArgumentException if {@code vendorName} * is {@code null}. - * @exception IllegalArgumentException if {@code version} + * @throws IllegalArgumentException if {@code version} * is {@code null}. - * @exception IllegalArgumentException if {@code names} + * @throws IllegalArgumentException if {@code names} * is {@code null} or has length 0. - * @exception IllegalArgumentException if {@code pluginClassName} + * @throws IllegalArgumentException if {@code pluginClassName} * is {@code null}. */ public ImageReaderWriterSpi(String vendorName, @@ -518,7 +518,7 @@ public abstract class ImageReaderWriterSpi extends IIOServiceProvider { * * @return an {@code IIOMetadataFormat} object. * - * @exception IllegalArgumentException if {@code formatName} + * @throws IllegalArgumentException if {@code formatName} * is {@code null} or is not a supported name. */ public IIOMetadataFormat getStreamMetadataFormat(String formatName) { @@ -542,7 +542,7 @@ public abstract class ImageReaderWriterSpi extends IIOServiceProvider { * * @return an {@code IIOMetadataFormat} object. * - * @exception IllegalArgumentException if {@code formatName} + * @throws IllegalArgumentException if {@code formatName} * is {@code null} or is not a supported name. */ public IIOMetadataFormat getImageMetadataFormat(String formatName) { diff --git a/src/java.desktop/share/classes/javax/imageio/spi/ImageWriterSpi.java b/src/java.desktop/share/classes/javax/imageio/spi/ImageWriterSpi.java index 604de8d7b22403013498f4349f634d008501cdf7..de2195988b4d3a5a85830d41d0d33513526fc272 100644 --- a/src/java.desktop/share/classes/javax/imageio/spi/ImageWriterSpi.java +++ b/src/java.desktop/share/classes/javax/imageio/spi/ImageWriterSpi.java @@ -181,15 +181,15 @@ public abstract class ImageWriterSpi extends ImageReaderWriterSpi { * {@code getImageMetadataFormat}. An array of length * 0 is normalized to {@code null}. * - * @exception IllegalArgumentException if {@code vendorName} + * @throws IllegalArgumentException if {@code vendorName} * is {@code null}. - * @exception IllegalArgumentException if {@code version} + * @throws IllegalArgumentException if {@code version} * is {@code null}. - * @exception IllegalArgumentException if {@code names} + * @throws IllegalArgumentException if {@code names} * is {@code null} or has length 0. - * @exception IllegalArgumentException if {@code writerClassName} + * @throws IllegalArgumentException if {@code writerClassName} * is {@code null}. - * @exception IllegalArgumentException if {@code outputTypes} + * @throws IllegalArgumentException if {@code outputTypes} * is {@code null} or has length 0. */ public ImageWriterSpi(String vendorName, @@ -304,7 +304,7 @@ public abstract class ImageWriterSpi extends ImageReaderWriterSpi { * @return {@code true} if this writer is likely to be able * to encode images with the given layout. * - * @exception IllegalArgumentException if {@code type} + * @throws IllegalArgumentException if {@code type} * is {@code null}. */ public abstract boolean canEncodeImage(ImageTypeSpecifier type); @@ -325,7 +325,7 @@ public abstract class ImageWriterSpi extends ImageReaderWriterSpi { * @return {@code true} if this writer is likely to be able * to encode this image. * - * @exception IllegalArgumentException if {@code im} + * @throws IllegalArgumentException if {@code im} * is {@code null}. */ public boolean canEncodeImage(RenderedImage im) { @@ -343,7 +343,7 @@ public abstract class ImageWriterSpi extends ImageReaderWriterSpi { * * @return an {@code ImageWriter} instance. * - * @exception IOException if an error occurs during loading, + * @throws IOException if an error occurs during loading, * or initialization of the writer class, or during instantiation * or initialization of the writer object. */ @@ -369,9 +369,9 @@ public abstract class ImageWriterSpi extends ImageReaderWriterSpi { * * @return an {@code ImageWriter} instance. * - * @exception IOException if the attempt to instantiate + * @throws IOException if the attempt to instantiate * the writer fails. - * @exception IllegalArgumentException if the + * @throws IllegalArgumentException if the * {@code ImageWriter}'s constructor throws an * {@code IllegalArgumentException} to indicate that the * extension object is unsuitable. @@ -388,7 +388,7 @@ public abstract class ImageWriterSpi extends ImageReaderWriterSpi { * * @return {@code true} if {@code writer} is recognized * - * @exception IllegalArgumentException if {@code writer} is + * @throws IllegalArgumentException if {@code writer} is * {@code null}. */ public boolean isOwnWriter(ImageWriter writer) { diff --git a/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java b/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java index 4a43ca8133a5b7d14f12d270021441896dca8c21..64f71f734a9574b87ae0cd9da409df21774ea575 100644 --- a/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java +++ b/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java @@ -104,7 +104,7 @@ public class ServiceRegistry { * @param categories an {@code Iterator} containing * {@code Class} objects to be used to define categories. * - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code categories} is {@code null}, or if * one of the categories is not an allowed service type. */ @@ -157,7 +157,7 @@ public class ServiceRegistry { * file violates the specified format or if a provider class * cannot be found and instantiated. * - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code providerClass} is {@code null}, or if it is * not one of the allowed service types. */ @@ -196,7 +196,7 @@ public class ServiceRegistry { * file violates the specified format or if a provider class * cannot be found and instantiated. * - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code providerClass} is {@code null}, or if it is * not one of the allowed service types. */ @@ -254,11 +254,11 @@ public class ServiceRegistry { * @return true if no provider of the same class was previously * registered in the same category category. * - * @exception IllegalArgumentException if {@code provider} is + * @throws IllegalArgumentException if {@code provider} is * {@code null}. - * @exception IllegalArgumentException if there is no category + * @throws IllegalArgumentException if there is no category * corresponding to {@code category}. - * @exception ClassCastException if provider does not implement + * @throws ClassCastException if provider does not implement * the {@code Class} defined by {@code category}. */ public boolean registerServiceProvider(T provider, @@ -292,7 +292,7 @@ public class ServiceRegistry { * * @param provider the service provider object to be registered. * - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * {@code provider} is {@code null}. */ public void registerServiceProvider(Object provider) { @@ -323,7 +323,7 @@ public class ServiceRegistry { * @param providers an Iterator containing service provider * objects to be registered. * - * @exception IllegalArgumentException if {@code providers} + * @throws IllegalArgumentException if {@code providers} * is {@code null} or contains a {@code null} entry. */ public void registerServiceProviders(Iterator providers) { @@ -357,11 +357,11 @@ public class ServiceRegistry { * registered in the same category category, * {@code false} otherwise. * - * @exception IllegalArgumentException if {@code provider} is + * @throws IllegalArgumentException if {@code provider} is * {@code null}. - * @exception IllegalArgumentException if there is no category + * @throws IllegalArgumentException if there is no category * corresponding to {@code category}. - * @exception ClassCastException if provider does not implement + * @throws ClassCastException if provider does not implement * the class defined by {@code category}. */ public boolean deregisterServiceProvider(T provider, @@ -385,7 +385,7 @@ public class ServiceRegistry { * * @param provider the service provider object to be deregistered. * - * @exception IllegalArgumentException if {@code provider} is + * @throws IllegalArgumentException if {@code provider} is * {@code null}. */ public void deregisterServiceProvider(Object provider) { @@ -408,7 +408,7 @@ public class ServiceRegistry { * @return {@code true} if the given provider has been * registered. * - * @exception IllegalArgumentException if {@code provider} is + * @throws IllegalArgumentException if {@code provider} is * {@code null}. */ public boolean contains(Object provider) { @@ -444,7 +444,7 @@ public class ServiceRegistry { * @return an {@code Iterator} containing service provider * objects from the given category, possibly in order. * - * @exception IllegalArgumentException if there is no category + * @throws IllegalArgumentException if there is no category * corresponding to {@code category}. */ public Iterator getServiceProviders(Class category, @@ -502,7 +502,7 @@ public class ServiceRegistry { * @return an {@code Iterator} containing service provider * objects from the given category, possibly in order. * - * @exception IllegalArgumentException if there is no category + * @throws IllegalArgumentException if there is no category * corresponding to {@code category}. */ public Iterator getServiceProviders(Class category, @@ -531,7 +531,7 @@ public class ServiceRegistry { * desired {@code Class} type, or {@code null} is none is * present. * - * @exception IllegalArgumentException if {@code providerClass} is + * @throws IllegalArgumentException if {@code providerClass} is * {@code null}. */ public T getServiceProviderByClass(Class providerClass) { @@ -573,9 +573,9 @@ public class ServiceRegistry { * @return {@code true} if a previously unset ordering * was established. * - * @exception IllegalArgumentException if either provider is + * @throws IllegalArgumentException if either provider is * {@code null} or they are the same object. - * @exception IllegalArgumentException if there is no category + * @throws IllegalArgumentException if there is no category * corresponding to {@code category}. */ public boolean setOrdering(Class category, @@ -619,9 +619,9 @@ public class ServiceRegistry { * @return {@code true} if a previously set ordering was * disestablished. * - * @exception IllegalArgumentException if either provider is + * @throws IllegalArgumentException if either provider is * {@code null} or they are the same object. - * @exception IllegalArgumentException if there is no category + * @throws IllegalArgumentException if there is no category * corresponding to {@code category}. */ public boolean unsetOrdering(Class category, @@ -650,7 +650,7 @@ public class ServiceRegistry { * * @param category the category to be emptied. * - * @exception IllegalArgumentException if there is no category + * @throws IllegalArgumentException if there is no category * corresponding to {@code category}. */ public void deregisterAll(Class category) { @@ -677,7 +677,7 @@ public class ServiceRegistry { * currently registered service providers. This method should not * be called from application code. * - * @exception Throwable if an error occurs during superclass + * @throws Throwable if an error occurs during superclass * finalization. * * @deprecated Finalization has been deprecated for removal. See diff --git a/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageInputStream.java b/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageInputStream.java index 6bf14838b7fc42d0e4ee853e9ff9f710033ec228..d5c1ff18e5a6844deb734c5f386ea792f2f39a93 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageInputStream.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageInputStream.java @@ -83,9 +83,9 @@ public class FileCacheImageInputStream extends ImageInputStreamImpl { * cache file should be created, or {@code null} to use the * system directory. * - * @exception IllegalArgumentException if {@code stream} is + * @throws IllegalArgumentException if {@code stream} is * {@code null}. - * @exception IllegalArgumentException if {@code cacheDir} is + * @throws IllegalArgumentException if {@code cacheDir} is * non-{@code null} but is not a directory. * @throws IOException if a cache file cannot be created. */ diff --git a/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageOutputStream.java b/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageOutputStream.java index 5a2a54abcaa7926120ef34915a11778c9c866500..904515b6f825f0808f38131c0ea0d54db957defa 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageOutputStream.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageOutputStream.java @@ -69,11 +69,11 @@ public class FileCacheImageOutputStream extends ImageOutputStreamImpl { * cache file should be created, or {@code null} to use the * system directory. * - * @exception IllegalArgumentException if {@code stream} + * @throws IllegalArgumentException if {@code stream} * is {@code null}. - * @exception IllegalArgumentException if {@code cacheDir} is + * @throws IllegalArgumentException if {@code cacheDir} is * non-{@code null} but is not a directory. - * @exception IOException if a cache file cannot be created. + * @throws IOException if a cache file cannot be created. */ public FileCacheImageOutputStream(OutputStream stream, File cacheDir) throws IOException { @@ -159,9 +159,9 @@ public class FileCacheImageOutputStream extends ImageOutputStreamImpl { * performed. The file length will not be increased until a write * is performed. * - * @exception IndexOutOfBoundsException if {@code pos} is smaller + * @throws IndexOutOfBoundsException if {@code pos} is smaller * than the flushed position. - * @exception IOException if any other I/O error occurs. + * @throws IOException if any other I/O error occurs. */ public void seek(long pos) throws IOException { checkClosed(); @@ -223,7 +223,7 @@ public class FileCacheImageOutputStream extends ImageOutputStreamImpl { * is closed and removed. The destination {@code OutputStream} * is not closed. * - * @exception IOException if an error occurs. + * @throws IOException if an error occurs. */ public void close() throws IOException { maxStreamPos = cache.length(); diff --git a/src/java.desktop/share/classes/javax/imageio/stream/FileImageInputStream.java b/src/java.desktop/share/classes/javax/imageio/stream/FileImageInputStream.java index b1cce6fae4cc64bd98db88d535e8cb088b9478f6..ef127ddfa2e94419ffa6afc64334d4818ec29678 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/FileImageInputStream.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/FileImageInputStream.java @@ -60,13 +60,13 @@ public class FileImageInputStream extends ImageInputStreamImpl { * * @param f a {@code File} to read from. * - * @exception IllegalArgumentException if {@code f} is + * @throws IllegalArgumentException if {@code f} is * {@code null}. - * @exception SecurityException if a security manager exists + * @throws SecurityException if a security manager exists * and does not allow read access to the file. - * @exception FileNotFoundException if {@code f} is a + * @throws FileNotFoundException if {@code f} is a * directory or cannot be opened for reading for any other reason. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public FileImageInputStream(File f) throws FileNotFoundException, IOException { @@ -83,7 +83,7 @@ public class FileImageInputStream extends ImageInputStreamImpl { * * @param raf a {@code RandomAccessFile} to read from. * - * @exception IllegalArgumentException if {@code raf} is + * @throws IllegalArgumentException if {@code raf} is * {@code null}. */ public FileImageInputStream(RandomAccessFile raf) { diff --git a/src/java.desktop/share/classes/javax/imageio/stream/FileImageOutputStream.java b/src/java.desktop/share/classes/javax/imageio/stream/FileImageOutputStream.java index 715b43f40fb764aa4b3df57941cef1959c7029d6..96d84ef652f52327cec673c70a4a0c922ef2b6bf 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/FileImageOutputStream.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/FileImageOutputStream.java @@ -55,14 +55,14 @@ public class FileImageOutputStream extends ImageOutputStreamImpl { * * @param f a {@code File} to write to. * - * @exception IllegalArgumentException if {@code f} is + * @throws IllegalArgumentException if {@code f} is * {@code null}. - * @exception SecurityException if a security manager exists + * @throws SecurityException if a security manager exists * and does not allow write access to the file. - * @exception FileNotFoundException if {@code f} does not denote + * @throws FileNotFoundException if {@code f} does not denote * a regular file or it cannot be opened for reading and writing for any * other reason. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public FileImageOutputStream(File f) throws FileNotFoundException, IOException { @@ -75,7 +75,7 @@ public class FileImageOutputStream extends ImageOutputStreamImpl { * * @param raf a {@code RandomAccessFile} to write to. * - * @exception IllegalArgumentException if {@code raf} is + * @throws IllegalArgumentException if {@code raf} is * {@code null}. */ public FileImageOutputStream(RandomAccessFile raf) { @@ -141,9 +141,9 @@ public class FileImageOutputStream extends ImageOutputStreamImpl { * performed. The file length will not be increased until a write * is performed. * - * @exception IndexOutOfBoundsException if {@code pos} is smaller + * @throws IndexOutOfBoundsException if {@code pos} is smaller * than the flushed position. - * @exception IOException if any other I/O error occurs. + * @throws IOException if any other I/O error occurs. */ public void seek(long pos) throws IOException { checkClosed(); diff --git a/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStream.java b/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStream.java index d8999d4a884de701c13da49bef0568403cb7c557..11251ac5938ae8dca8cbfc0379d0453170ce8551 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStream.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStream.java @@ -100,7 +100,7 @@ public interface ImageInputStream extends DataInput, Closeable { * @return a byte value from the stream, as an int, or -1 to * indicate EOF. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ int read() throws IOException; @@ -118,10 +118,10 @@ public interface ImageInputStream extends DataInput, Closeable { * @return the number of bytes actually read, or {@code -1} * to indicate EOF. * - * @exception NullPointerException if {@code b} is + * @throws NullPointerException if {@code b} is * {@code null}. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ int read(byte[] b) throws IOException; @@ -142,12 +142,12 @@ public interface ImageInputStream extends DataInput, Closeable { * @return the number of bytes actually read, or {@code -1} * to indicate EOF. * - * @exception NullPointerException if {@code b} is + * @throws NullPointerException if {@code b} is * {@code null}. - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code b.length}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ int read(byte[] b, int off, int len) throws IOException; @@ -164,12 +164,12 @@ public interface ImageInputStream extends DataInput, Closeable { * @param buf an IIOByteBuffer object to be modified. * @param len the maximum number of {@code byte}s to read. * - * @exception IndexOutOfBoundsException if {@code len} is + * @throws IndexOutOfBoundsException if {@code len} is * negative. - * @exception NullPointerException if {@code buf} is + * @throws NullPointerException if {@code buf} is * {@code null}. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void readBytes(IIOByteBuffer buf, int len) throws IOException; @@ -183,8 +183,8 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return a boolean value from the stream. * - * @exception java.io.EOFException if the end of the stream is reached. - * @exception IOException if an I/O error occurs. + * @throws java.io.EOFException if the end of the stream is reached. + * @throws IOException if an I/O error occurs. */ boolean readBoolean() throws IOException; @@ -201,8 +201,8 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return a signed byte value from the stream. * - * @exception java.io.EOFException if the end of the stream is reached. - * @exception IOException if an I/O error occurs. + * @throws java.io.EOFException if the end of the stream is reached. + * @throws IOException if an I/O error occurs. */ byte readByte() throws IOException; @@ -225,8 +225,8 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return an unsigned byte value from the stream. * - * @exception java.io.EOFException if the end of the stream is reached. - * @exception IOException if an I/O error occurs. + * @throws java.io.EOFException if the end of the stream is reached. + * @throws IOException if an I/O error occurs. */ int readUnsignedByte() throws IOException; @@ -240,9 +240,9 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return a signed short value from the stream. * - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @see #getByteOrder */ @@ -261,9 +261,9 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return an unsigned short value from the stream, as an int. * - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @see #getByteOrder */ @@ -278,9 +278,9 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return an unsigned char value from the stream. * - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @see #readUnsignedShort */ @@ -296,9 +296,9 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return a signed int value from the stream. * - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @see #getByteOrder */ @@ -316,9 +316,9 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return an unsigned int value from the stream, as a long. * - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @see #getByteOrder */ @@ -334,9 +334,9 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return a signed long value from the stream. * - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @see #getByteOrder */ @@ -352,9 +352,9 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return a float value from the stream. * - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @see #getByteOrder */ @@ -370,9 +370,9 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return a double value from the stream. * - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @see #getByteOrder */ @@ -408,7 +408,7 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return a String containing a line of text from the stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ String readLine() throws IOException; @@ -488,11 +488,11 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return a String read from the stream. * - * @exception java.io.EOFException if this stream reaches the end + * @throws java.io.EOFException if this stream reaches the end * before reading all the bytes. - * @exception java.io.UTFDataFormatException if the bytes do not represent + * @throws java.io.UTFDataFormatException if the bytes do not represent * a valid modified UTF-8 encoding of a string. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ String readUTF() throws IOException; @@ -509,14 +509,14 @@ public interface ImageInputStream extends DataInput, Closeable { * @param off the starting position within {@code b} to write to. * @param len the maximum number of {@code byte}s to read. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code b.length}. - * @exception NullPointerException if {@code b} is + * @throws NullPointerException if {@code b} is * {@code null}. - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void readFully(byte[] b, int off, int len) throws IOException; @@ -531,11 +531,11 @@ public interface ImageInputStream extends DataInput, Closeable { * * @param b an array of {@code byte}s. * - * @exception NullPointerException if {@code b} is + * @throws NullPointerException if {@code b} is * {@code null}. - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void readFully(byte[] b) throws IOException; @@ -553,14 +553,14 @@ public interface ImageInputStream extends DataInput, Closeable { * @param off the starting position within {@code s} to write to. * @param len the maximum number of {@code short}s to read. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code s.length}. - * @exception NullPointerException if {@code s} is + * @throws NullPointerException if {@code s} is * {@code null}. - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void readFully(short[] s, int off, int len) throws IOException; @@ -578,14 +578,14 @@ public interface ImageInputStream extends DataInput, Closeable { * @param off the starting position within {@code c} to write to. * @param len the maximum number of {@code char}s to read. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code c.length}. - * @exception NullPointerException if {@code c} is + * @throws NullPointerException if {@code c} is * {@code null}. - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void readFully(char[] c, int off, int len) throws IOException; @@ -603,14 +603,14 @@ public interface ImageInputStream extends DataInput, Closeable { * @param off the starting position within {@code i} to write to. * @param len the maximum number of {@code int}s to read. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code i.length}. - * @exception NullPointerException if {@code i} is + * @throws NullPointerException if {@code i} is * {@code null}. - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void readFully(int[] i, int off, int len) throws IOException; @@ -628,14 +628,14 @@ public interface ImageInputStream extends DataInput, Closeable { * @param off the starting position within {@code l} to write to. * @param len the maximum number of {@code long}s to read. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code l.length}. - * @exception NullPointerException if {@code l} is + * @throws NullPointerException if {@code l} is * {@code null}. - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void readFully(long[] l, int off, int len) throws IOException; @@ -653,14 +653,14 @@ public interface ImageInputStream extends DataInput, Closeable { * @param off the starting position within {@code f} to write to. * @param len the maximum number of {@code float}s to read. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code f.length}. - * @exception NullPointerException if {@code f} is + * @throws NullPointerException if {@code f} is * {@code null}. - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void readFully(float[] f, int off, int len) throws IOException; @@ -678,14 +678,14 @@ public interface ImageInputStream extends DataInput, Closeable { * @param off the starting position within {@code d} to write to. * @param len the maximum number of {@code double}s to read. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code d.length}. - * @exception NullPointerException if {@code d} is + * @throws NullPointerException if {@code d} is * {@code null}. - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void readFully(double[] d, int off, int len) throws IOException; @@ -695,7 +695,7 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return a long containing the position of the stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ long getStreamPosition() throws IOException; @@ -714,7 +714,7 @@ public interface ImageInputStream extends DataInput, Closeable { * @return an {@code int} containing the bit offset between * 0 and 7, inclusive. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @see #setBitOffset */ @@ -731,9 +731,9 @@ public interface ImageInputStream extends DataInput, Closeable { * @param bitOffset the desired offset, as an {@code int} * between 0 and 7, inclusive. * - * @exception IllegalArgumentException if {@code bitOffset} + * @throws IllegalArgumentException if {@code bitOffset} * is not between 0 and 7, inclusive. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @see #getBitOffset */ @@ -748,9 +748,9 @@ public interface ImageInputStream extends DataInput, Closeable { * @return an {@code int} containing the value {@code 0} * or {@code 1}. * - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bits. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ int readBit() throws IOException; @@ -788,11 +788,11 @@ public interface ImageInputStream extends DataInput, Closeable { * @return the bitstring, as a {@code long} with the last bit * read stored in the least significant bit. * - * @exception IllegalArgumentException if {@code numBits} + * @throws IllegalArgumentException if {@code numBits} * is not between 0 and 64, inclusive. - * @exception java.io.EOFException if the stream reaches the end before + * @throws java.io.EOFException if the stream reaches the end before * reading all the bits. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ long readBits(int numBits) throws IOException; @@ -803,7 +803,7 @@ public interface ImageInputStream extends DataInput, Closeable { * @return a {@code long} containing the length of the * stream, if known, or else {@code -1}. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ long length() throws IOException; @@ -820,7 +820,7 @@ public interface ImageInputStream extends DataInput, Closeable { * * @return an {@code int} representing the number of bytes skipped. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ int skipBytes(int n) throws IOException; @@ -835,7 +835,7 @@ public interface ImageInputStream extends DataInput, Closeable { * @return a {@code long} representing the number of bytes * skipped. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ long skipBytes(long n) throws IOException; @@ -855,9 +855,9 @@ public interface ImageInputStream extends DataInput, Closeable { * @param pos a {@code long} containing the desired file * pointer position. * - * @exception IndexOutOfBoundsException if {@code pos} is smaller + * @throws IndexOutOfBoundsException if {@code pos} is smaller * than the flushed position. - * @exception IOException if any other I/O error occurs. + * @throws IOException if any other I/O error occurs. */ void seek(long pos) throws IOException; @@ -897,7 +897,7 @@ public interface ImageInputStream extends DataInput, Closeable { *

    An {@code IOException} will be thrown if the previous * marked position lies in the discarded portion of the stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void reset() throws IOException; @@ -915,10 +915,10 @@ public interface ImageInputStream extends DataInput, Closeable { * @param pos a {@code long} containing the length of the * stream prefix that may be flushed. * - * @exception IndexOutOfBoundsException if {@code pos} lies + * @throws IndexOutOfBoundsException if {@code pos} lies * in the flushed portion of the stream or past the current stream * position. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void flushBefore(long pos) throws IOException; @@ -927,7 +927,7 @@ public interface ImageInputStream extends DataInput, Closeable { * stream position. Equivalent to * {@code flushBefore(getStreamPosition())}. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void flush() throws IOException; @@ -993,7 +993,7 @@ public interface ImageInputStream extends DataInput, Closeable { * this interface to release resources associated with the stream * such as memory, disk space, or file descriptors. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void close() throws IOException; } diff --git a/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStreamImpl.java b/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStreamImpl.java index 053bbf7491826e852d0b0f466f68edf37841e0f7..f9bb1235660a761ba3e284649d0395bb2e1a62d7 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStreamImpl.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/ImageInputStreamImpl.java @@ -103,7 +103,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream { * Subclasses may call this method from any of their methods that * require the stream not to be closed. * - * @exception IOException if the stream is closed. + * @throws IOException if the stream is closed. */ protected final void checkClosed() throws IOException { if (isClosed) { @@ -134,7 +134,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream { * @return the value of the next byte in the stream, or {@code -1} * if EOF is reached. * - * @exception IOException if the stream has been closed. + * @throws IOException if the stream has been closed. */ public abstract int read() throws IOException; @@ -147,9 +147,9 @@ public abstract class ImageInputStreamImpl implements ImageInputStream { * @return the number of bytes actually read, or {@code -1} * to indicate EOF. * - * @exception NullPointerException if {@code b} is + * @throws NullPointerException if {@code b} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public int read(byte[] b) throws IOException { return read(b, 0, b.length); @@ -175,12 +175,12 @@ public abstract class ImageInputStreamImpl implements ImageInputStream { * @return the number of bytes actually read, or {@code -1} * to indicate EOF. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code b.length}. - * @exception NullPointerException if {@code b} is + * @throws NullPointerException if {@code b} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public abstract int read(byte[] b, int off, int len) throws IOException; @@ -729,7 +729,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream { * @return an {@code int} representing the number of bytes * skipped. * - * @exception IOException if {@code getStreamPosition} + * @throws IOException if {@code getStreamPosition} * throws an {@code IOException} when computing either * the starting or ending position. */ @@ -750,7 +750,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream { * @return a {@code long} representing the number of bytes * skipped. * - * @exception IOException if {@code getStreamPosition} + * @throws IOException if {@code getStreamPosition} * throws an {@code IOException} when computing either * the starting or ending position. */ @@ -791,7 +791,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream { *

    An {@code IOException} will be thrown if the previous * marked position lies in the discarded portion of the stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ public void reset() throws IOException { if (markByteStack.empty()) { @@ -865,7 +865,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream { * source. This method should not be called from application * code. * - * @exception Throwable if an error occurs during superclass + * @throws Throwable if an error occurs during superclass * finalization. * * @deprecated Finalization has been deprecated for removal. See diff --git a/src/java.desktop/share/classes/javax/imageio/stream/ImageOutputStream.java b/src/java.desktop/share/classes/javax/imageio/stream/ImageOutputStream.java index 5c261754c913a36ec6e1facc2568f54de7ea43fe..e88fb00e9cf007a82ee64a572410e170adeb6cd1 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/ImageOutputStream.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/ImageOutputStream.java @@ -66,7 +66,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param b an {@code int} whose lower 8 bits are to be * written. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void write(int b) throws IOException; @@ -83,9 +83,9 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * * @param b an array of {@code byte}s to be written. * - * @exception NullPointerException if {@code b} is + * @throws NullPointerException if {@code b} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void write(byte[] b) throws IOException; @@ -107,12 +107,12 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param off the start offset in the data. * @param len the number of {@code byte}s to write. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code b.length}. - * @exception NullPointerException if {@code b} is + * @throws NullPointerException if {@code b} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void write(byte[] b, int off, int len) throws IOException; @@ -129,7 +129,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * * @param v the {@code boolean} to be written. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeBoolean(boolean v) throws IOException; @@ -147,7 +147,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param v an {@code int} containing the byte value to be * written. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeByte(int v) throws IOException; @@ -177,7 +177,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param v an {@code int} containing the short value to be * written. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeShort(int v) throws IOException; @@ -187,7 +187,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param v an {@code int} containing the char (unsigned * short) value to be written. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. * * @see #writeShort(int) */ @@ -222,7 +222,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param v an {@code int} containing the value to be * written. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeInt(int v) throws IOException; @@ -263,7 +263,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param v a {@code long} containing the value to be * written. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeLong(long v) throws IOException; @@ -283,7 +283,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param v a {@code float} containing the value to be * written. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeFloat(float v) throws IOException; @@ -304,7 +304,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param v a {@code double} containing the value to be * written. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeDouble(double v) throws IOException; @@ -330,9 +330,9 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param s a {@code String} containing the value to be * written. * - * @exception NullPointerException if {@code s} is + * @throws NullPointerException if {@code s} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeBytes(String s) throws IOException; @@ -358,9 +358,9 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param s a {@code String} containing the value to be * written. * - * @exception NullPointerException if {@code s} is + * @throws NullPointerException if {@code s} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeChars(String s) throws IOException; @@ -427,11 +427,11 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param s a {@code String} containing the value to be * written. * - * @exception NullPointerException if {@code s} is + * @throws NullPointerException if {@code s} is * {@code null}. - * @exception java.io.UTFDataFormatException if the modified UTF-8 + * @throws java.io.UTFDataFormatException if the modified UTF-8 * representation of {@code s} requires more than 65536 bytes. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeUTF(String s) throws IOException; @@ -452,12 +452,12 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param off the start offset in the data. * @param len the number of {@code short}s to write. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code s.length}. - * @exception NullPointerException if {@code s} is + * @throws NullPointerException if {@code s} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeShorts(short[] s, int off, int len) throws IOException; @@ -478,12 +478,12 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param off the start offset in the data. * @param len the number of {@code char}s to write. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code c.length}. - * @exception NullPointerException if {@code c} is + * @throws NullPointerException if {@code c} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeChars(char[] c, int off, int len) throws IOException; @@ -504,12 +504,12 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param off the start offset in the data. * @param len the number of {@code int}s to write. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code i.length}. - * @exception NullPointerException if {@code i} is + * @throws NullPointerException if {@code i} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeInts(int[] i, int off, int len) throws IOException; @@ -530,12 +530,12 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param off the start offset in the data. * @param len the number of {@code long}s to write. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code l.length}. - * @exception NullPointerException if {@code l} is + * @throws NullPointerException if {@code l} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeLongs(long[] l, int off, int len) throws IOException; @@ -556,12 +556,12 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param off the start offset in the data. * @param len the number of {@code float}s to write. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code f.length}. - * @exception NullPointerException if {@code f} is + * @throws NullPointerException if {@code f} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeFloats(float[] f, int off, int len) throws IOException; @@ -582,12 +582,12 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param off the start offset in the data. * @param len the number of {@code double}s to write. * - * @exception IndexOutOfBoundsException if {@code off} is + * @throws IndexOutOfBoundsException if {@code off} is * negative, {@code len} is negative, or {@code off + len} * is greater than {@code d.length}. - * @exception NullPointerException if {@code d} is + * @throws NullPointerException if {@code d} is * {@code null}. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeDoubles(double[] d, int off, int len) throws IOException; @@ -606,7 +606,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param bit an {@code int} whose least significant bit * is to be written to the stream. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeBit(int bit) throws IOException; @@ -637,9 +637,9 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * * @param numBits an {@code int} between 0 and 64, inclusive. * - * @exception IllegalArgumentException if {@code numBits} is + * @throws IllegalArgumentException if {@code numBits} is * not between 0 and 64, inclusive. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void writeBits(long bits, int numBits) throws IOException; @@ -653,10 +653,10 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * @param pos a {@code long} containing the length of the * stream prefix that may be flushed to the destination. * - * @exception IndexOutOfBoundsException if {@code pos} lies + * @throws IndexOutOfBoundsException if {@code pos} lies * in the flushed portion of the stream or past the current stream * position. - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ void flushBefore(long pos) throws IOException; } diff --git a/src/java.desktop/share/classes/javax/imageio/stream/ImageOutputStreamImpl.java b/src/java.desktop/share/classes/javax/imageio/stream/ImageOutputStreamImpl.java index 29e55a9a74536c6deaf4cff6b8d4b67b017af234..0bee5c7a240933f5ca2be7e77f2d28741822b8d2 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/ImageOutputStreamImpl.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/ImageOutputStreamImpl.java @@ -484,7 +484,7 @@ public abstract class ImageOutputStreamImpl * beginning of the {@code write(int)} and * {@code write(byte[], int, int)} methods. * - * @exception IOException if an I/O error occurs. + * @throws IOException if an I/O error occurs. */ protected final void flushBits() throws IOException { checkClosed(); diff --git a/src/java.desktop/share/classes/javax/imageio/stream/MemoryCache.java b/src/java.desktop/share/classes/javax/imageio/stream/MemoryCache.java index 2b0fdd98d6017584f5d74df06ffb316742947703..260a0242546d59d43269a7cce3eb1b89e0ee0ddb 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/MemoryCache.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/MemoryCache.java @@ -141,7 +141,7 @@ class MemoryCache { * not dispose of any blocks containing bytes written. To dispose * blocks, use {@link #disposeBefore disposeBefore()}. * - * @exception IndexOutOfBoundsException if any portion of + * @throws IndexOutOfBoundsException if any portion of * the requested data is not in the cache (including if {@code pos} * is in a block already disposed), or if either {@code pos} or * {@code len} is < 0. @@ -207,8 +207,8 @@ class MemoryCache { * @param len the number of bytes to be written. * @param pos the cache position at which to begin writing. * - * @exception NullPointerException if {@code b} is {@code null}. - * @exception IndexOutOfBoundsException if {@code off}, + * @throws NullPointerException if {@code b} is {@code null}. + * @throws IndexOutOfBoundsException if {@code off}, * {@code len}, or {@code pos} are negative, * or if {@code off+len > b.length}. * @throws IOException if there is an I/O error while writing to the cache @@ -254,7 +254,7 @@ class MemoryCache { * will be written. * @param pos the cache position at which to begin writing. * - * @exception IndexOutOfBoundsException if {@code pos} is negative. + * @throws IndexOutOfBoundsException if {@code pos} is negative. * @throws IOException if there is an I/O error while writing to the cache */ public void write(int b, long pos) throws IOException { @@ -309,8 +309,8 @@ class MemoryCache { * at cache position {@code pos}, into the array * {@code b} at offset {@code off}. * - * @exception NullPointerException if b is {@code null} - * @exception IndexOutOfBoundsException if {@code off}, + * @throws NullPointerException if b is {@code null} + * @throws IndexOutOfBoundsException if {@code off}, * {@code len} or {@code pos} are negative or if * {@code off + len > b.length} or if any portion of the * requested data is not in the cache (including if @@ -349,7 +349,7 @@ class MemoryCache { * Free the blocks up to the position {@code pos}. * The byte at {@code pos} remains available. * - * @exception IndexOutOfBoundsException if {@code pos} + * @throws IndexOutOfBoundsException if {@code pos} * is in a block that has already been disposed. */ public void disposeBefore(long pos) { diff --git a/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageInputStream.java b/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageInputStream.java index 44b9d8cd5fbf9c0b3ce2130da8ed12b1bb9dd9f8..ecb30ddba5205e7dc50838ea5b69c6ed35823baf 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageInputStream.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageInputStream.java @@ -61,7 +61,7 @@ public class MemoryCacheImageInputStream extends ImageInputStreamImpl { * * @param stream an {@code InputStream} to read from. * - * @exception IllegalArgumentException if {@code stream} is + * @throws IllegalArgumentException if {@code stream} is * {@code null}. */ public MemoryCacheImageInputStream(InputStream stream) { diff --git a/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageOutputStream.java b/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageOutputStream.java index b90b7f33eacd006f2f9b87b00f975560e9587fd6..676e3c829e34dd8dd860e565b1242e427cdcbf49 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageOutputStream.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/MemoryCacheImageOutputStream.java @@ -51,7 +51,7 @@ public class MemoryCacheImageOutputStream extends ImageOutputStreamImpl { * * @param stream an {@code OutputStream} to write to. * - * @exception IllegalArgumentException if {@code stream} is + * @throws IllegalArgumentException if {@code stream} is * {@code null}. */ public MemoryCacheImageOutputStream(OutputStream stream) { diff --git a/src/java.desktop/share/classes/javax/swing/AbstractButton.java b/src/java.desktop/share/classes/javax/swing/AbstractButton.java index 8a2936cd4990e1dc2965c2f729ccba751195937f..4f79ac8e2b36af75866dd951c0a7a52f66982ba2 100644 --- a/src/java.desktop/share/classes/javax/swing/AbstractButton.java +++ b/src/java.desktop/share/classes/javax/swing/AbstractButton.java @@ -876,7 +876,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl *

  • {@code SwingConstants.LEADING} *
  • {@code SwingConstants.TRAILING} (the default) * - * @exception IllegalArgumentException if textPosition + * @throws IllegalArgumentException if textPosition * is not one of the legal values listed above */ @BeanProperty(visualUpdate = true, enumerationValues = { @@ -953,7 +953,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * {@code IllegalArgumentException} that is thrown for an invalid * value * @return the {@code key} argument - * @exception IllegalArgumentException if key is not one of the legal + * @throws IllegalArgumentException if key is not one of the legal * values listed above * @see #setHorizontalTextPosition * @see #setHorizontalAlignment @@ -984,7 +984,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * {@code IllegalArgumentException} that is thrown for an invalid * value * @return the {@code key} argument - * @exception IllegalArgumentException if key is not one of the legal + * @throws IllegalArgumentException if key is not one of the legal * values listed above */ protected int checkVerticalKey(int key, String exception) { @@ -1571,7 +1571,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * * @since 1.4 * @param index Index into the String to underline - * @exception IllegalArgumentException will be thrown if index + * @throws IllegalArgumentException will be thrown if index * is >= length of the text, or < -1 * @see #getDisplayedMnemonicIndex */ @@ -1654,7 +1654,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * @see #getMultiClickThreshhold * @param threshhold the amount of time required between mouse * press events to generate corresponding action events - * @exception IllegalArgumentException if threshhold < 0 + * @throws IllegalArgumentException if threshhold < 0 * @since 1.4 */ public void setMultiClickThreshhold(long threshhold) { @@ -1791,10 +1791,10 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * @param index the position in the container's list at which to * insert the component, where -1 * means append to the end - * @exception IllegalArgumentException if index is invalid - * @exception IllegalArgumentException if adding the container's parent + * @throws IllegalArgumentException if index is invalid + * @throws IllegalArgumentException if adding the container's parent * to itself - * @exception IllegalArgumentException if adding a window to a container + * @throws IllegalArgumentException if adding a window to a container * @since 1.5 */ protected void addImpl(Component comp, Object constraints, int index) { @@ -3064,7 +3064,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * * @param i zero-based index of the key bindings * @return a javax.lang.Object which specifies the key binding - * @exception IllegalArgumentException if the index is + * @throws IllegalArgumentException if the index is * out of bounds * @see #getAccessibleKeyBindingCount */ diff --git a/src/java.desktop/share/classes/javax/swing/AbstractListModel.java b/src/java.desktop/share/classes/javax/swing/AbstractListModel.java index 0396c956597fe5c6dc46846fb428a876098ca551..815fbea84070b252dc8534e7d3cae86ef784444b 100644 --- a/src/java.desktop/share/classes/javax/swing/AbstractListModel.java +++ b/src/java.desktop/share/classes/javax/swing/AbstractListModel.java @@ -218,7 +218,7 @@ public abstract class AbstractListModel implements ListModel, Serializable * on this model, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType doesn't + * @throws ClassCastException if listenerType doesn't * specify a class or interface that implements * java.util.EventListener * diff --git a/src/java.desktop/share/classes/javax/swing/BorderFactory.java b/src/java.desktop/share/classes/javax/swing/BorderFactory.java index 3fcb5620e692b5bb5439e4a2c33057d10e9670f8..2e4b18848a2e65ccac85d54699e704fd56f7f269 100644 --- a/src/java.desktop/share/classes/javax/swing/BorderFactory.java +++ b/src/java.desktop/share/classes/javax/swing/BorderFactory.java @@ -332,7 +332,7 @@ public class BorderFactory * @param type one of EtchedBorder.RAISED, or * EtchedBorder.LOWERED * @return the Border object - * @exception IllegalArgumentException if type is not either + * @throws IllegalArgumentException if type is not either * EtchedBorder.RAISED or * EtchedBorder.LOWERED * @since 1.3 diff --git a/src/java.desktop/share/classes/javax/swing/BoxLayout.java b/src/java.desktop/share/classes/javax/swing/BoxLayout.java index bc84a4fa58279971dfbbe2453ec71a612782f47e..d20a05ce4ef4eb920eb4c7a5dad6f90fd11f8888 100644 --- a/src/java.desktop/share/classes/javax/swing/BoxLayout.java +++ b/src/java.desktop/share/classes/javax/swing/BoxLayout.java @@ -169,7 +169,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * {@code BoxLayout.X_AXIS, BoxLayout.Y_AXIS, * BoxLayout.LINE_AXIS} or {@code BoxLayout.PAGE_AXIS} * - * @exception AWTError if the value of {@code axis} is invalid + * @throws AWTError if the value of {@code axis} is invalid */ @ConstructorProperties({"target", "axis"}) public BoxLayout(Container target, int axis) { @@ -234,7 +234,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * * @param target the affected container * - * @exception AWTError if the target isn't the container specified to the + * @throws AWTError if the target isn't the container specified to the * BoxLayout constructor */ public synchronized void invalidateLayout(Container target) { @@ -280,7 +280,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * * @param target the container that needs to be laid out * @return the dimensions >= 0 && <= Integer.MAX_VALUE - * @exception AWTError if the target isn't the container specified to the + * @throws AWTError if the target isn't the container specified to the * BoxLayout constructor * @see Container * @see #minimumLayoutSize @@ -306,7 +306,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * * @param target the container that needs to be laid out * @return the dimensions >= 0 && <= Integer.MAX_VALUE - * @exception AWTError if the target isn't the container specified to the + * @throws AWTError if the target isn't the container specified to the * BoxLayout constructor * @see #preferredLayoutSize * @see #maximumLayoutSize @@ -331,7 +331,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * * @param target the container that needs to be laid out * @return the dimensions >= 0 && <= Integer.MAX_VALUE - * @exception AWTError if the target isn't the container specified to the + * @throws AWTError if the target isn't the container specified to the * BoxLayout constructor * @see #preferredLayoutSize * @see #minimumLayoutSize @@ -358,7 +358,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * * @param target the container * @return the alignment >= 0.0f && <= 1.0f - * @exception AWTError if the target isn't the container specified to the + * @throws AWTError if the target isn't the container specified to the * BoxLayout constructor */ public synchronized float getLayoutAlignmentX(Container target) { @@ -375,7 +375,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * * @param target the container * @return the alignment >= 0.0f && <= 1.0f - * @exception AWTError if the target isn't the container specified to the + * @throws AWTError if the target isn't the container specified to the * BoxLayout constructor */ public synchronized float getLayoutAlignmentY(Container target) { @@ -390,7 +390,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * * @param target the container to lay out * - * @exception AWTError if the target isn't the container specified to the + * @throws AWTError if the target isn't the container specified to the * BoxLayout constructor */ public void layoutContainer(Container target) { diff --git a/src/java.desktop/share/classes/javax/swing/DefaultBoundedRangeModel.java b/src/java.desktop/share/classes/javax/swing/DefaultBoundedRangeModel.java index 7e254d5c8b329eb9e894c8aef37ecb775ae7023f..e9bd3d96a6a20f631d8a611f99d4db2956e7060a 100644 --- a/src/java.desktop/share/classes/javax/swing/DefaultBoundedRangeModel.java +++ b/src/java.desktop/share/classes/javax/swing/DefaultBoundedRangeModel.java @@ -417,7 +417,7 @@ public class DefaultBoundedRangeModel implements BoundedRangeModel, Serializable * on this model, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType doesn't + * @throws ClassCastException if listenerType doesn't * specify a class or interface that implements * java.util.EventListener * diff --git a/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java b/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java index 453b1d0ab0ecff3629914b1a020394324daab94e..d391011167ab6e8b68268cdabaa2f6c9c5fa82a6 100644 --- a/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java +++ b/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java @@ -488,7 +488,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable { * on this model, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType doesn't + * @throws ClassCastException if listenerType doesn't * specify a class or interface that implements * java.util.EventListener * diff --git a/src/java.desktop/share/classes/javax/swing/DefaultListModel.java b/src/java.desktop/share/classes/javax/swing/DefaultListModel.java index 88210b77c9ce589f9ec4037c36f5d99de76b5fda..9d519927b6774c5f36b8439e85aaee959ec58d00 100644 --- a/src/java.desktop/share/classes/javax/swing/DefaultListModel.java +++ b/src/java.desktop/share/classes/javax/swing/DefaultListModel.java @@ -345,7 +345,7 @@ public class DefaultListModel extends AbstractListModel * * @param element the component to insert * @param index where to insert the new component - * @exception ArrayIndexOutOfBoundsException if the index was invalid + * @throws ArrayIndexOutOfBoundsException if the index was invalid * @see #add(int,Object) * @see Vector#insertElementAt(Object,int) */ diff --git a/src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java b/src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java index 55b8fbba66cfac1f2bc1ff0c6e2ea4b04876a083..aa69c2d1ab09e28a1367126e3c3bbec599cb5928 100644 --- a/src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java +++ b/src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java @@ -284,7 +284,7 @@ public class DefaultListSelectionModel implements ListSelectionModel, Cloneable, * on this model, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType doesn't + * @throws ClassCastException if listenerType doesn't * specify a class or interface that implements * java.util.EventListener * @@ -750,7 +750,7 @@ public class DefaultListSelectionModel implements ListSelectionModel, Cloneable, * Returns a clone of this selection model with the same selection. * listenerLists are not duplicated. * - * @exception CloneNotSupportedException if the selection model does not + * @throws CloneNotSupportedException if the selection model does not * both (a) implement the Cloneable interface and (b) define a * clone method. */ diff --git a/src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java b/src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java index c5c2539d41f4cc608df67824e513d701cfdc2afa..122e635fba1a1255dfa72d6391b048caf3340216 100644 --- a/src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java +++ b/src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java @@ -178,7 +178,7 @@ Serializable { * on this model, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType doesn't + * @throws ClassCastException if listenerType doesn't * specify a class or interface that implements * java.util.EventListener * diff --git a/src/java.desktop/share/classes/javax/swing/JApplet.java b/src/java.desktop/share/classes/javax/swing/JApplet.java index a1d51bf0069f10791400c3b1682273c1fdc2e58c..e5ad62322e65d95bb9aa868db29258cf15f2253b 100644 --- a/src/java.desktop/share/classes/javax/swing/JApplet.java +++ b/src/java.desktop/share/classes/javax/swing/JApplet.java @@ -135,7 +135,7 @@ public class JApplet extends Applet implements Accessible, * This constructor sets the component's locale property to the value * returned by JComponent.getDefaultLocale. * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @see JComponent#getDefaultLocale @@ -312,10 +312,10 @@ public class JApplet extends Applet implements Accessible, * @param comp the component to be enhanced * @param constraints the constraints to be respected * @param index the index - * @exception IllegalArgumentException if index is invalid - * @exception IllegalArgumentException if adding the container's parent + * @throws IllegalArgumentException if index is invalid + * @throws IllegalArgumentException if adding the container's parent * to itself - * @exception IllegalArgumentException if adding a window to a container + * @throws IllegalArgumentException if adding a window to a container * * @see #setRootPaneCheckingEnabled * @see javax.swing.RootPaneContainer @@ -423,7 +423,7 @@ public class JApplet extends Applet implements Accessible, * Sets the contentPane property. This method is called by the constructor. * @param contentPane the contentPane object for this applet * - * @exception java.awt.IllegalComponentStateException (a runtime + * @throws java.awt.IllegalComponentStateException (a runtime * exception) if the content pane parameter is null * @see #getContentPane * @see RootPaneContainer#setContentPane @@ -437,7 +437,7 @@ public class JApplet extends Applet implements Accessible, /** * Returns the layeredPane object for this applet. * - * @exception java.awt.IllegalComponentStateException (a runtime + * @throws java.awt.IllegalComponentStateException (a runtime * exception) if the layered pane parameter is null * @see #setLayeredPane * @see RootPaneContainer#getLayeredPane diff --git a/src/java.desktop/share/classes/javax/swing/JColorChooser.java b/src/java.desktop/share/classes/javax/swing/JColorChooser.java index 29bf7009b4ffc7d3e909fdb93ad5f4af1003afb2..945c6f6069704705a0aab5dc582a3d44fee9c1d9 100644 --- a/src/java.desktop/share/classes/javax/swing/JColorChooser.java +++ b/src/java.desktop/share/classes/javax/swing/JColorChooser.java @@ -150,7 +150,7 @@ public class JColorChooser extends JComponent implements Accessible { * @param title the String containing the dialog's title * @param initialColor the initial Color set when the color-chooser is shown * @return the selected color or null if the user opted out - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -173,7 +173,7 @@ public class JColorChooser extends JComponent implements Accessible { * @param colorTransparencySelectionEnabled true if the transparency of * a color can be selected * @return the selected color or null if the user opted out - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -217,7 +217,7 @@ public class JColorChooser extends JComponent implements Accessible { * @param okListener the ActionListener invoked when "OK" is pressed * @param cancelListener the ActionListener invoked when "Cancel" is pressed * @return a new dialog containing the color-chooser pane - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -343,7 +343,7 @@ public class JColorChooser extends JComponent implements Accessible { * @param r an int specifying the amount of Red * @param g an int specifying the amount of Green * @param b an int specifying the amount of Blue - * @exception IllegalArgumentException if r,g,b values are out of range + * @throws IllegalArgumentException if r,g,b values are out of range * @see java.awt.Color */ public void setColor(int r, int g, int b) { @@ -386,7 +386,7 @@ public class JColorChooser extends JComponent implements Accessible { * TransferHandler. * * @param b the value to set the dragEnabled property to - * @exception HeadlessException if + * @throws HeadlessException if * b is true and * GraphicsEnvironment.isHeadless() * returns true @@ -464,7 +464,7 @@ public class JColorChooser extends JComponent implements Accessible { * * @param panel a string that specifies the panel to be removed * @return the color panel - * @exception IllegalArgumentException if panel is not in list of + * @throws IllegalArgumentException if panel is not in list of * known chooser panels */ public AbstractColorChooserPanel removeChooserPanel( AbstractColorChooserPanel panel ) { diff --git a/src/java.desktop/share/classes/javax/swing/JComboBox.java b/src/java.desktop/share/classes/javax/swing/JComboBox.java index fdbbdc686575f26e01f8e0cce1c4ab61071bf07b..f035c186896a671b32f8aeacd110b104324d4abb 100644 --- a/src/java.desktop/share/classes/javax/swing/JComboBox.java +++ b/src/java.desktop/share/classes/javax/swing/JComboBox.java @@ -638,7 +638,7 @@ implements ItemSelectable,ListDataListener,ActionListener, Accessible { * * @param anIndex an integer specifying the list item to select, * where 0 specifies the first item in the list and -1 indicates no selection - * @exception IllegalArgumentException if anIndex < -1 or + * @throws IllegalArgumentException if anIndex < -1 or * anIndex is greater than or equal to size */ @BeanProperty(bound = false, preferred = true, description @@ -815,7 +815,7 @@ implements ItemSelectable,ListDataListener,ActionListener, Accessible { /** * Checks that the dataModel is an instance of * MutableComboBoxModel. If not, it throws an exception. - * @exception RuntimeException if dataModel is not an + * @throws RuntimeException if dataModel is not an * instance of MutableComboBoxModel. */ void checkMutableComboBoxModel() { @@ -2298,7 +2298,7 @@ implements ItemSelectable,ListDataListener,ActionListener, Accessible { * @return this component's locale. If this component does not have * a locale, the locale of its parent is returned. * - * @exception IllegalComponentStateException + * @throws IllegalComponentStateException * If the Component does not have its own locale and has not yet been * added to a containment hierarchy such that the locale can be * determined from the containing parent. diff --git a/src/java.desktop/share/classes/javax/swing/JComponent.java b/src/java.desktop/share/classes/javax/swing/JComponent.java index c572a12ebb465e801d948c43fea0a45cf050efa5..87b8c3175bdcb1432df7dc64f88abc32b8f02f30 100644 --- a/src/java.desktop/share/classes/javax/swing/JComponent.java +++ b/src/java.desktop/share/classes/javax/swing/JComponent.java @@ -2455,7 +2455,7 @@ public abstract class JComponent extends Container implements Serializable, * * @param condition one of the values listed above * @param map the InputMap to use for the given condition - * @exception IllegalArgumentException if condition is + * @throws IllegalArgumentException if condition is * WHEN_IN_FOCUSED_WINDOW and map * is not an instance of ComponentInputMap; or * if condition is not one of the legal values @@ -2554,7 +2554,7 @@ public abstract class JComponent extends Container implements Serializable, * @return the InputMap for the given condition; * if create is false and the InputMap * hasn't been created, returns null - * @exception IllegalArgumentException if condition + * @throws IllegalArgumentException if condition * is not one of the legal values listed above */ final InputMap getInputMap(int condition, boolean create) { @@ -4623,7 +4623,7 @@ public abstract class JComponent extends Container implements Serializable, * @param propertyName the name of the property that was listened on * @param oldValue the old value of the property * @param newValue the new value of the property - * @exception java.beans.PropertyVetoException when the attempt to set the + * @throws java.beans.PropertyVetoException when the attempt to set the * property is vetoed by the component */ protected void fireVetoableChange(String propertyName, Object oldValue, Object newValue) @@ -4799,7 +4799,7 @@ public abstract class JComponent extends Container implements Serializable, * FooListeners on this component, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType + * @throws ClassCastException if listenerType * doesn't specify a class or interface that implements * java.util.EventListener * diff --git a/src/java.desktop/share/classes/javax/swing/JEditorPane.java b/src/java.desktop/share/classes/javax/swing/JEditorPane.java index 6b9189d550d584c851e9e7a1c93127bc92a9e6f1..f347621a687ce75ab75d5068e10e99145cba9a69 100644 --- a/src/java.desktop/share/classes/javax/swing/JEditorPane.java +++ b/src/java.desktop/share/classes/javax/swing/JEditorPane.java @@ -312,7 +312,7 @@ public class JEditorPane extends JTextComponent { * Creates a JEditorPane based on a specified URL for input. * * @param initialPage the URL - * @exception IOException if the URL is null + * @throws IOException if the URL is null * or cannot be accessed */ public JEditorPane(URL initialPage) throws IOException { @@ -325,7 +325,7 @@ public class JEditorPane extends JTextComponent { * a URL specification. * * @param url the URL - * @exception IOException if the URL is null or + * @throws IOException if the URL is null or * cannot be accessed */ public JEditorPane(String url) throws IOException { @@ -340,7 +340,7 @@ public class JEditorPane extends JTextComponent { * * @param type mime type of the given text * @param text the text to initialize with; may be null - * @exception NullPointerException if the type parameter + * @throws NullPointerException if the type parameter * is null */ public JEditorPane(String type, String text) { @@ -462,7 +462,7 @@ public class JEditorPane extends JTextComponent { * thread is done whether the load was successful or not. * * @param page the URL of the page - * @exception IOException for a null or invalid + * @throws IOException for a null or invalid * page specification, or exception from the stream being read * @see #getPage */ @@ -578,7 +578,7 @@ public class JEditorPane extends JTextComponent { * * @param in the stream from which to read * @param desc an object describing the stream - * @exception IOException as thrown by the stream being + * @throws IOException as thrown by the stream being * used to initialize * @see JTextComponent#read * @see #setDocument @@ -925,7 +925,7 @@ public class JEditorPane extends JTextComponent { * Sets the current URL being displayed. * * @param url the URL for display - * @exception IOException for a null or invalid URL + * @throws IOException for a null or invalid URL * specification */ public void setPage(String url) throws IOException { diff --git a/src/java.desktop/share/classes/javax/swing/JFileChooser.java b/src/java.desktop/share/classes/javax/swing/JFileChooser.java index 8d286e05f3bab1f030e805182ae1aa6ba968051a..a44edec35652fda42fa41a754417c8e6fa773293 100644 --- a/src/java.desktop/share/classes/javax/swing/JFileChooser.java +++ b/src/java.desktop/share/classes/javax/swing/JFileChooser.java @@ -303,7 +303,7 @@ public class JFileChooser extends JComponent implements Accessible { /** * Constructs a JFileChooser pointing to the user's * default directory. This default depends on the operating system. - * It is typically the "My Documents" folder on Windows, and the + * It is typically the "Documents" folder on Windows, and the * user's home directory on Unix. */ public JFileChooser() { @@ -315,7 +315,7 @@ public class JFileChooser extends JComponent implements Accessible { * Passing in a null * string causes the file chooser to point to the user's default directory. * This default depends on the operating system. It is - * typically the "My Documents" folder on Windows, and the user's + * typically the "Documents" folder on Windows, and the user's * home directory on Unix. * * @param currentDirectoryPath a String giving the path @@ -330,7 +330,7 @@ public class JFileChooser extends JComponent implements Accessible { * as the path. Passing in a null file * causes the file chooser to point to the user's default directory. * This default depends on the operating system. It is - * typically the "My Documents" folder on Windows, and the user's + * typically the "Documents" folder on Windows, and the user's * home directory on Unix. * * @param currentDirectory a File object specifying @@ -446,7 +446,7 @@ public class JFileChooser extends JComponent implements Accessible { * TransferHandler. * * @param b the value to set the dragEnabled property to - * @exception HeadlessException if + * @throws HeadlessException if * b is true and * GraphicsEnvironment.isHeadless() * returns true @@ -570,7 +570,7 @@ public class JFileChooser extends JComponent implements Accessible { * Sets the current directory. Passing in null sets the * file chooser to point to the user's default directory. * This default depends on the operating system. It is - * typically the "My Documents" folder on Windows, and the user's + * typically the "Documents" folder on Windows, and the user's * home directory on Unix. * * If the file passed in as currentDirectory is not a @@ -658,7 +658,7 @@ public class JFileChooser extends JComponent implements Accessible { *
  • JFileChooser.ERROR_OPTION if an error occurs or the * dialog is dismissed * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @see #showDialog @@ -683,7 +683,7 @@ public class JFileChooser extends JComponent implements Accessible { *
  • JFileChooser.ERROR_OPTION if an error occurs or the * dialog is dismissed * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @see #showDialog @@ -743,7 +743,7 @@ public class JFileChooser extends JComponent implements Accessible { *
  • JFileChooser.ERROR_OPTION if an error occurs or the * dialog is dismissed * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -800,7 +800,7 @@ public class JFileChooser extends JComponent implements Accessible { * @param parent the parent component of the dialog; * can be null * @return a new JDialog containing this instance - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.4 @@ -924,7 +924,7 @@ public class JFileChooser extends JComponent implements Accessible { *
  • JFileChooser.CUSTOM_DIALOG * * - * @exception IllegalArgumentException if dialogType is + * @throws IllegalArgumentException if dialogType is * not legal * * @see #getDialogType @@ -1311,7 +1311,7 @@ public class JFileChooser extends JComponent implements Accessible { *
  • JFileChooser.FILES_AND_DIRECTORIES * * - * @exception IllegalArgumentException if mode is an + * @throws IllegalArgumentException if mode is an * illegal file selection mode * * @see #getFileSelectionMode diff --git a/src/java.desktop/share/classes/javax/swing/JFrame.java b/src/java.desktop/share/classes/javax/swing/JFrame.java index 339268fd16547916f1cc56974a350ce3a69ccd42..9b37ae77ab00876b2de41f11834a50b1f194f6e5 100644 --- a/src/java.desktop/share/classes/javax/swing/JFrame.java +++ b/src/java.desktop/share/classes/javax/swing/JFrame.java @@ -169,7 +169,7 @@ public class JFrame extends Frame implements WindowConstants, * This constructor sets the component's locale property to the value * returned by JComponent.getDefaultLocale. * - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @see Component#setSize @@ -193,7 +193,7 @@ public class JFrame extends Frame implements WindowConstants, * to construct the new Frame; * if gc is null, the system * default GraphicsConfiguration is assumed - * @exception IllegalArgumentException if gc is not from + * @throws IllegalArgumentException if gc is not from * a screen device. This exception is always thrown when * GraphicsEnvironment.isHeadless() returns true. * @see java.awt.GraphicsEnvironment#isHeadless @@ -213,7 +213,7 @@ public class JFrame extends Frame implements WindowConstants, * returned by JComponent.getDefaultLocale. * * @param title the title for the frame - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @see Component#setSize @@ -239,7 +239,7 @@ public class JFrame extends Frame implements WindowConstants, * to construct the new JFrame with; * if gc is null, the system * default GraphicsConfiguration is assumed - * @exception IllegalArgumentException if gc is not from + * @throws IllegalArgumentException if gc is not from * a screen device. This exception is always thrown when * GraphicsEnvironment.isHeadless() returns true. * @see java.awt.GraphicsEnvironment#isHeadless @@ -357,7 +357,7 @@ public class JFrame extends Frame implements WindowConstants, * * @param operation the operation which should be performed when the * user closes the frame - * @exception IllegalArgumentException if defaultCloseOperation value + * @throws IllegalArgumentException if defaultCloseOperation value * isn't one of the above valid values * @see #addWindowListener * @see #getDefaultCloseOperation @@ -540,10 +540,10 @@ public class JFrame extends Frame implements WindowConstants, * @param comp the component to be enhanced * @param constraints the constraints to be respected * @param index the index - * @exception IllegalArgumentException if index is invalid - * @exception IllegalArgumentException if adding the container's parent + * @throws IllegalArgumentException if index is invalid + * @throws IllegalArgumentException if adding the container's parent * to itself - * @exception IllegalArgumentException if adding a window to a container + * @throws IllegalArgumentException if adding a window to a container * * @see #setRootPaneCheckingEnabled * @see javax.swing.RootPaneContainer @@ -668,7 +668,7 @@ public class JFrame extends Frame implements WindowConstants, * * @param contentPane the contentPane object for this frame * - * @exception java.awt.IllegalComponentStateException (a runtime + * @throws java.awt.IllegalComponentStateException (a runtime * exception) if the content pane parameter is null * @see #getContentPane * @see RootPaneContainer#setContentPane @@ -696,7 +696,7 @@ public class JFrame extends Frame implements WindowConstants, * This method is called by the constructor. * @param layeredPane the layeredPane object for this frame * - * @exception java.awt.IllegalComponentStateException (a runtime + * @throws java.awt.IllegalComponentStateException (a runtime * exception) if the layered pane parameter is null * @see #getLayeredPane * @see RootPaneContainer#setLayeredPane diff --git a/src/java.desktop/share/classes/javax/swing/JInternalFrame.java b/src/java.desktop/share/classes/javax/swing/JInternalFrame.java index 62efd03c0db844aad94f0065eab55a3c4330fba7..9caa5f966e305112392f4e972ff678dce1328a98 100644 --- a/src/java.desktop/share/classes/javax/swing/JInternalFrame.java +++ b/src/java.desktop/share/classes/javax/swing/JInternalFrame.java @@ -497,10 +497,10 @@ public class JInternalFrame extends JComponent implements * @param comp the component to be enhanced * @param constraints the constraints to be respected * @param index the index - * @exception IllegalArgumentException if index is invalid - * @exception IllegalArgumentException if adding the container's parent + * @throws IllegalArgumentException if index is invalid + * @throws IllegalArgumentException if adding the container's parent * to itself - * @exception IllegalArgumentException if adding a window to a container + * @throws IllegalArgumentException if adding a window to a container * * @see #setRootPaneCheckingEnabled * @see javax.swing.RootPaneContainer @@ -628,7 +628,7 @@ public class JInternalFrame extends JComponent implements * * @param c the content pane for this internal frame * - * @exception java.awt.IllegalComponentStateException (a runtime + * @throws java.awt.IllegalComponentStateException (a runtime * exception) if the content pane parameter is null * @see RootPaneContainer#getContentPane */ @@ -657,7 +657,7 @@ public class JInternalFrame extends JComponent implements * * @param layered the JLayeredPane for this internal frame * - * @exception java.awt.IllegalComponentStateException (a runtime + * @throws java.awt.IllegalComponentStateException (a runtime * exception) if the layered pane parameter is null * @see RootPaneContainer#setLayeredPane */ @@ -794,7 +794,7 @@ public class JInternalFrame extends JComponent implements * * @param b must be true * - * @exception PropertyVetoException when the attempt to set the + * @throws PropertyVetoException when the attempt to set the * property is vetoed by the JInternalFrame * * @see #isClosed() @@ -906,7 +906,7 @@ public class JInternalFrame extends JComponent implements * * @param b a boolean, where true means to iconify this internal frame and * false means to de-iconify it - * @exception PropertyVetoException when the attempt to set the + * @throws PropertyVetoException when the attempt to set the * property is vetoed by the JInternalFrame * * @see InternalFrameEvent#INTERNAL_FRAME_ICONIFIED @@ -985,7 +985,7 @@ public class JInternalFrame extends JComponent implements * * @param b a boolean, where true maximizes this internal frame and false * restores it - * @exception PropertyVetoException when the attempt to set the + * @throws PropertyVetoException when the attempt to set the * property is vetoed by the JInternalFrame */ @BeanProperty(description @@ -1047,7 +1047,7 @@ public class JInternalFrame extends JComponent implements * @param selected a boolean, where true means this internal frame * should become selected (currently active) * and false means it should become deselected - * @exception PropertyVetoException when the attempt to set the + * @throws PropertyVetoException when the attempt to set the * property is vetoed by the JInternalFrame * * @see #isShowing diff --git a/src/java.desktop/share/classes/javax/swing/JLabel.java b/src/java.desktop/share/classes/javax/swing/JLabel.java index 8dff4a8fd25b3ba8eacd741730138d189071d537..eed6a157cc1c05333e505f804986ba72650c09d7 100644 --- a/src/java.desktop/share/classes/javax/swing/JLabel.java +++ b/src/java.desktop/share/classes/javax/swing/JLabel.java @@ -551,7 +551,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible * * @since 1.4 * @param index Index into the String to underline - * @exception IllegalArgumentException will be thrown if index + * @throws IllegalArgumentException will be thrown if index * is >= length of the text, or < -1 */ @BeanProperty(visualUpdate = true, description @@ -595,7 +595,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible * @param message the IllegalArgumentException detail message * @return the key value if {@code key} is a a legal value for the * horizontalAlignment properties - * @exception IllegalArgumentException if key isn't LEFT, CENTER, RIGHT, + * @throws IllegalArgumentException if key isn't LEFT, CENTER, RIGHT, * LEADING or TRAILING. * @see #setHorizontalTextPosition * @see #setHorizontalAlignment @@ -622,7 +622,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible * @param message the IllegalArgumentException detail message * @return the key value if {@code key} is a legal value for the * verticalAlignment or verticalTextPosition properties - * @exception IllegalArgumentException if key isn't TOP, CENTER, or BOTTOM. + * @throws IllegalArgumentException if key isn't TOP, CENTER, or BOTTOM. * @see #setVerticalAlignment * @see #setVerticalTextPosition */ @@ -1637,7 +1637,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible * * @param i zero-based index of the key bindings * @return a javax.lang.Object which specifies the key binding - * @exception IllegalArgumentException if the index is + * @throws IllegalArgumentException if the index is * out of bounds * @see #getAccessibleKeyBindingCount */ diff --git a/src/java.desktop/share/classes/javax/swing/JLayer.java b/src/java.desktop/share/classes/javax/swing/JLayer.java index 0ade190ce42fb0c8a5896020af33b1229050faf9..c2076299e442620d55fd514fa003e8d66739cd38 100644 --- a/src/java.desktop/share/classes/javax/swing/JLayer.java +++ b/src/java.desktop/share/classes/javax/swing/JLayer.java @@ -316,7 +316,7 @@ public final class JLayer * a {@code JLayer}. * * @param mgr the specified layout manager - * @exception IllegalArgumentException this method is not supported + * @throws IllegalArgumentException this method is not supported */ public void setLayout(LayoutManager mgr) { if (mgr != null) { diff --git a/src/java.desktop/share/classes/javax/swing/JList.java b/src/java.desktop/share/classes/javax/swing/JList.java index ac4a1e3fe3a6ff67d6b3b0047c3cab8734502b77..220f86aca4ee4fe86b85483913febb4be35642fa 100644 --- a/src/java.desktop/share/classes/javax/swing/JList.java +++ b/src/java.desktop/share/classes/javax/swing/JList.java @@ -445,7 +445,7 @@ public class JList extends JComponent implements Scrollable, Accessible * allowing for tooltips to be provided by the cell renderers. * * @param dataModel the model for the list - * @exception IllegalArgumentException if the model is {@code null} + * @throws IllegalArgumentException if the model is {@code null} */ public JList(ListModel dataModel) { @@ -1202,7 +1202,7 @@ public class JList extends JComponent implements Scrollable, Accessible * list's {@code TransferHandler}. * * @param b whether or not to enable automatic drag handling - * @exception HeadlessException if + * @throws HeadlessException if * b is true and * GraphicsEnvironment.isHeadless() * returns true @@ -1493,7 +1493,7 @@ public class JList extends JComponent implements Scrollable, Accessible * Position.Bias.Forward or Position.Bias.Backward. * @return the index of the next list element that * starts with the prefix; otherwise {@code -1} - * @exception IllegalArgumentException if prefix is {@code null} + * @throws IllegalArgumentException if prefix is {@code null} * or startIndex is out of bounds * @since 1.4 */ @@ -1695,7 +1695,7 @@ public class JList extends JComponent implements Scrollable, Accessible * * @param model the ListModel that provides the * list of items for display - * @exception IllegalArgumentException if model is + * @throws IllegalArgumentException if model is * null * @see #getModel * @see #clearSelection @@ -1910,7 +1910,7 @@ public class JList extends JComponent implements Scrollable, Accessible * * @param selectionModel the ListSelectionModel that * implements the selections - * @exception IllegalArgumentException if selectionModel + * @throws IllegalArgumentException if selectionModel * is null * @see #getSelectionModel */ diff --git a/src/java.desktop/share/classes/javax/swing/JMenu.java b/src/java.desktop/share/classes/javax/swing/JMenu.java index dbac4812ca821e3470adee0ae7b829e45f69fe72..1565440969aa89cf9c1be9aa97453d9a21987f79 100644 --- a/src/java.desktop/share/classes/javax/swing/JMenu.java +++ b/src/java.desktop/share/classes/javax/swing/JMenu.java @@ -508,7 +508,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * to manage the idiosyncrasies of the various UI implementations. * * @param d the number of milliseconds to delay - * @exception IllegalArgumentException if d + * @throws IllegalArgumentException if d * is less than 0 */ @BeanProperty(bound = false, expert = true, description @@ -674,7 +674,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * @param s the text for the menu item to add * @param pos an integer specifying the position at which to add the * new menu item - * @exception IllegalArgumentException when the value of + * @throws IllegalArgumentException when the value of * pos < 0 */ public void insert(String s, int pos) { @@ -693,7 +693,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * @param pos an integer specifying the position at which to add the * new JMenuitem * @return the new menu item - * @exception IllegalArgumentException if the value of + * @throws IllegalArgumentException if the value of * pos < 0 */ public JMenuItem insert(JMenuItem mi, int pos) { @@ -713,7 +713,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * @param pos an integer specifying the position at which to add the * new menu item * @return the new menu item - * @exception IllegalArgumentException if the value of + * @throws IllegalArgumentException if the value of * pos < 0 */ public JMenuItem insert(Action a, int pos) { @@ -734,7 +734,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * * @param index an integer specifying the position at which to * insert the menu separator - * @exception IllegalArgumentException if the value of + * @throws IllegalArgumentException if the value of * index < 0 */ public void insertSeparator(int index) { @@ -755,7 +755,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * @param pos an integer specifying the position * @return the menu item at the specified position; or null * if the item as the specified position is not a menu item - * @exception IllegalArgumentException if the value of + * @throws IllegalArgumentException if the value of * {@code pos} < 0 */ public JMenuItem getItem(int pos) { @@ -790,7 +790,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * yet implemented. * * @return true if the menu can be torn off, else false - * @exception Error if invoked -- this method is not yet implemented + * @throws Error if invoked -- this method is not yet implemented */ @BeanProperty(bound = false) public boolean isTearOff() { @@ -812,7 +812,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * Removes the menu item at the specified index from this menu. * * @param pos the position of the item to be removed - * @exception IllegalArgumentException if the value of + * @throws IllegalArgumentException if the value of * pos < 0, or if pos * is greater than the number of menu items */ @@ -1024,7 +1024,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * notification on this event type. The event instance * is created lazily. * - * @exception Error if there is a null listener + * @throws Error if there is a null listener * @see EventListenerList */ protected void fireMenuSelected() { @@ -1054,7 +1054,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * notification on this event type. The event instance * is created lazily. * - * @exception Error if there is a null listener + * @throws Error if there is a null listener * @see EventListenerList */ protected void fireMenuDeselected() { @@ -1084,7 +1084,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * notification on this event type. The event instance * is created lazily. * - * @exception Error if there is a null listener + * @throws Error if there is a null listener * @see EventListenerList */ protected void fireMenuCanceled() { @@ -1238,7 +1238,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * * @param o the new component orientation of this menu and * the components contained within it. - * @exception NullPointerException if orientation is null. + * @throws NullPointerException if orientation is null. * @see java.awt.Component#setComponentOrientation * @see java.awt.Component#getComponentOrientation * @since 1.4 @@ -1275,7 +1275,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * @param keyStroke the keystroke combination which will invoke * the JMenuItem's actionlisteners * without navigating the menu hierarchy - * @exception Error if invoked -- this method is not defined for JMenu. + * @throws Error if invoked -- this method is not defined for JMenu. * Use setMnemonic instead */ public void setAccelerator(KeyStroke keyStroke) { diff --git a/src/java.desktop/share/classes/javax/swing/JOptionPane.java b/src/java.desktop/share/classes/javax/swing/JOptionPane.java index 99eee90347ba2e2b8ad21258e1e2dfb5bc3d13bd..28a547dc2cb9d2abaa39bcc13f3afb2488be65b7 100644 --- a/src/java.desktop/share/classes/javax/swing/JOptionPane.java +++ b/src/java.desktop/share/classes/javax/swing/JOptionPane.java @@ -435,7 +435,7 @@ public class JOptionPane extends JComponent implements Accessible * the screen. * * @param message the Object to display - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @return user's input @@ -471,7 +471,7 @@ public class JOptionPane extends JComponent implements Accessible * @param parentComponent the parent Component for the * dialog * @param message the Object to display - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @return user's input @@ -523,7 +523,7 @@ public class JOptionPane extends JComponent implements Accessible * QUESTION_MESSAGE, * or PLAIN_MESSAGE * @return user's input - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -566,7 +566,7 @@ public class JOptionPane extends JComponent implements Accessible * field * @return user's input, or null meaning the user * canceled the input - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -609,7 +609,7 @@ public class JOptionPane extends JComponent implements Accessible * or if the parentComponent has no * Frame, a default Frame is used * @param message the Object to display - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -637,7 +637,7 @@ public class JOptionPane extends JComponent implements Accessible * WARNING_MESSAGE, * QUESTION_MESSAGE, * or PLAIN_MESSAGE - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -666,7 +666,7 @@ public class JOptionPane extends JComponent implements Accessible * or PLAIN_MESSAGE * @param icon an icon to display in the dialog that helps the user * identify the kind of message that is being displayed - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -690,7 +690,7 @@ public class JOptionPane extends JComponent implements Accessible * default Frame is used * @param message the Object to display * @return an integer indicating the option selected by the user - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -718,7 +718,7 @@ public class JOptionPane extends JComponent implements Accessible * YES_NO_CANCEL_OPTION, * or OK_CANCEL_OPTION * @return an int indicating the option selected by the user - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -757,7 +757,7 @@ public class JOptionPane extends JComponent implements Accessible * QUESTION_MESSAGE, * or PLAIN_MESSAGE * @return an integer indicating the option selected by the user - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -795,7 +795,7 @@ public class JOptionPane extends JComponent implements Accessible * or PLAIN_MESSAGE * @param icon the icon to display in the dialog * @return an int indicating the option selected by the user - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -856,7 +856,7 @@ public class JOptionPane extends JComponent implements Accessible * @return an integer indicating the option chosen by the user, * or CLOSED_OPTION if the user closed * the dialog - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -919,7 +919,7 @@ public class JOptionPane extends JComponent implements Accessible * no Frame, a default Frame is used * @param title the title string for the dialog * @return a new JDialog containing this instance - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -946,7 +946,7 @@ public class JOptionPane extends JComponent implements Accessible * * @param title the title string for the dialog * @return a new JDialog containing this instance - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -1508,7 +1508,7 @@ public class JOptionPane extends JComponent implements Accessible * frame's title bar * @return a JInternalFrame containing a * JOptionPane - * @exception RuntimeException if parentComponent does + * @throws RuntimeException if parentComponent does * not have a valid parent */ public JInternalFrame createInternalFrame(Component parentComponent, @@ -1600,7 +1600,7 @@ public class JOptionPane extends JComponent implements Accessible * or getRootFrame * if the component is null, * or does not have a valid Frame parent - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see #getRootFrame @@ -1626,7 +1626,7 @@ public class JOptionPane extends JComponent implements Accessible * frame if the component is null, * or does not have a valid * Frame or Dialog parent - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless @@ -1683,7 +1683,7 @@ public class JOptionPane extends JComponent implements Accessible * which a frame is not provided. * * @return the default Frame to use - * @exception HeadlessException if + * @throws HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see #setRootFrame @@ -2050,7 +2050,7 @@ public class JOptionPane extends JComponent implements Accessible * ERROR_MESSAGE, INFORMATION_MESSAGE, * WARNING_MESSAGE, * QUESTION_MESSAGE, or PLAIN_MESSAGE - * @exception RuntimeException if newType is not one of the + * @throws RuntimeException if newType is not one of the * legal values listed above * @see #getMessageType @@ -2096,7 +2096,7 @@ public class JOptionPane extends JComponent implements Accessible * YES_NO_OPTION, * YES_NO_CANCEL_OPTION, * or OK_CANCEL_OPTION - * @exception RuntimeException if newType is not one of + * @throws RuntimeException if newType is not one of * the legal values listed above * * @see #getOptionType diff --git a/src/java.desktop/share/classes/javax/swing/JPasswordField.java b/src/java.desktop/share/classes/javax/swing/JPasswordField.java index 577998cb3367c9abf49eeb9938a77bd0cb435e20..c6450d0605afc08edbd0c942c2f22a0199a00cec 100644 --- a/src/java.desktop/share/classes/javax/swing/JPasswordField.java +++ b/src/java.desktop/share/classes/javax/swing/JPasswordField.java @@ -288,7 +288,7 @@ public class JPasswordField extends JTextField { * @param offs the offset >= 0 * @param len the length >= 0 * @return the text - * @exception BadLocationException if the offset or length are invalid + * @throws BadLocationException if the offset or length are invalid */ @Deprecated public String getText(int offs, int len) throws BadLocationException { diff --git a/src/java.desktop/share/classes/javax/swing/JPopupMenu.java b/src/java.desktop/share/classes/javax/swing/JPopupMenu.java index ef9ad42ef81d1f1978b1b6c7dbf49fd430009e07..a6811fad5eb7a23b46c5b58da726a56b1a96f016 100644 --- a/src/java.desktop/share/classes/javax/swing/JPopupMenu.java +++ b/src/java.desktop/share/classes/javax/swing/JPopupMenu.java @@ -475,7 +475,7 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement { * Removes the component at the specified index from this popup menu. * * @param pos the position of the item to be removed - * @exception IllegalArgumentException if the value of + * @throws IllegalArgumentException if the value of * pos < 0, or if the value of * pos is greater than the * number of items @@ -573,7 +573,7 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement { * @param a the Action object to insert * @param index specifies the position at which to insert the * Action, where 0 is the first - * @exception IllegalArgumentException if index < 0 + * @throws IllegalArgumentException if index < 0 * @see Action */ public void insert(Action a, int index) { @@ -589,7 +589,7 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement { * @param component the Component to insert * @param index specifies the position at which * to insert the component, where 0 is the first - * @exception IllegalArgumentException if index < 0 + * @throws IllegalArgumentException if index < 0 */ public void insert(Component component, int index) { if (index < 0) { diff --git a/src/java.desktop/share/classes/javax/swing/JProgressBar.java b/src/java.desktop/share/classes/javax/swing/JProgressBar.java index 90945bb67e3add75f083db2f727cf939589fd695..edba6e4a5da2ae84725a527865f28a3c073e7e24 100644 --- a/src/java.desktop/share/classes/javax/swing/JProgressBar.java +++ b/src/java.desktop/share/classes/javax/swing/JProgressBar.java @@ -394,7 +394,7 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib * is {@code SwingConstants.HORIZONTAL}. * * @param newOrientation HORIZONTAL or VERTICAL - * @exception IllegalArgumentException if newOrientation + * @throws IllegalArgumentException if newOrientation * is an illegal value * @see #getOrientation */ diff --git a/src/java.desktop/share/classes/javax/swing/JRootPane.java b/src/java.desktop/share/classes/javax/swing/JRootPane.java index dcc6d6bb4efae6915c99cebb001881617a3fb9f8..48e06a917fc59ce01b710f1f182c9c4aef7b3a00 100644 --- a/src/java.desktop/share/classes/javax/swing/JRootPane.java +++ b/src/java.desktop/share/classes/javax/swing/JRootPane.java @@ -578,7 +578,7 @@ public class JRootPane extends JComponent implements Accessible { * replace it with an opaque JComponent. * * @param content the Container to use for component-contents - * @exception java.awt.IllegalComponentStateException (a runtime + * @throws java.awt.IllegalComponentStateException (a runtime * exception) if the content pane parameter is null */ public void setContentPane(Container content) { @@ -605,7 +605,7 @@ public class JRootPane extends JComponent implements Accessible { * typically holds a content pane and an optional JMenuBar. * * @param layered the JLayeredPane to use - * @exception java.awt.IllegalComponentStateException (a runtime + * @throws java.awt.IllegalComponentStateException (a runtime * exception) if the layered pane parameter is null */ public void setLayeredPane(JLayeredPane layered) { @@ -647,7 +647,7 @@ public class JRootPane extends JComponent implements Accessible { * * @param glass the Component to use as the glass pane * for this JRootPane - * @exception NullPointerException if the glass parameter is + * @throws NullPointerException if the glass parameter is * null */ public void setGlassPane(Component glass) { diff --git a/src/java.desktop/share/classes/javax/swing/JScrollBar.java b/src/java.desktop/share/classes/javax/swing/JScrollBar.java index 6bb997a6150321932bd17b41c9a2e6b1f6bcb4ac..ba65f21a95430851e6b7983f8cd87c4495fa4338 100644 --- a/src/java.desktop/share/classes/javax/swing/JScrollBar.java +++ b/src/java.desktop/share/classes/javax/swing/JScrollBar.java @@ -155,7 +155,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible * That way, when the user jumps the knob to an adjacent position, * one or two lines of the original contents remain in view. * - * @exception IllegalArgumentException if orientation is not one of VERTICAL, HORIZONTAL + * @throws IllegalArgumentException if orientation is not one of VERTICAL, HORIZONTAL * * @see #setOrientation * @see #setValue @@ -279,7 +279,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible * HORIZONTAL. * * @param orientation an orientation of the {@code JScrollBar} - * @exception IllegalArgumentException if orientation is not one of VERTICAL, HORIZONTAL + * @throws IllegalArgumentException if orientation is not one of VERTICAL, HORIZONTAL * @see #getOrientation */ @BeanProperty(preferred = true, visualUpdate = true, enumerationValues = { diff --git a/src/java.desktop/share/classes/javax/swing/JScrollPane.java b/src/java.desktop/share/classes/javax/swing/JScrollPane.java index 2c3302178df99dd6d677d949ae8972e6d827839c..3d5385a34d1e411ba3c46ae83dbaffbdf90afd84 100644 --- a/src/java.desktop/share/classes/javax/swing/JScrollPane.java +++ b/src/java.desktop/share/classes/javax/swing/JScrollPane.java @@ -418,7 +418,7 @@ public class JScrollPane extends JComponent implements ScrollPaneConstants, Acce * will invoke syncWithScrollPane on it. * * @param layout the specified layout manager - * @exception ClassCastException if layout is not a + * @throws ClassCastException if layout is not a * ScrollPaneLayout * @see java.awt.Container#getLayout * @see java.awt.Container#setLayout @@ -476,7 +476,7 @@ public class JScrollPane extends JComponent implements ScrollPaneConstants, Acce * * * @param policy one of the three values listed above - * @exception IllegalArgumentException if policy + * @throws IllegalArgumentException if policy * is not one of the legal values shown above * @see #getVerticalScrollBarPolicy */ @@ -521,7 +521,7 @@ public class JScrollPane extends JComponent implements ScrollPaneConstants, Acce * * * @param policy one of the three values listed above - * @exception IllegalArgumentException if policy + * @throws IllegalArgumentException if policy * is not one of the legal values shown above * @see #getHorizontalScrollBarPolicy */ @@ -1195,7 +1195,7 @@ public class JScrollPane extends JComponent implements ScrollPaneConstants, Acce *
  • upperLeft *
  • upperRight * - * @exception IllegalArgumentException if corner key is invalid + * @throws IllegalArgumentException if corner key is invalid */ public void setCorner(String key, Component corner) { diff --git a/src/java.desktop/share/classes/javax/swing/JSeparator.java b/src/java.desktop/share/classes/javax/swing/JSeparator.java index 69d17382acd7b0bf490b0637608cc44292a79793..10a724a7e2ec430dd8ca6cd17f9636a6e7314b40 100644 --- a/src/java.desktop/share/classes/javax/swing/JSeparator.java +++ b/src/java.desktop/share/classes/javax/swing/JSeparator.java @@ -97,7 +97,7 @@ public class JSeparator extends JComponent implements SwingConstants, Accessible * @param orientation an integer specifying * SwingConstants.HORIZONTAL or * SwingConstants.VERTICAL - * @exception IllegalArgumentException if orientation + * @throws IllegalArgumentException if orientation * is neither SwingConstants.HORIZONTAL nor * SwingConstants.VERTICAL */ @@ -190,7 +190,7 @@ public class JSeparator extends JComponent implements SwingConstants, Accessible * The default value of this property is HORIZONTAL. * @param orientation either SwingConstants.HORIZONTAL * or SwingConstants.VERTICAL - * @exception IllegalArgumentException if orientation + * @throws IllegalArgumentException if orientation * is neither SwingConstants.HORIZONTAL * nor SwingConstants.VERTICAL * diff --git a/src/java.desktop/share/classes/javax/swing/JSlider.java b/src/java.desktop/share/classes/javax/swing/JSlider.java index 0d826fe7e49e1f910d4a6c1a623a62c06b1df8c9..4682acb8a54dfd4b7e2a63ea81219c0aafa8eec8 100644 --- a/src/java.desktop/share/classes/javax/swing/JSlider.java +++ b/src/java.desktop/share/classes/javax/swing/JSlider.java @@ -920,7 +920,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible { * @return a new {@code Hashtable} of labels * @see #setLabelTable * @see #setPaintLabels - * @exception IllegalArgumentException if {@code start} is + * @throws IllegalArgumentException if {@code start} is * out of range, or if {@code increment} is less than or equal * to zero */ diff --git a/src/java.desktop/share/classes/javax/swing/JSpinner.java b/src/java.desktop/share/classes/javax/swing/JSpinner.java index a371c557439019959b7a5113bd7755619d0a0049..245212131f2ec2ee960fa0ca3b607400f0b7815a 100644 --- a/src/java.desktop/share/classes/javax/swing/JSpinner.java +++ b/src/java.desktop/share/classes/javax/swing/JSpinner.java @@ -1015,7 +1015,7 @@ public class JSpinner extends JComponent implements Accessible * on the new JFormattedTextField. * * @param spinner the spinner whose model this editor will monitor - * @exception IllegalArgumentException if the spinners model is not + * @throws IllegalArgumentException if the spinners model is not * an instance of SpinnerDateModel * * @see #getModel @@ -1039,7 +1039,7 @@ public class JSpinner extends JComponent implements Accessible * @param dateFormatPattern the initial pattern for the * SimpleDateFormat object that's used to display * and parse the value of the text field. - * @exception IllegalArgumentException if the spinners model is not + * @throws IllegalArgumentException if the spinners model is not * an instance of SpinnerDateModel * * @see #getModel @@ -1064,7 +1064,7 @@ public class JSpinner extends JComponent implements Accessible * will monitor * @param format DateFormat object that's used to display * and parse the value of the text field. - * @exception IllegalArgumentException if the spinners model is not + * @throws IllegalArgumentException if the spinners model is not * an instance of SpinnerDateModel * * @see #getModel @@ -1202,7 +1202,7 @@ public class JSpinner extends JComponent implements Accessible * on the new JFormattedTextField. * * @param spinner the spinner whose model this editor will monitor - * @exception IllegalArgumentException if the spinners model is not + * @throws IllegalArgumentException if the spinners model is not * an instance of SpinnerNumberModel * * @see #getModel @@ -1225,7 +1225,7 @@ public class JSpinner extends JComponent implements Accessible * @param decimalFormatPattern the initial pattern for the * DecimalFormat object that's used to display * and parse the value of the text field. - * @exception IllegalArgumentException if the spinners model is not + * @throws IllegalArgumentException if the spinners model is not * an instance of SpinnerNumberModel or if * decimalFormatPattern is not a legal * argument to DecimalFormat @@ -1251,7 +1251,7 @@ public class JSpinner extends JComponent implements Accessible * @param format the initial pattern for the * DecimalFormat object that's used to display * and parse the value of the text field. - * @exception IllegalArgumentException if the spinners model is not + * @throws IllegalArgumentException if the spinners model is not * an instance of SpinnerNumberModel * * @see #getTextField @@ -1346,7 +1346,7 @@ public class JSpinner extends JComponent implements Accessible * on the new JFormattedTextField. * * @param spinner the spinner whose model this editor will monitor - * @exception IllegalArgumentException if the spinners model is not + * @throws IllegalArgumentException if the spinners model is not * an instance of SpinnerListModel * * @see #getModel diff --git a/src/java.desktop/share/classes/javax/swing/JSplitPane.java b/src/java.desktop/share/classes/javax/swing/JSplitPane.java index bd5e85ed4a6436d87c7e6c3fbd5df641746c4118..5a3cfef943e9ecd8908bbf86abe60a0c8ae1309a 100644 --- a/src/java.desktop/share/classes/javax/swing/JSplitPane.java +++ b/src/java.desktop/share/classes/javax/swing/JSplitPane.java @@ -262,7 +262,7 @@ public class JSplitPane extends JComponent implements Accessible * * @param newOrientation JSplitPane.HORIZONTAL_SPLIT or * JSplitPane.VERTICAL_SPLIT - * @exception IllegalArgumentException if orientation + * @throws IllegalArgumentException if orientation * is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT. */ @ConstructorProperties({"orientation"}) @@ -281,7 +281,7 @@ public class JSplitPane extends JComponent implements Accessible * @param newContinuousLayout a boolean, true for the components to * redraw continuously as the divider changes position, false * to wait until the divider position stops changing to redraw - * @exception IllegalArgumentException if orientation + * @throws IllegalArgumentException if orientation * is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT */ public JSplitPane(int newOrientation, @@ -304,7 +304,7 @@ public class JSplitPane extends JComponent implements Accessible * appear on the right * of a horizontally-split pane, or at the bottom of a * vertically-split pane - * @exception IllegalArgumentException if orientation + * @throws IllegalArgumentException if orientation * is not one of: HORIZONTAL_SPLIT or VERTICAL_SPLIT */ public JSplitPane(int newOrientation, @@ -334,7 +334,7 @@ public class JSplitPane extends JComponent implements Accessible * appear on the right * of a horizontally-split pane, or at the bottom of a * vertically-split pane - * @exception IllegalArgumentException if orientation + * @throws IllegalArgumentException if orientation * is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT */ public JSplitPane(int newOrientation, @@ -622,7 +622,7 @@ public class JSplitPane extends JComponent implements Accessible * * * @param orientation an integer specifying the orientation - * @exception IllegalArgumentException if orientation is not one of: + * @throws IllegalArgumentException if orientation is not one of: * HORIZONTAL_SPLIT or VERTICAL_SPLIT. */ @BeanProperty(enumerationValues = { @@ -701,7 +701,7 @@ public class JSplitPane extends JComponent implements Accessible * extra space. * * @param value as described above - * @exception IllegalArgumentException if value is < 0 or > 1 + * @throws IllegalArgumentException if value is < 0 or > 1 * @since 1.3 */ @BeanProperty(description @@ -754,7 +754,7 @@ public class JSplitPane extends JComponent implements Accessible * @param proportionalLocation a double-precision floating point value * that specifies a percentage, from zero (top/left) to 1.0 * (bottom/right) - * @exception IllegalArgumentException if the specified location is < 0 + * @throws IllegalArgumentException if the specified location is < 0 * or > 1.0 */ @BeanProperty(description @@ -964,7 +964,7 @@ public class JSplitPane extends JComponent implements Accessible * (position) for this component * @param index an integer specifying the index in the container's * list. - * @exception IllegalArgumentException if the constraints + * @throws IllegalArgumentException if the constraints * object does not match an existing component * @see java.awt.Container#addImpl(Component, Object, int) */ diff --git a/src/java.desktop/share/classes/javax/swing/JTabbedPane.java b/src/java.desktop/share/classes/javax/swing/JTabbedPane.java index 4acf4f8a930d4d8e4615a2d3bc88a663ecd9b1fa..2bdd93a7e8db08dc51082f939a85a56b7df23fde 100644 --- a/src/java.desktop/share/classes/javax/swing/JTabbedPane.java +++ b/src/java.desktop/share/classes/javax/swing/JTabbedPane.java @@ -215,7 +215,7 @@ public class JTabbedPane extends JComponent * * @param tabPlacement the placement for the tabs relative to the content * @param tabLayoutPolicy the policy for laying out tabs when all tabs will not fit on one run - * @exception IllegalArgumentException if tab placement or tab layout policy are not + * @throws IllegalArgumentException if tab placement or tab layout policy are not * one of the above supported values * @see #addTab * @since 1.4 @@ -505,7 +505,7 @@ public class JTabbedPane extends JComponent * The default value, if not set, is SwingConstants.TOP. * * @param tabPlacement the placement for the tabs relative to the content - * @exception IllegalArgumentException if tab placement value isn't one + * @throws IllegalArgumentException if tab placement value isn't one * of the above valid values */ @BeanProperty(preferred = true, visualUpdate = true, enumerationValues = { @@ -561,7 +561,7 @@ public class JTabbedPane extends JComponent * ignored. * * @param tabLayoutPolicy the policy used to layout the tabs - * @exception IllegalArgumentException if layoutPolicy value isn't one + * @throws IllegalArgumentException if layoutPolicy value isn't one * of the above valid values * @see #getTabLayoutPolicy * @since 1.4 @@ -609,7 +609,7 @@ public class JTabbedPane extends JComponent * the results will be implementation defined. * * @param index the index to be selected - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < -1 || index >= tab count)} * * @see #getSelectedIndex @@ -696,7 +696,7 @@ public class JTabbedPane extends JComponent * corresponding to the specified component. * * @param c the selected {@code Component} for this {@code TabbedPane} - * @exception IllegalArgumentException if component not found in tabbed + * @throws IllegalArgumentException if component not found in tabbed * pane * @see #getSelectedComponent */ @@ -963,7 +963,7 @@ public class JTabbedPane extends JComponent * its visibility is reset to true to ensure it will be visible * if added to other containers. * @param index the index of the tab to be removed - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #addTab @@ -1084,7 +1084,7 @@ public class JTabbedPane extends JComponent * * @param index the index of the component to remove from the * tabbedpane - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * @see #addTab * @see #removeTabAt @@ -1148,7 +1148,7 @@ public class JTabbedPane extends JComponent * * @param index the index of the item being queried * @return the title at index - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * @see #setTitleAt */ @@ -1161,7 +1161,7 @@ public class JTabbedPane extends JComponent * * @param index the index of the item being queried * @return the icon at index - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #setIconAt @@ -1180,7 +1180,7 @@ public class JTabbedPane extends JComponent * * @param index the index of the item being queried * @return the icon at index - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #setDisabledIconAt @@ -1198,7 +1198,7 @@ public class JTabbedPane extends JComponent * * @param index the index of the item being queried * @return a string containing the tool tip text at index - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #setToolTipTextAt @@ -1214,7 +1214,7 @@ public class JTabbedPane extends JComponent * @param index the index of the item being queried * @return the Color of the tab background at * index - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #setBackgroundAt @@ -1229,7 +1229,7 @@ public class JTabbedPane extends JComponent * @param index the index of the item being queried * @return the Color of the tab foreground at * index - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #setForegroundAt @@ -1245,7 +1245,7 @@ public class JTabbedPane extends JComponent * @param index the index of the item being queried * @return true if the tab at index is enabled; * false otherwise - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #setEnabledAt @@ -1259,7 +1259,7 @@ public class JTabbedPane extends JComponent * * @param index the index of the item being queried * @return the Component at index - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #setComponentAt @@ -1278,7 +1278,7 @@ public class JTabbedPane extends JComponent * @param tabIndex the index of the tab that the mnemonic refers to * @return the key code which represents the mnemonic; * -1 if a mnemonic is not specified for the tab - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * (tabIndex < 0 || * tabIndex >= tab count) * @see #setDisplayedMnemonicIndexAt(int,int) @@ -1299,7 +1299,7 @@ public class JTabbedPane extends JComponent * @param tabIndex the index of the tab that the mnemonic refers to * @return index representing mnemonic character if one exists; * otherwise returns -1 - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * (tabIndex < 0 || * tabIndex >= tab count) * @see #setDisplayedMnemonicIndexAt(int,int) @@ -1324,7 +1324,7 @@ public class JTabbedPane extends JComponent * index, or null if tab at * index is not currently visible in the UI, * or if there is no UI set on this tabbedpane - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} */ public Rectangle getBoundsAt(int index) { @@ -1346,7 +1346,7 @@ public class JTabbedPane extends JComponent * * @param index the tab index where the title should be set * @param title the title to be displayed in the tab - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #getTitleAt @@ -1386,7 +1386,7 @@ public class JTabbedPane extends JComponent * * @param index the tab index where the icon should be set * @param icon the icon to be displayed in the tab - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #setDisabledIconAt @@ -1428,7 +1428,7 @@ public class JTabbedPane extends JComponent * * @param index the tab index where the disabled icon should be set * @param disabledIcon the icon to be displayed in the tab when disabled - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #getDisabledIconAt @@ -1451,7 +1451,7 @@ public class JTabbedPane extends JComponent * * @param index the tab index where the tooltip text should be set * @param toolTipText the tooltip text to be displayed for the tab - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #getToolTipTextAt @@ -1486,7 +1486,7 @@ public class JTabbedPane extends JComponent * * @param index the tab index where the background should be set * @param background the color to be displayed in the tab's background - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #getBackgroundAt @@ -1517,7 +1517,7 @@ public class JTabbedPane extends JComponent * * @param index the tab index where the foreground should be set * @param foreground the color to be displayed as the tab's foreground - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #getForegroundAt @@ -1542,7 +1542,7 @@ public class JTabbedPane extends JComponent * * @param index the tab index which should be enabled/disabled * @param enabled whether or not the tab should be enabled - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #isEnabledAt @@ -1562,7 +1562,7 @@ public class JTabbedPane extends JComponent * * @param index the tab index where this component is being placed * @param component the component for the tab - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #getComponentAt @@ -1638,10 +1638,10 @@ public class JTabbedPane extends JComponent * @since 1.4 * @param tabIndex the index of the tab that the mnemonic refers to * @param mnemonicIndex index into the String to underline - * @exception IndexOutOfBoundsException if tabIndex is + * @throws IndexOutOfBoundsException if tabIndex is * out of range ({@code tabIndex < 0 || tabIndex >= tab * count}) - * @exception IllegalArgumentException will be thrown if + * @throws IllegalArgumentException will be thrown if * mnemonicIndex is >= length of the tab * title , or < -1 * @see #setMnemonicAt(int,int) @@ -1678,7 +1678,7 @@ public class JTabbedPane extends JComponent * @since 1.4 * @param tabIndex the index of the tab that the mnemonic refers to * @param mnemonic the key code which represents the mnemonic - * @exception IndexOutOfBoundsException if tabIndex is out + * @throws IndexOutOfBoundsException if tabIndex is out * of range ({@code tabIndex < 0 || tabIndex >= tab count}) * @see #getMnemonicAt(int) * @see #setDisplayedMnemonicIndexAt(int,int) @@ -2001,7 +2001,7 @@ public class JTabbedPane extends JComponent * * @param i zero-based index of child * @return the Accessible child of the object - * @exception IllegalArgumentException if index is out of bounds + * @throws IllegalArgumentException if index is out of bounds */ public Accessible getAccessibleChild(int i) { if (i < 0 || i >= getTabCount()) { @@ -2426,9 +2426,9 @@ public class JTabbedPane extends JComponent * @param index the tab index where the component should be set * @param component the component to render the title for the * specified tab - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} - * @exception IllegalArgumentException if component has already been + * @throws IllegalArgumentException if component has already been * added to this JTabbedPane * * @see #getTabComponentAt @@ -2456,7 +2456,7 @@ public class JTabbedPane extends JComponent * * @param index the index of the item being queried * @return the tab component at index - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * {@code (index < 0 || index >= tab count)} * * @see #setTabComponentAt diff --git a/src/java.desktop/share/classes/javax/swing/JTable.java b/src/java.desktop/share/classes/javax/swing/JTable.java index c70ec2f935e49ac93c4e23980b4dfb03fe4da7c7..5d27be294541dcf88d0cf3176c229678956062a6 100644 --- a/src/java.desktop/share/classes/javax/swing/JTable.java +++ b/src/java.desktop/share/classes/javax/swing/JTable.java @@ -991,7 +991,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * the row margin. * * @param rowHeight new row height - * @exception IllegalArgumentException if rowHeight is + * @throws IllegalArgumentException if rowHeight is * less than 1 * @see #getRowHeight */ @@ -1037,7 +1037,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * @param row the row whose height is being changed * @param rowHeight new row height, in pixels - * @exception IllegalArgumentException if rowHeight is + * @throws IllegalArgumentException if rowHeight is * less than 1 * @since 1.3 */ @@ -1126,7 +1126,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * The default color is look and feel dependent. * * @param gridColor the new color of the grid lines - * @exception IllegalArgumentException if gridColor is null + * @throws IllegalArgumentException if gridColor is null * @see #getGridColor */ @BeanProperty(description @@ -1485,7 +1485,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * table's {@code TransferHandler}. * * @param b whether or not to enable automatic drag handling - * @exception HeadlessException if + * @throws HeadlessException if * b is true and * GraphicsEnvironment.isHeadless() * returns true @@ -2220,7 +2220,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * Selects the rows from index0 to index1, * inclusive. * - * @exception IllegalArgumentException if index0 or + * @throws IllegalArgumentException if index0 or * index1 lie outside * [0, getRowCount()-1] * @param index0 one end of the interval @@ -2234,7 +2234,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * Selects the columns from index0 to index1, * inclusive. * - * @exception IllegalArgumentException if index0 or + * @throws IllegalArgumentException if index0 or * index1 lie outside * [0, getColumnCount()-1] * @param index0 one end of the interval @@ -2248,7 +2248,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * Adds the rows from index0 to index1, inclusive, to * the current selection. * - * @exception IllegalArgumentException if index0 or index1 + * @throws IllegalArgumentException if index0 or index1 * lie outside [0, getRowCount()-1] * @param index0 one end of the interval * @param index1 the other end of the interval @@ -2261,7 +2261,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * Adds the columns from index0 to index1, * inclusive, to the current selection. * - * @exception IllegalArgumentException if index0 or + * @throws IllegalArgumentException if index0 or * index1 lie outside * [0, getColumnCount()-1] * @param index0 one end of the interval @@ -2274,7 +2274,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable /** * Deselects the rows from index0 to index1, inclusive. * - * @exception IllegalArgumentException if index0 or + * @throws IllegalArgumentException if index0 or * index1 lie outside * [0, getRowCount()-1] * @param index0 one end of the interval @@ -2287,7 +2287,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable /** * Deselects the columns from index0 to index1, inclusive. * - * @exception IllegalArgumentException if index0 or + * @throws IllegalArgumentException if index0 or * index1 lie outside * [0, getColumnCount()-1] * @param index0 one end of the interval @@ -2596,7 +2596,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * equals. * * @return the TableColumn object that matches the identifier - * @exception IllegalArgumentException if identifier is null or no TableColumn has this identifier + * @throws IllegalArgumentException if identifier is null or no TableColumn has this identifier * * @param identifier the identifier object */ @@ -8355,7 +8355,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * * @return this component's locale; if this component does * not have a locale, the locale of its parent is returned - * @exception IllegalComponentStateException if the + * @throws IllegalComponentStateException if the * Component does not have its own locale * and has not yet been added to a containment hierarchy * such that the locale can be determined from the @@ -9161,7 +9161,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * * @return this component's locale; if this component does * not have a locale, the locale of its parent is returned - * @exception IllegalComponentStateException if the + * @throws IllegalComponentStateException if the * Component does not have its own locale * and has not yet been added to a containment hierarchy * such that the locale can be determined from the diff --git a/src/java.desktop/share/classes/javax/swing/JTextArea.java b/src/java.desktop/share/classes/javax/swing/JTextArea.java index ecc9342f05a0dd4c9bca710f4a09449312cb18c2..03b3bc7e9bd20979b5e8dffd1379718f2a1fb21b 100644 --- a/src/java.desktop/share/classes/javax/swing/JTextArea.java +++ b/src/java.desktop/share/classes/javax/swing/JTextArea.java @@ -166,7 +166,7 @@ public class JTextArea extends JTextComponent { * * @param rows the number of rows >= 0 * @param columns the number of columns >= 0 - * @exception IllegalArgumentException if the rows or columns + * @throws IllegalArgumentException if the rows or columns * arguments are negative. */ public JTextArea(int rows, int columns) { @@ -180,7 +180,7 @@ public class JTextArea extends JTextComponent { * @param text the text to be displayed, or null * @param rows the number of rows >= 0 * @param columns the number of columns >= 0 - * @exception IllegalArgumentException if the rows or columns + * @throws IllegalArgumentException if the rows or columns * arguments are negative. */ public JTextArea(String text, int rows, int columns) { @@ -206,7 +206,7 @@ public class JTextArea extends JTextComponent { * @param text the text to be displayed, null if none * @param rows the number of rows >= 0 * @param columns the number of columns >= 0 - * @exception IllegalArgumentException if the rows or columns + * @throws IllegalArgumentException if the rows or columns * arguments are negative. */ public JTextArea(Document doc, String text, int rows, int columns) { @@ -370,7 +370,7 @@ public class JTextArea extends JTextComponent { * * @param offset the offset >= 0 * @return the line number >= 0 - * @exception BadLocationException thrown if the offset is + * @throws BadLocationException thrown if the offset is * less than zero or greater than the document length. */ public int getLineOfOffset(int offset) throws BadLocationException { @@ -401,7 +401,7 @@ public class JTextArea extends JTextComponent { * * @param line the line number to translate >= 0 * @return the offset >= 0 - * @exception BadLocationException thrown if the line is + * @throws BadLocationException thrown if the line is * less than zero or greater or equal to the number of * lines contained in the document (as reported by * getLineCount). @@ -424,7 +424,7 @@ public class JTextArea extends JTextComponent { * * @param line the line >= 0 * @return the offset >= 0 - * @exception BadLocationException Thrown if the line is + * @throws BadLocationException Thrown if the line is * less than zero or greater or equal to the number of * lines contained in the document (as reported by * getLineCount). @@ -452,7 +452,7 @@ public class JTextArea extends JTextComponent { * * @param str the text to insert * @param pos the position at which to insert >= 0 - * @exception IllegalArgumentException if pos is an + * @throws IllegalArgumentException if pos is an * invalid position in the model * @see TextComponent#setText * @see #replaceRange @@ -493,7 +493,7 @@ public class JTextArea extends JTextComponent { * @param str the text to use as the replacement * @param start the start position >= 0 * @param end the end position >= start - * @exception IllegalArgumentException if part of the range is an + * @throws IllegalArgumentException if part of the range is an * invalid position in the model * @see #insert */ @@ -532,7 +532,7 @@ public class JTextArea extends JTextComponent { * setting the new value. * * @param rows the number of rows >= 0 - * @exception IllegalArgumentException if rows is less than 0 + * @throws IllegalArgumentException if rows is less than 0 * @see #getRows */ @BeanProperty(bound = false, description @@ -576,7 +576,7 @@ public class JTextArea extends JTextComponent { * after setting the new value. * * @param columns the number of columns >= 0 - * @exception IllegalArgumentException if columns is less than 0 + * @throws IllegalArgumentException if columns is less than 0 * @see #getColumns */ @BeanProperty(bound = false, description @@ -726,7 +726,7 @@ public class JTextArea extends JTextComponent { * @param direction Less than zero to scroll up/left, * greater than zero for down/right. * @return The "unit" increment for scrolling in the specified direction - * @exception IllegalArgumentException for an invalid orientation + * @throws IllegalArgumentException for an invalid orientation * @see JScrollBar#setUnitIncrement * @see #getRowHeight * @see #getColumnWidth diff --git a/src/java.desktop/share/classes/javax/swing/JTextField.java b/src/java.desktop/share/classes/javax/swing/JTextField.java index 3abe09d056542f18aebb4b8dc2c5d62779d77721..0d66209d8af5bc075f43b00addc84061378817c3 100644 --- a/src/java.desktop/share/classes/javax/swing/JTextField.java +++ b/src/java.desktop/share/classes/javax/swing/JTextField.java @@ -242,7 +242,7 @@ public class JTextField extends JTextComponent implements SwingConstants { * the preferred width >= 0; if columns * is set to zero, the preferred width will be whatever * naturally results from the component implementation - * @exception IllegalArgumentException if columns < 0 + * @throws IllegalArgumentException if columns < 0 */ public JTextField(Document doc, String text, int columns) { if (columns < 0) { @@ -343,7 +343,7 @@ public class JTextField extends JTextComponent implements SwingConstants { * and a PropertyChange event ("horizontalAlignment") is fired. * * @param alignment the alignment - * @exception IllegalArgumentException if alignment + * @throws IllegalArgumentException if alignment * is not a valid key */ @BeanProperty(preferred = true, enumerationValues = { @@ -393,7 +393,7 @@ public class JTextField extends JTextComponent implements SwingConstants { * and then invalidate the layout. * * @param columns the number of columns >= 0 - * @exception IllegalArgumentException if columns + * @throws IllegalArgumentException if columns * is less than 0 */ @BeanProperty(bound = false, description diff --git a/src/java.desktop/share/classes/javax/swing/JTextPane.java b/src/java.desktop/share/classes/javax/swing/JTextPane.java index 41e16034c23fb0a56b311b6902ddaf96c8abddb9..228181f31f76a5c31c204860d652d92ef2cea19c 100644 --- a/src/java.desktop/share/classes/javax/swing/JTextPane.java +++ b/src/java.desktop/share/classes/javax/swing/JTextPane.java @@ -138,7 +138,7 @@ public class JTextPane extends JEditorPane { * must be a StyledDocument. * * @param doc the document to display/edit - * @exception IllegalArgumentException if doc can't + * @throws IllegalArgumentException if doc can't * be narrowed to a StyledDocument which is the * required type of model for this text component */ @@ -480,7 +480,7 @@ public class JTextPane extends JEditorPane { * establishes the content type of the editor. * * @param kit the desired editor behavior - * @exception IllegalArgumentException if kit is not a + * @throws IllegalArgumentException if kit is not a * StyledEditorKit */ public final void setEditorKit(EditorKit kit) { diff --git a/src/java.desktop/share/classes/javax/swing/JToolBar.java b/src/java.desktop/share/classes/javax/swing/JToolBar.java index 114ef0d169c2a8c0c97c01f858c237f3fbd9a119..4d93a1bceefe453f48a4aa746d74bf65b9725ec2 100644 --- a/src/java.desktop/share/classes/javax/swing/JToolBar.java +++ b/src/java.desktop/share/classes/javax/swing/JToolBar.java @@ -142,7 +142,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible * @param name the name of the tool bar * @param orientation the initial orientation -- it must be * either HORIZONTAL or VERTICAL - * @exception IllegalArgumentException if orientation is neither + * @throws IllegalArgumentException if orientation is neither * HORIZONTAL nor VERTICAL * @since 1.3 */ @@ -406,7 +406,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible * * @param o the new orientation -- either HORIZONTAL or * VERTICAL - * @exception IllegalArgumentException if orientation is neither + * @throws IllegalArgumentException if orientation is neither * HORIZONTAL nor VERTICAL * @see #getOrientation */ diff --git a/src/java.desktop/share/classes/javax/swing/JTree.java b/src/java.desktop/share/classes/javax/swing/JTree.java index ae90ea8be8bec502faf56b15683af34a8d75a161..e6e591bad27ca8843dbf796fb40d7f2dca988068 100644 --- a/src/java.desktop/share/classes/javax/swing/JTree.java +++ b/src/java.desktop/share/classes/javax/swing/JTree.java @@ -1251,7 +1251,7 @@ public class JTree extends JComponent implements Scrollable, Accessible * tree's {@code TransferHandler}. * * @param b whether or not to enable automatic drag handling - * @exception HeadlessException if + * @throws HeadlessException if * b is true and * GraphicsEnvironment.isHeadless() * returns true @@ -3087,7 +3087,7 @@ public class JTree extends JComponent implements Scrollable, Accessible * Position.Bias.Forward or Position.Bias.Backward. * @return the TreePath of the next tree element that * starts with the prefix; otherwise null - * @exception IllegalArgumentException if prefix is null + * @throws IllegalArgumentException if prefix is null * or startingRow is out of bounds * @since 1.4 */ @@ -5053,7 +5053,7 @@ public class JTree extends JComponent implements Scrollable, Accessible * * @return This component's locale. If this component does not have * a locale, the locale of its parent is returned. - * @exception IllegalComponentStateException + * @throws IllegalComponentStateException * If the Component does not have its own locale and has not yet * been added to a containment hierarchy such that the locale can be * determined from the containing parent. diff --git a/src/java.desktop/share/classes/javax/swing/JViewport.java b/src/java.desktop/share/classes/javax/swing/JViewport.java index e3974a84f27761730a95371f7e6968cd1c9c8e31..ff082acc694bdfd768c69ae95842c2182f1f0d75 100644 --- a/src/java.desktop/share/classes/javax/swing/JViewport.java +++ b/src/java.desktop/share/classes/javax/swing/JViewport.java @@ -565,7 +565,7 @@ public class JViewport extends JComponent implements Accessible * a JViewPort. * * @param border the Border to set - * @exception IllegalArgumentException this method is not implemented + * @throws IllegalArgumentException this method is not implemented */ public final void setBorder(Border border) { if (border != null) { diff --git a/src/java.desktop/share/classes/javax/swing/JWindow.java b/src/java.desktop/share/classes/javax/swing/JWindow.java index 69269c9f284ce1354a7fcadc6db024ee7192f483..a306ea6d4ea1b95e2291032005d4583e25a2afbf 100644 --- a/src/java.desktop/share/classes/javax/swing/JWindow.java +++ b/src/java.desktop/share/classes/javax/swing/JWindow.java @@ -387,10 +387,10 @@ public class JWindow extends Window implements Accessible, * @param comp the component to be enhanced * @param constraints the constraints to be respected * @param index the index - * @exception IllegalArgumentException if index is invalid - * @exception IllegalArgumentException if adding the container's parent + * @throws IllegalArgumentException if index is invalid + * @throws IllegalArgumentException if adding the container's parent * to itself - * @exception IllegalArgumentException if adding a window to a container + * @throws IllegalArgumentException if adding a window to a container * * @see #setRootPaneCheckingEnabled * @see javax.swing.RootPaneContainer @@ -504,7 +504,7 @@ public class JWindow extends Window implements Accessible, * * @param contentPane the new contentPane * - * @exception IllegalComponentStateException (a runtime + * @throws IllegalComponentStateException (a runtime * exception) if the content pane parameter is null * @see #getContentPane * @see RootPaneContainer#setContentPane @@ -532,7 +532,7 @@ public class JWindow extends Window implements Accessible, * * @param layeredPane the new layeredPane object * - * @exception IllegalComponentStateException (a runtime + * @throws IllegalComponentStateException (a runtime * exception) if the content pane parameter is null * @see #getLayeredPane * @see RootPaneContainer#setLayeredPane diff --git a/src/java.desktop/share/classes/javax/swing/OverlayLayout.java b/src/java.desktop/share/classes/javax/swing/OverlayLayout.java index 0067f6fd6bd54bab9fe7b8461f4917852bcc1579..71ca34f1aa069ab14f5c2d49310d8e18b45c808c 100644 --- a/src/java.desktop/share/classes/javax/swing/OverlayLayout.java +++ b/src/java.desktop/share/classes/javax/swing/OverlayLayout.java @@ -217,7 +217,7 @@ public class OverlayLayout implements LayoutManager2,Serializable { * * @param target the container to lay out * - * @exception AWTError if the target isn't the container specified to the + * @throws AWTError if the target isn't the container specified to the * constructor */ public void layoutContainer(Container target) { diff --git a/src/java.desktop/share/classes/javax/swing/Popup.java b/src/java.desktop/share/classes/javax/swing/Popup.java index 605ecd6fd78099b72d97f605246788da84c9de0a..15c90ad3be775215efc26bc6b7dd3e44020425f2 100644 --- a/src/java.desktop/share/classes/javax/swing/Popup.java +++ b/src/java.desktop/share/classes/javax/swing/Popup.java @@ -82,7 +82,7 @@ public class Popup { * @param contents Contents of the Popup * @param x Initial x screen coordinate * @param y Initial y screen coordinate - * @exception IllegalArgumentException if contents is null + * @throws IllegalArgumentException if contents is null */ protected Popup(Component owner, Component contents, int x, int y) { this(); diff --git a/src/java.desktop/share/classes/javax/swing/PopupFactory.java b/src/java.desktop/share/classes/javax/swing/PopupFactory.java index 462675fa828587cbe6b08bc2f35151a32b4d9fa4..a30aba6f2fc0a6d359f997c619bdb76567ad0930 100644 --- a/src/java.desktop/share/classes/javax/swing/PopupFactory.java +++ b/src/java.desktop/share/classes/javax/swing/PopupFactory.java @@ -127,7 +127,7 @@ public class PopupFactory { * factory is null. * * @param factory Shared PopupFactory - * @exception IllegalArgumentException if factory is null + * @throws IllegalArgumentException if factory is null * @see #getPopup */ public static void setSharedInstance(PopupFactory factory) { @@ -186,7 +186,7 @@ public class PopupFactory { * @param contents Contents of the Popup * @param x Initial x screen coordinate * @param y Initial y screen coordinate - * @exception IllegalArgumentException if contents is null + * @throws IllegalArgumentException if contents is null * @return Popup containing Contents */ public Popup getPopup(Component owner, Component contents, diff --git a/src/java.desktop/share/classes/javax/swing/ProgressMonitor.java b/src/java.desktop/share/classes/javax/swing/ProgressMonitor.java index 8733d5b3cfef510a19889614ae5ff76e41f43f39..6f2d1eda4b674a4899e0b8d9adb39b440709c343 100644 --- a/src/java.desktop/share/classes/javax/swing/ProgressMonitor.java +++ b/src/java.desktop/share/classes/javax/swing/ProgressMonitor.java @@ -794,7 +794,7 @@ public class ProgressMonitor implements Accessible * @return this component's locale. If this component does not have * a locale, the locale of its parent is returned. * - * @exception IllegalComponentStateException + * @throws IllegalComponentStateException * If the Component does not have its own locale and has not yet been * added to a containment hierarchy such that the locale can be * determined from the containing parent. diff --git a/src/java.desktop/share/classes/javax/swing/RootPaneContainer.java b/src/java.desktop/share/classes/javax/swing/RootPaneContainer.java index 76dc2286f8725085cba8ce80a279f5150033a25d..b05e0c52e554784c2cb6ff6453d687c3b920cf0b 100644 --- a/src/java.desktop/share/classes/javax/swing/RootPaneContainer.java +++ b/src/java.desktop/share/classes/javax/swing/RootPaneContainer.java @@ -103,7 +103,7 @@ public interface RootPaneContainer * Generally implemented with * getRootPane().setContentPane(contentPane); * - * @exception java.awt.IllegalComponentStateException (a runtime + * @throws java.awt.IllegalComponentStateException (a runtime * exception) if the content pane parameter is null * @param contentPane the Container to use for the contents of this * JRootPane @@ -134,7 +134,7 @@ public interface RootPaneContainer * getRootPane().setLayeredPane(layeredPane); * * @param layeredPane the layered pane - * @exception java.awt.IllegalComponentStateException (a runtime + * @throws java.awt.IllegalComponentStateException (a runtime * exception) if the layered pane parameter is null * @see #getLayeredPane * @see JRootPane#getLayeredPane diff --git a/src/java.desktop/share/classes/javax/swing/ScrollPaneLayout.java b/src/java.desktop/share/classes/javax/swing/ScrollPaneLayout.java index 9f9e66606664bbd0cb6cdd55fccefe71b3960a5b..0b8d8576f1469f1f60c25c36875599de1a91d973 100644 --- a/src/java.desktop/share/classes/javax/swing/ScrollPaneLayout.java +++ b/src/java.desktop/share/classes/javax/swing/ScrollPaneLayout.java @@ -230,7 +230,7 @@ public class ScrollPaneLayout * * @param s the component identifier * @param c the component to be added - * @exception IllegalArgumentException if s is an invalid key + * @throws IllegalArgumentException if s is an invalid key */ public void addLayoutComponent(String s, Component c) { @@ -328,7 +328,7 @@ public class ScrollPaneLayout * with the Swing 1.0.2 (and earlier) versions of this class. * * @param x an integer giving the display policy - * @exception IllegalArgumentException if x is an invalid + * @throws IllegalArgumentException if x is an invalid * vertical scroll bar policy, as listed above */ public void setVerticalScrollBarPolicy(int x) { @@ -366,7 +366,7 @@ public class ScrollPaneLayout * with the Swing 1.0.2 (and earlier) versions of this class. * * @param x an int giving the display policy - * @exception IllegalArgumentException if x is not a valid + * @throws IllegalArgumentException if x is not a valid * horizontal scrollbar policy, as listed above */ public void setHorizontalScrollBarPolicy(int x) { diff --git a/src/java.desktop/share/classes/javax/swing/SizeSequence.java b/src/java.desktop/share/classes/javax/swing/SizeSequence.java index 899a64570f3145d3ab0b51315cba10af4ebb6edf..c6877dc8b2b1b15ef75563017ba19fb9c3cd83d6 100644 --- a/src/java.desktop/share/classes/javax/swing/SizeSequence.java +++ b/src/java.desktop/share/classes/javax/swing/SizeSequence.java @@ -142,7 +142,7 @@ public class SizeSequence { * all initialized to have size 0. * * @param numEntries the number of sizes to track - * @exception NegativeArraySizeException if + * @throws NegativeArraySizeException if * numEntries < 0 */ public SizeSequence(int numEntries) { @@ -355,7 +355,7 @@ public class SizeSequence { * in the group * @param length the number of entries in the group * @param value the size to be assigned to each new entry - * @exception ArrayIndexOutOfBoundsException if the parameters + * @throws ArrayIndexOutOfBoundsException if the parameters * are outside of the range: * (0 <= start < (getSizes().length)) AND (length >= 0) */ diff --git a/src/java.desktop/share/classes/javax/swing/SwingUtilities.java b/src/java.desktop/share/classes/javax/swing/SwingUtilities.java index 5e3965e69b8edf7601ec495dd0c1aaefe251352a..1d58541dfee4f2e20a4173b329249b6f2446e01f 100644 --- a/src/java.desktop/share/classes/javax/swing/SwingUtilities.java +++ b/src/java.desktop/share/classes/javax/swing/SwingUtilities.java @@ -1466,10 +1466,10 @@ public class SwingUtilities implements SwingConstants * java.awt.EventQueue.invokeAndWait(). * * @param doRun the instance of {@code Runnable} - * @exception InterruptedException if we're interrupted while waiting for + * @throws InterruptedException if we're interrupted while waiting for * the event dispatching thread to finish executing * doRun.run() - * @exception InvocationTargetException if an exception is thrown + * @throws InvocationTargetException if an exception is thrown * while running doRun * * @see #invokeLater @@ -1984,7 +1984,7 @@ public class SwingUtilities implements SwingConstants * Returns a toolkit-private, shared, invisible Frame * to be the owner for JDialogs and JWindows created with * {@code null} owners. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -2002,7 +2002,7 @@ public class SwingUtilities implements SwingConstants /** * Returns a SharedOwnerFrame's shutdown listener to dispose the SharedOwnerFrame * if it has no more displayable children. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ diff --git a/src/java.desktop/share/classes/javax/swing/Timer.java b/src/java.desktop/share/classes/javax/swing/Timer.java index 6b4f95be108038b04c2989d0cd6d393e97595f53..ced691f4e06d6398cd08dcce339fdcd9496bdcfa 100644 --- a/src/java.desktop/share/classes/javax/swing/Timer.java +++ b/src/java.desktop/share/classes/javax/swing/Timer.java @@ -341,7 +341,7 @@ public class Timer implements Serializable * on this timer, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType doesn't + * @throws ClassCastException if listenerType doesn't * specify a class or interface that implements * java.util.EventListener * diff --git a/src/java.desktop/share/classes/javax/swing/TransferHandler.java b/src/java.desktop/share/classes/javax/swing/TransferHandler.java index f2622880e7fa3e6576df41ee1f9bdc2e354f2444..445234e4bdab544bea5349cee36b18d69832ed42 100644 --- a/src/java.desktop/share/classes/javax/swing/TransferHandler.java +++ b/src/java.desktop/share/classes/javax/swing/TransferHandler.java @@ -1172,9 +1172,9 @@ public class TransferHandler implements Serializable { * * @param flavor the requested flavor for the data * @see DataFlavor#getRepresentationClass - * @exception IOException if the data is no longer available + * @throws IOException if the data is no longer available * in the requested flavor. - * @exception UnsupportedFlavorException if the requested data flavor is + * @throws UnsupportedFlavorException if the requested data flavor is * not supported. */ public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { diff --git a/src/java.desktop/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java b/src/java.desktop/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java index 2f2163c89397b19e1aafe4e6c0e62b0392a2338c..9a42849251289866e0c0cb6a1aacd9408e7f2a51 100644 --- a/src/java.desktop/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java +++ b/src/java.desktop/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java @@ -161,7 +161,7 @@ public abstract class AbstractColorChooserPanel extends JPanel { * If you override this, be sure to call super. * * @param enclosingChooser the chooser to which the panel is to be added - * @exception RuntimeException if the chooser panel has already been + * @throws RuntimeException if the chooser panel has already been * installed */ public void installChooserPanel(JColorChooser enclosingChooser) { diff --git a/src/java.desktop/share/classes/javax/swing/event/EventListenerList.java b/src/java.desktop/share/classes/javax/swing/event/EventListenerList.java index 1be0228864c1e84410ef3138cbda74dc407aef99..81ae23930088de548cd41a41f61bd490b4122dc9 100644 --- a/src/java.desktop/share/classes/javax/swing/event/EventListenerList.java +++ b/src/java.desktop/share/classes/javax/swing/event/EventListenerList.java @@ -144,7 +144,7 @@ public class EventListenerList implements Serializable { * @param the type of {@code EventListener} to search for * @param t the type of {@code EventListener} classes to be returned * @return all of the listeners of the specified type. - * @exception ClassCastException if the supplied class + * @throws ClassCastException if the supplied class * is not assignable to EventListener * * @since 1.3 diff --git a/src/java.desktop/share/classes/javax/swing/plaf/TextUI.java b/src/java.desktop/share/classes/javax/swing/plaf/TextUI.java index cba6691ba58b7091c8db951004c8a299cea0f78e..3c96fdabffd641285c709b88670c38e2fb32eb87 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/TextUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/TextUI.java @@ -49,7 +49,7 @@ public abstract class TextUI extends ComponentUI * @param t the text component for which this UI is installed * @param pos the local location in the model to translate >= 0 * @return the coordinates as a {@code Rectangle} - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * * @deprecated replaced by @@ -66,7 +66,7 @@ public abstract class TextUI extends ComponentUI * @param pos the local location in the model to translate >= 0 * @param bias the bias for the position * @return the coordinates as a {@code Rectangle} - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * * @deprecated replaced by @@ -86,7 +86,7 @@ public abstract class TextUI extends ComponentUI * @param pos the local location in the model to translate {@code >= 0} * @param bias the bias for the position * @return the coordinates as a {@code Rectangle2D} - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * * @since 9 @@ -178,8 +178,8 @@ public abstract class TextUI extends ComponentUI * @param biasRet an array to contain the bias for the returned position * @return the location within the model that best represents the next * location visual position - * @exception BadLocationException for a bad location within a document model - * @exception IllegalArgumentException for an invalid direction + * @throws BadLocationException for a bad location within a document model + * @throws IllegalArgumentException for an invalid direction */ public abstract int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java index 3e1108fb25bd2a6e005fc5f96651969936912055..5a7f88ff3cec4f59ab50b93fb2b691a2950918dd 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java @@ -585,9 +585,9 @@ public class BasicHTML { * position is a boundary of two views. * @param a the allocated region to render into * @return the bounding box of the given position is returned - * @exception BadLocationException if the given position does + * @throws BadLocationException if the given position does * not represent a valid location in the associated document - * @exception IllegalArgumentException for an invalid bias argument + * @throws IllegalArgumentException for an invalid bias argument * @see View#viewToModel */ public Shape modelToView(int p0, Position.Bias b0, int p1, diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java index 360e98eee7af162de68e894798021356165e92ff..92d5896bca299a5986512cf630a81717b6bed261 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java @@ -775,7 +775,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants { * Returns the baseline for the specified tab. * * @param tab index of tab to get baseline for - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * (index < 0 || index >= tab count) * @return baseline or a value < 0 indicating there is no reasonable * baseline diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java index 2e67a99720a58451422a177acb6cccb919fcbe96..5d767d3b7034c81ad9a12b87536033d4c7783faa 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java @@ -345,7 +345,7 @@ public class BasicTextFieldUI extends BasicTextUI { * @param pos the position to convert >= 0 * @param a the allocated region to render into * @return the bounding box of the given position - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see View#modelToView */ @@ -367,9 +367,9 @@ public class BasicTextFieldUI extends BasicTextUI { * position is a boundary of two views. * @param a the allocated region to render into * @return the bounding box of the given position is returned - * @exception BadLocationException if the given position does + * @throws BadLocationException if the given position does * not represent a valid location in the associated document - * @exception IllegalArgumentException for an invalid bias argument + * @throws IllegalArgumentException for an invalid bias argument * @see View#viewToModel */ public Shape modelToView(int p0, Position.Bias b0, diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java index 6e98a57e5c31d266480b29822fe60203cdf961fc..881b9557b0c9909e4a593bef74987d6005459206 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java @@ -1045,7 +1045,7 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory { * @param tc the text component for which this UI is installed * @param pos the local location in the model to translate >= 0 * @return the coordinates as a rectangle, null if the model is not painted - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see TextUI#modelToView * @@ -1067,7 +1067,7 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory { * @param tc the text component for which this UI is installed * @param pos the local location in the model to translate >= 0 * @return the coordinates as a rectangle, null if the model is not painted - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see TextUI#modelToView * @@ -1626,9 +1626,9 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory { * position is a boundary of two views. * @param a the allocated region to render into * @return the bounding box of the given position is returned - * @exception BadLocationException if the given position does + * @throws BadLocationException if the given position does * not represent a valid location in the associated document - * @exception IllegalArgumentException for an invalid bias argument + * @throws IllegalArgumentException for an invalid bias argument * @see View#viewToModel */ public Shape modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) throws BadLocationException { @@ -1674,9 +1674,9 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory { * SwingConstants.NORTH, or SwingConstants.SOUTH. * @return the location within the model that best represents the next * location visual position. - * @exception BadLocationException the given position is not a valid + * @throws BadLocationException the given position is not a valid * position within the document - * @exception IllegalArgumentException for an invalid direction + * @throws IllegalArgumentException for an invalid direction */ public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTransferable.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTransferable.java index 544c2ebe73115e55bea3cbfa2d1325cc6fac0939..116226188c9da4ae9952ba95848723b53870ae63 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTransferable.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTransferable.java @@ -130,9 +130,9 @@ class BasicTransferable implements Transferable, UIResource { * * @param flavor the requested flavor for the data * @see DataFlavor#getRepresentationClass - * @exception IOException if the data is no longer available + * @throws IOException if the data is no longer available * in the requested flavor. - * @exception UnsupportedFlavorException if the requested data flavor is + * @throws UnsupportedFlavorException if the requested data flavor is * not supported. */ public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { diff --git a/src/java.desktop/share/classes/javax/swing/table/AbstractTableModel.java b/src/java.desktop/share/classes/javax/swing/table/AbstractTableModel.java index 886d0ad64b02faf26c2cc8a6a7bc419a1e019456..99208f3cd266f41470d933722ecbd7bc8e9d68e7 100644 --- a/src/java.desktop/share/classes/javax/swing/table/AbstractTableModel.java +++ b/src/java.desktop/share/classes/javax/swing/table/AbstractTableModel.java @@ -331,7 +331,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable * FooListeners on this component, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType + * @throws ClassCastException if listenerType * doesn't specify a class or interface that implements * java.util.EventListener * diff --git a/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java b/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java index ab5ff974eb9dd96e0ac0e59b852fece5ef314b91..e1a6264a4788ef0a279f58a8eb3d49cf003b3f99 100644 --- a/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java +++ b/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java @@ -109,7 +109,7 @@ public class DefaultTableColumnModel implements TableColumnModel, * event to its listeners. * * @param aColumn the TableColumn to be added - * @exception IllegalArgumentException if aColumn is + * @throws IllegalArgumentException if aColumn is * null * @see #removeColumn */ @@ -170,7 +170,7 @@ public class DefaultTableColumnModel implements TableColumnModel, * * @param columnIndex the index of column to be moved * @param newIndex new index to move the column - * @exception IllegalArgumentException if column or + * @throws IllegalArgumentException if column or * newIndex * are not in the valid range */ @@ -258,7 +258,7 @@ public class DefaultTableColumnModel implements TableColumnModel, * @return the index of the first column in the * tableColumns array whose identifier * is equal to identifier - * @exception IllegalArgumentException if identifier + * @throws IllegalArgumentException if identifier * is null, or if no * TableColumn has this * identifier @@ -368,7 +368,7 @@ public class DefaultTableColumnModel implements TableColumnModel, * an exception is thrown. * * @param newModel the new selection model - * @exception IllegalArgumentException if newModel + * @throws IllegalArgumentException if newModel * is null * @see #getSelectionModel */ @@ -636,7 +636,7 @@ public class DefaultTableColumnModel implements TableColumnModel, * FooListeners on this model, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType + * @throws ClassCastException if listenerType * doesn't specify a class or interface that implements * java.util.EventListener * diff --git a/src/java.desktop/share/classes/javax/swing/table/DefaultTableModel.java b/src/java.desktop/share/classes/javax/swing/table/DefaultTableModel.java index 08dfc85b0a961ea795bc2aedbf7f991cdfb28237..cdb3f29b76a11efe3f7a78b1590560ecdea5794f 100644 --- a/src/java.desktop/share/classes/javax/swing/table/DefaultTableModel.java +++ b/src/java.desktop/share/classes/javax/swing/table/DefaultTableModel.java @@ -375,7 +375,7 @@ public class DefaultTableModel extends AbstractTableModel implements Serializabl * * @param row the row index of the row to be inserted * @param rowData optional data of the row being added - * @exception ArrayIndexOutOfBoundsException if the row was invalid + * @throws ArrayIndexOutOfBoundsException if the row was invalid */ public void insertRow(int row, Vector rowData) { dataVector.insertElementAt(rowData, row); @@ -390,7 +390,7 @@ public class DefaultTableModel extends AbstractTableModel implements Serializabl * * @param row the row index of the row to be inserted * @param rowData optional data of the row being added - * @exception ArrayIndexOutOfBoundsException if the row was invalid + * @throws ArrayIndexOutOfBoundsException if the row was invalid */ public void insertRow(int row, Object[] rowData) { insertRow(row, convertToVector(rowData)); @@ -438,7 +438,7 @@ public class DefaultTableModel extends AbstractTableModel implements Serializabl * @param start the starting row index to be moved * @param end the ending row index to be moved * @param to the destination of the rows to be moved - * @exception ArrayIndexOutOfBoundsException if any of the elements + * @throws ArrayIndexOutOfBoundsException if any of the elements * would be moved out of the table's range * */ @@ -463,7 +463,7 @@ public class DefaultTableModel extends AbstractTableModel implements Serializabl * of the row being removed will be sent to all the listeners. * * @param row the row index of the row to be removed - * @exception ArrayIndexOutOfBoundsException if the row was invalid + * @throws ArrayIndexOutOfBoundsException if the row was invalid */ public void removeRow(int row) { dataVector.removeElementAt(row); @@ -652,7 +652,7 @@ public class DefaultTableModel extends AbstractTableModel implements Serializabl * @param row the row whose value is to be queried * @param column the column whose value is to be queried * @return the value Object at the specified cell - * @exception ArrayIndexOutOfBoundsException if an invalid row or + * @throws ArrayIndexOutOfBoundsException if an invalid row or * column was given */ public Object getValueAt(int row, int column) { @@ -669,7 +669,7 @@ public class DefaultTableModel extends AbstractTableModel implements Serializabl * @param aValue the new value; this can be null * @param row the row whose value is to be changed * @param column the column whose value is to be changed - * @exception ArrayIndexOutOfBoundsException if an invalid row or + * @throws ArrayIndexOutOfBoundsException if an invalid row or * column was given */ public void setValueAt(Object aValue, int row, int column) { diff --git a/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java b/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java index f36b5646e3d4ffc22728865f8eb171863d8c3ce9..561d6a71c75493b962a6447e30cfbf731c36c3b6 100644 --- a/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java +++ b/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java @@ -550,7 +550,7 @@ public class JTableHeader extends JComponent implements TableColumnModelListener * for listener notifications from the new column model. * * @param columnModel the new data source for this table - * @exception IllegalArgumentException + * @throws IllegalArgumentException * if newModel is null * @see #getColumnModel */ diff --git a/src/java.desktop/share/classes/javax/swing/table/TableColumnModel.java b/src/java.desktop/share/classes/javax/swing/table/TableColumnModel.java index eaaa8447ef701f93ce3b08aeef3a0c9f5c109c32..4cf4870b5e3543787deb710cb20c927fc3374627 100644 --- a/src/java.desktop/share/classes/javax/swing/table/TableColumnModel.java +++ b/src/java.desktop/share/classes/javax/swing/table/TableColumnModel.java @@ -79,7 +79,7 @@ public interface TableColumnModel * * @param columnIndex the index of column to be moved * @param newIndex index of the column's new location - * @exception IllegalArgumentException if columnIndex or + * @throws IllegalArgumentException if columnIndex or * newIndex * are not in the valid range */ @@ -119,7 +119,7 @@ public interface TableColumnModel * @param columnIdentifier the identifier object * @return the index of the first table column * whose identifier is equal to identifier - * @exception IllegalArgumentException if identifier + * @throws IllegalArgumentException if identifier * is null, or no * TableColumn has this * identifier diff --git a/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java b/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java index 1b97006bc34723021fef05e40aad70554481f4c5..db19b81e8e50471cb04fb52d0e3e08e4b19230da 100644 --- a/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java +++ b/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java @@ -344,7 +344,7 @@ public abstract class AbstractDocument implements Document, Serializable { * FooListeners on this component, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType + * @throws ClassCastException if listenerType * doesn't specify a class or interface that implements * java.util.EventListener * @@ -604,7 +604,7 @@ public abstract class AbstractDocument implements Document, Serializable { * * @param offs the starting offset >= 0 * @param len the number of characters to remove >= 0 - * @exception BadLocationException the given remove position is not a valid + * @throws BadLocationException the given remove position is not a valid * position within the document * @see Document#remove */ @@ -674,7 +674,7 @@ public abstract class AbstractDocument implements Document, Serializable { * null * is legal, and typically treated as an empty attributeset, * but exact interpretation is left to the subclass - * @exception BadLocationException the given position is not a valid + * @throws BadLocationException the given position is not a valid * position within the document * @since 1.4 */ @@ -718,7 +718,7 @@ public abstract class AbstractDocument implements Document, Serializable { * @param offs the starting offset >= 0 * @param str the string to insert; does nothing with null/empty strings * @param a the attributes for the inserted content - * @exception BadLocationException the given insert position is not a valid + * @throws BadLocationException the given insert position is not a valid * position within the document * @see Document#insertString */ @@ -792,7 +792,7 @@ public abstract class AbstractDocument implements Document, Serializable { * @param offset the starting offset >= 0 * @param length the number of characters to retrieve >= 0 * @return the text - * @exception BadLocationException the range given includes a position + * @throws BadLocationException the range given includes a position * that is not a valid position within the document * @see Document#getText */ @@ -833,7 +833,7 @@ public abstract class AbstractDocument implements Document, Serializable { * @param offset the starting offset >= 0 * @param length the number of characters to retrieve >= 0 * @param txt the Segment object to retrieve the text into - * @exception BadLocationException the range given includes a position + * @throws BadLocationException the range given includes a position * that is not a valid position within the document */ public void getText(int offset, int length, Segment txt) throws BadLocationException { @@ -854,7 +854,7 @@ public abstract class AbstractDocument implements Document, Serializable { * * @param offs the position in the model >= 0 * @return the position - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see Document#createPosition */ @@ -1354,7 +1354,7 @@ public abstract class AbstractDocument implements Document, Serializable { * Document will be left in a locked state so that no * reading or writing can be done. * - * @exception IllegalStateException thrown on illegal lock + * @throws IllegalStateException thrown on illegal lock * attempt. If the document is implemented properly, this can * only happen if a document listener attempts to mutate the * document. This situation violates the bean event model @@ -1633,7 +1633,7 @@ public abstract class AbstractDocument implements Document, Serializable { * * @param offset the offset in the content >= 0 * @return a Position - * @exception BadLocationException for an invalid offset + * @throws BadLocationException for an invalid offset */ public Position createPosition(int offset) throws BadLocationException; @@ -1652,7 +1652,7 @@ public abstract class AbstractDocument implements Document, Serializable { * @return if the implementation supports a history mechanism, * a reference to an Edit implementation will be returned, * otherwise returns null - * @exception BadLocationException thrown if the area covered by + * @throws BadLocationException thrown if the area covered by * the arguments is not contained in the character sequence */ public UndoableEdit insertString(int where, String str) throws BadLocationException; @@ -1666,7 +1666,7 @@ public abstract class AbstractDocument implements Document, Serializable { * @return If the implementation supports a history mechanism, * a reference to an Edit implementation will be returned, * otherwise null. - * @exception BadLocationException Thrown if the area covered by + * @throws BadLocationException Thrown if the area covered by * the arguments is not contained in the character sequence. */ public UndoableEdit remove(int where, int nitems) throws BadLocationException; @@ -1677,7 +1677,7 @@ public abstract class AbstractDocument implements Document, Serializable { * @param where Offset into the sequence to fetch >= 0. * @param len number of characters to copy >= 0. * @return the string - * @exception BadLocationException Thrown if the area covered by + * @throws BadLocationException Thrown if the area covered by * the arguments is not contained in the character sequence. */ public String getString(int where, int len) throws BadLocationException; @@ -1688,7 +1688,7 @@ public abstract class AbstractDocument implements Document, Serializable { * @param where the starting offset >= 0 * @param len the number of characters >= 0 * @param txt the target location to copy into - * @exception BadLocationException Thrown if the area covered by + * @throws BadLocationException Thrown if the area covered by * the arguments is not contained in the character sequence. */ public void getChars(int where, int len, Segment txt) throws BadLocationException; @@ -2819,7 +2819,7 @@ public abstract class AbstractDocument implements Document, Serializable { /** * Redoes a change. * - * @exception CannotRedoException if the change cannot be redone + * @throws CannotRedoException if the change cannot be redone */ public void redo() throws CannotRedoException { writeLock(); @@ -2843,7 +2843,7 @@ public abstract class AbstractDocument implements Document, Serializable { /** * Undoes a change. * - * @exception CannotUndoException if the change cannot be undone + * @throws CannotUndoException if the change cannot be undone */ public void undo() throws CannotUndoException { writeLock(); @@ -3187,7 +3187,7 @@ public abstract class AbstractDocument implements Document, Serializable { /** * Redoes a change. * - * @exception CannotRedoException if the change cannot be redone + * @throws CannotRedoException if the change cannot be redone */ public void redo() throws CannotRedoException { super.redo(); @@ -3204,7 +3204,7 @@ public abstract class AbstractDocument implements Document, Serializable { /** * Undoes a change. * - * @exception CannotUndoException if the change cannot be undone + * @throws CannotUndoException if the change cannot be undone */ public void undo() throws CannotUndoException { super.undo(); diff --git a/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java b/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java index 0ca0fecb5a845fc33616b35b175cdce1df1e7c55..07a8301f0b5e4aebbe4e932d48a21f82e089c2cd 100644 --- a/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java +++ b/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java @@ -270,7 +270,7 @@ public abstract class AbstractWriter { * when encountered. * * @param elem an Element - * @exception BadLocationException if pos represents an invalid + * @throws BadLocationException if pos represents an invalid * location within the document * @return the text as a String */ @@ -286,8 +286,8 @@ public abstract class AbstractWriter { * out. * * @param elem an Element. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ protected void text(Element elem) throws BadLocationException, @@ -462,7 +462,7 @@ public abstract class AbstractWriter { * line is empty, this will not make it so that the current line is * still considered empty. * - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void indent() throws IOException { int max = getIndentLevel() * getIndentSpace(); @@ -485,7 +485,7 @@ public abstract class AbstractWriter { * the write method that takes a char[]. * * @param ch a char. - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void write(char ch) throws IOException { if (tempChars == null) { @@ -500,7 +500,7 @@ public abstract class AbstractWriter { * write method that takes a char[]. * * @param content a String. - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void write(String content) throws IOException { if (content == null) { @@ -671,7 +671,7 @@ public abstract class AbstractWriter { * pairs. It throws an IOException when encountered. * * @param attr an AttributeSet. - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeAttributes(AttributeSet attr) throws IOException { diff --git a/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java b/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java index a9e4c58fbaa931e5911bbb29db58c7b6af1b43bc..ac0dd40b28a6f6607c2cb472ab370198298c0beb 100644 --- a/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java +++ b/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java @@ -640,7 +640,7 @@ public class AsyncBoxView extends View { * Typically the view is told to render into the span * that is returned, although there is no guarantee. * The parent may choose to resize or break the view. - * @exception IllegalArgumentException for an invalid axis type + * @throws IllegalArgumentException for an invalid axis type */ public float getPreferredSpan(int axis) { float margin = getInsetSpan(axis); @@ -665,7 +665,7 @@ public class AsyncBoxView extends View { * Typically the view is told to render into the span * that is returned, although there is no guarantee. * The parent may choose to resize or break the view. - * @exception IllegalArgumentException for an invalid axis type + * @throws IllegalArgumentException for an invalid axis type */ public float getMinimumSpan(int axis) { if (axis == this.axis) { @@ -693,7 +693,7 @@ public class AsyncBoxView extends View { * Typically the view is told to render into the span * that is returned, although there is no guarantee. * The parent may choose to resize or break the view. - * @exception IllegalArgumentException for an invalid axis type + * @throws IllegalArgumentException for an invalid axis type */ public float getMaximumSpan(int axis) { if (axis == this.axis) { @@ -773,9 +773,9 @@ public class AsyncBoxView extends View { * next character represented by the offset, in case the * position is a boundary of two views. * @return the bounding box of the given position is returned - * @exception BadLocationException if the given position does + * @throws BadLocationException if the given position does * not represent a valid location in the associated document - * @exception IllegalArgumentException for an invalid bias argument + * @throws IllegalArgumentException for an invalid bias argument * @see View#viewToModel */ public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException { @@ -864,9 +864,9 @@ public class AsyncBoxView extends View { * @param biasRet an array contain the bias that was checked * @return the location within the model that best represents the next * location visual position - * @exception BadLocationException the given position is not a valid + * @throws BadLocationException the given position is not a valid * position within the document - * @exception IllegalArgumentException if direction is invalid + * @throws IllegalArgumentException if direction is invalid */ public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, diff --git a/src/java.desktop/share/classes/javax/swing/text/BoxView.java b/src/java.desktop/share/classes/javax/swing/text/BoxView.java index afaefacccf5457dcf74c8cfdcf67a4c6e06cf99b..cc21e03902173279df746ef44f86d0d619e2218e 100644 --- a/src/java.desktop/share/classes/javax/swing/text/BoxView.java +++ b/src/java.desktop/share/classes/javax/swing/text/BoxView.java @@ -293,7 +293,7 @@ public class BoxView extends CompositeView { * @param axis may be either View.X_AXIS or * View.Y_AXIS * @return the weight - * @exception IllegalArgumentException for an invalid axis + * @throws IllegalArgumentException for an invalid axis */ public int getResizeWeight(int axis) { checkRequests(axis); @@ -473,7 +473,7 @@ public class BoxView extends CompositeView { * @param pos the position to convert >= 0 * @param a the allocated region to render into * @return the bounding box of the given position - * @exception BadLocationException if the given position does + * @throws BadLocationException if the given position does * not represent a valid location in the associated document * @see View#modelToView */ @@ -519,7 +519,7 @@ public class BoxView extends CompositeView { * origin and 1.0 indicates alignment to the full span * away from the origin; an alignment of 0.5 would be the * center of the view - * @exception IllegalArgumentException for an invalid axis + * @throws IllegalArgumentException for an invalid axis */ public float getAlignment(int axis) { checkRequests(axis); @@ -540,7 +540,7 @@ public class BoxView extends CompositeView { * typically the view is told to render into the span * that is returned, although there is no guarantee; * the parent may choose to resize or break the view - * @exception IllegalArgumentException for an invalid axis type + * @throws IllegalArgumentException for an invalid axis type */ public float getPreferredSpan(int axis) { checkRequests(axis); @@ -563,7 +563,7 @@ public class BoxView extends CompositeView { * typically the view is told to render into the span * that is returned, although there is no guarantee; * the parent may choose to resize or break the view - * @exception IllegalArgumentException for an invalid axis type + * @throws IllegalArgumentException for an invalid axis type */ public float getMinimumSpan(int axis) { checkRequests(axis); @@ -586,7 +586,7 @@ public class BoxView extends CompositeView { * typically the view is told to render into the span * that is returned, although there is no guarantee; * the parent may choose to resize or break the view - * @exception IllegalArgumentException for an invalid axis type + * @throws IllegalArgumentException for an invalid axis type */ public float getMaximumSpan(int axis) { checkRequests(axis); @@ -919,7 +919,7 @@ public class BoxView extends CompositeView { /** * Checks the request cache and update if needed. * @param axis the axis being studied - * @exception IllegalArgumentException if axis is + * @throws IllegalArgumentException if axis is * neither View.X_AXIS nor View.Y_AXIS */ void checkRequests(int axis) { diff --git a/src/java.desktop/share/classes/javax/swing/text/ComponentView.java b/src/java.desktop/share/classes/javax/swing/text/ComponentView.java index a4aaa30e512bcc585064331d7b8f9de209a54735..0d8743f86edad48cebe44313e9a291cad5408f2e 100644 --- a/src/java.desktop/share/classes/javax/swing/text/ComponentView.java +++ b/src/java.desktop/share/classes/javax/swing/text/ComponentView.java @@ -132,7 +132,7 @@ public class ComponentView extends View { * Typically the view is told to render into the span * that is returned, although there is no guarantee. * The parent may choose to resize or break the view. - * @exception IllegalArgumentException for an invalid axis + * @throws IllegalArgumentException for an invalid axis */ public float getPreferredSpan(int axis) { if ((axis != X_AXIS) && (axis != Y_AXIS)) { @@ -160,7 +160,7 @@ public class ComponentView extends View { * Typically the view is told to render into the span * that is returned, although there is no guarantee. * The parent may choose to resize or break the view. - * @exception IllegalArgumentException for an invalid axis + * @throws IllegalArgumentException for an invalid axis */ public float getMinimumSpan(int axis) { if ((axis != X_AXIS) && (axis != Y_AXIS)) { @@ -188,7 +188,7 @@ public class ComponentView extends View { * Typically the view is told to render into the span * that is returned, although there is no guarantee. * The parent may choose to resize or break the view. - * @exception IllegalArgumentException for an invalid axis + * @throws IllegalArgumentException for an invalid axis */ public float getMaximumSpan(int axis) { if ((axis != X_AXIS) && (axis != Y_AXIS)) { @@ -325,7 +325,7 @@ public class ComponentView extends View { * @param pos the position to convert >=0 * @param a the allocated region to render into * @return the bounding box of the given position is returned - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see View#modelToView */ diff --git a/src/java.desktop/share/classes/javax/swing/text/CompositeView.java b/src/java.desktop/share/classes/javax/swing/text/CompositeView.java index 343c02feddc17be09cd220ef71e32e1dd87be07a..5220395d35ad05fb2615d3ff92d9768f27c1b433 100644 --- a/src/java.desktop/share/classes/javax/swing/text/CompositeView.java +++ b/src/java.desktop/share/classes/javax/swing/text/CompositeView.java @@ -244,7 +244,7 @@ public abstract class CompositeView extends View { * @param b a bias value of either Position.Bias.Forward * or Position.Bias.Backward * @return the bounding box of the given position - * @exception BadLocationException if the given position does + * @throws BadLocationException if the given position does * not represent a valid location in the associated document * @see View#modelToView */ @@ -294,9 +294,9 @@ public abstract class CompositeView extends View { * position is a boundary of two views * @param a the allocated region to render into * @return the bounding box of the given position is returned - * @exception BadLocationException if the given position does + * @throws BadLocationException if the given position does * not represent a valid location in the associated document - * @exception IllegalArgumentException for an invalid bias argument + * @throws IllegalArgumentException for an invalid bias argument * @see View#viewToModel */ public Shape modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) throws BadLocationException { @@ -458,9 +458,9 @@ public abstract class CompositeView extends View { * @param biasRet an array containing the bias that was checked * @return the location within the model that best represents the next * location visual position - * @exception BadLocationException the given position is not a valid + * @throws BadLocationException the given position is not a valid * position within the document - * @exception IllegalArgumentException if direction is invalid + * @throws IllegalArgumentException if direction is invalid */ public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) @@ -715,8 +715,8 @@ public abstract class CompositeView extends View { * @param biasRet an array containing the bias that was checked * @return the location within the model that best represents the next * north or south location - * @exception BadLocationException for a bad location within a document model - * @exception IllegalArgumentException if direction is invalid + * @throws BadLocationException for a bad location within a document model + * @throws IllegalArgumentException if direction is invalid * @see #getNextVisualPositionFrom */ protected int getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, @@ -748,8 +748,8 @@ public abstract class CompositeView extends View { * @param biasRet an array containing the bias that was checked * @return the location within the model that best represents the next * west or east location - * @exception BadLocationException for a bad location within a document model - * @exception IllegalArgumentException if direction is invalid + * @throws BadLocationException for a bad location within a document model + * @throws IllegalArgumentException if direction is invalid * @see #getNextVisualPositionFrom */ protected int getNextEastWestVisualPositionFrom(int pos, Position.Bias b, diff --git a/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java b/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java index a980268bd941d503ffa44a23386abc6cebb86b0e..ff4d37224e370f9f3fa43a694503aa1d7e958466 100644 --- a/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java +++ b/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java @@ -870,7 +870,7 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou * FooListeners on this component, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType + * @throws ClassCastException if listenerType * doesn't specify a class or interface that implements * java.util.EventListener * diff --git a/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java b/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java index ee1db4739ceaf27c0b8c72ecdb5c3a802b2c9135..2d9971d3794300630524e3c92ebae0f89550a5e8 100644 --- a/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java +++ b/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java @@ -142,8 +142,8 @@ public class DefaultEditorKit extends EditorKit { * @param doc The destination for the insertion. * @param pos The location in the document to place the * content >=0. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ public void read(InputStream in, Document doc, int pos) @@ -161,8 +161,8 @@ public class DefaultEditorKit extends EditorKit { * @param pos The location in the document to fetch the * content >=0. * @param len The amount to write out >=0. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ public void write(OutputStream out, Document doc, int pos, int len) @@ -193,8 +193,8 @@ public class DefaultEditorKit extends EditorKit { * @param doc The destination for the insertion. * @param pos The location in the document to place the * content >=0. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ public void read(Reader in, Document doc, int pos) @@ -303,8 +303,8 @@ public class DefaultEditorKit extends EditorKit { * @param pos The location in the document to fetch the * content from >=0. * @param len The amount to write out >=0. - * @exception IOException on any I/O error - * @exception BadLocationException if pos is not within 0 and + * @throws IOException on any I/O error + * @throws BadLocationException if pos is not within 0 and * the length of the document. */ public void write(Writer out, Document doc, int pos, int len) diff --git a/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java b/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java index 4e874ec1f007433bff147c63cd7ab12889161afb..0465b9157e28f959a68041861eb69c132fef5a12 100644 --- a/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java +++ b/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java @@ -110,7 +110,7 @@ public class DefaultHighlighter extends LayeredHighlighter { * @param p the painter to use to actually render the highlight * @return an object that can be used as a tag * to refer to the highlight - * @exception BadLocationException if the specified location is invalid + * @throws BadLocationException if the specified location is invalid */ public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p) throws BadLocationException { if (p0 < 0) { @@ -222,7 +222,7 @@ public class DefaultHighlighter extends LayeredHighlighter { * @param tag the highlight tag * @param p0 the beginning of the range >= 0 * @param p1 the end of the range >= p0 - * @exception BadLocationException if the specified location is invalid + * @throws BadLocationException if the specified location is invalid */ public void changeHighlight(Object tag, int p0, int p1) throws BadLocationException { if (p0 < 0) { diff --git a/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java b/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java index f549f522ff2b7513449091c0a64ca8aebe4636ac..5d373177eaf0b96295e672c2bfaaa3da3c8a41b9 100644 --- a/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java +++ b/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java @@ -182,7 +182,7 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc * * @param offset the starting offset >= 0 * @param data the element data - * @exception BadLocationException for an invalid starting offset + * @throws BadLocationException for an invalid starting offset */ protected void insert(int offset, ElementSpec[] data) throws BadLocationException { if (data == null || data.length == 0) { @@ -2548,7 +2548,7 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc /** * Redoes a change. * - * @exception CannotRedoException if the change cannot be redone + * @throws CannotRedoException if the change cannot be redone */ public void redo() throws CannotRedoException { super.redo(); @@ -2562,7 +2562,7 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc /** * Undoes a change. * - * @exception CannotUndoException if the change cannot be undone + * @throws CannotUndoException if the change cannot be undone */ public void undo() throws CannotUndoException { super.undo(); @@ -2604,7 +2604,7 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc /** * Redoes a change. * - * @exception CannotRedoException if the change cannot be redone + * @throws CannotRedoException if the change cannot be redone */ public void redo() throws CannotRedoException { super.redo(); @@ -2614,7 +2614,7 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc /** * Undoes a change. * - * @exception CannotUndoException if the change cannot be undone + * @throws CannotUndoException if the change cannot be undone */ public void undo() throws CannotUndoException { super.undo(); diff --git a/src/java.desktop/share/classes/javax/swing/text/Document.java b/src/java.desktop/share/classes/javax/swing/text/Document.java index e0f4ac791d5e8962a593fcb51f8dea61351cef15..09f162733cfcb97bd959e44827c11bb0690e1d83 100644 --- a/src/java.desktop/share/classes/javax/swing/text/Document.java +++ b/src/java.desktop/share/classes/javax/swing/text/Document.java @@ -453,7 +453,7 @@ public interface Document { * * @param offs the offset from the beginning >= 0 * @param len the number of characters to remove >= 0 - * @exception BadLocationException some portion of the removal range + * @throws BadLocationException some portion of the removal range * was not a valid part of the document. The location in the exception * is the first bad position encountered. * @see javax.swing.event.DocumentEvent @@ -490,7 +490,7 @@ public interface Document { * @param str the string to insert * @param a the attributes to associate with the inserted * content. This may be null if there are no attributes. - * @exception BadLocationException the given insert position is not a valid + * @throws BadLocationException the given insert position is not a valid * position within the document * @see javax.swing.event.DocumentEvent * @see javax.swing.event.DocumentListener @@ -507,7 +507,7 @@ public interface Document { * start of the text >= 0 * @param length the length of the desired string >= 0 * @return the text, in a String of length >= 0 - * @exception BadLocationException some portion of the given range + * @throws BadLocationException some portion of the given range * was not a valid part of the document. The location in the exception * is the first bad position encountered. */ @@ -546,7 +546,7 @@ public interface Document { * @param length the length of the desired string >= 0 * @param txt the Segment object to return the text in * - * @exception BadLocationException Some portion of the given range + * @throws BadLocationException Some portion of the given range * was not a valid part of the document. The location in the exception * is the first bad position encountered. */ @@ -582,7 +582,7 @@ public interface Document { * * @param offs the offset from the start of the document >= 0 * @return the position - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document */ public Position createPosition(int offs) throws BadLocationException; diff --git a/src/java.desktop/share/classes/javax/swing/text/DocumentFilter.java b/src/java.desktop/share/classes/javax/swing/text/DocumentFilter.java index 5f69882ff8ef9733f66560f0ad1aa21071bcc342..d0334bce45e11a324d515c45d1dfb19f1bcc8f78 100644 --- a/src/java.desktop/share/classes/javax/swing/text/DocumentFilter.java +++ b/src/java.desktop/share/classes/javax/swing/text/DocumentFilter.java @@ -75,7 +75,7 @@ public class DocumentFilter { * @param fb FilterBypass that can be used to mutate Document * @param offset the offset from the beginning >= 0 * @param length the number of characters to remove >= 0 - * @exception BadLocationException some portion of the removal range + * @throws BadLocationException some portion of the removal range * was not a valid part of the document. The location in the exception * is the first bad position encountered. */ @@ -97,7 +97,7 @@ public class DocumentFilter { * @param string the string to insert * @param attr the attributes to associate with the inserted * content. This may be null if there are no attributes. - * @exception BadLocationException the given insert position is not a + * @throws BadLocationException the given insert position is not a * valid position within the document */ public void insertString(FilterBypass fb, int offset, String string, @@ -117,7 +117,7 @@ public class DocumentFilter { * @param text Text to insert, null indicates no text to insert * @param attrs AttributeSet indicating attributes of inserted text, * null is legal. - * @exception BadLocationException the given insert position is not a + * @throws BadLocationException the given insert position is not a * valid position within the document */ public void replace(FilterBypass fb, int offset, int length, String text, @@ -153,7 +153,7 @@ public class DocumentFilter { * * @param offset the offset from the beginning >= 0 * @param length the number of characters to remove >= 0 - * @exception BadLocationException some portion of the removal range + * @throws BadLocationException some portion of the removal range * was not a valid part of the document. The location in the * exception is the first bad position encountered. */ @@ -169,7 +169,7 @@ public class DocumentFilter { * @param string the string to insert * @param attr the attributes to associate with the inserted * content. This may be null if there are no attributes. - * @exception BadLocationException the given insert position is not a + * @throws BadLocationException the given insert position is not a * valid position within the document */ public abstract void insertString(int offset, String string, @@ -186,7 +186,7 @@ public class DocumentFilter { * @param string Text to insert, null indicates no text to insert * @param attrs AttributeSet indicating attributes of inserted text, * null is legal. - * @exception BadLocationException the given insert is not a + * @throws BadLocationException the given insert is not a * valid position within the document */ public abstract void replace(int offset, int length, String string, diff --git a/src/java.desktop/share/classes/javax/swing/text/EditorKit.java b/src/java.desktop/share/classes/javax/swing/text/EditorKit.java index 9163a6361e4cc3cc77a3fc153d170c97c241c9e1..cd491fb5bac4b5abff14c9c00129a65588b01051 100644 --- a/src/java.desktop/share/classes/javax/swing/text/EditorKit.java +++ b/src/java.desktop/share/classes/javax/swing/text/EditorKit.java @@ -141,8 +141,8 @@ public abstract class EditorKit implements Cloneable, Serializable { * @param doc The destination for the insertion. * @param pos The location in the document to place the * content >= 0. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ public abstract void read(InputStream in, Document doc, int pos) @@ -157,8 +157,8 @@ public abstract class EditorKit implements Cloneable, Serializable { * @param pos The location in the document to fetch the * content from >= 0. * @param len The amount to write out >= 0. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ public abstract void write(OutputStream out, Document doc, int pos, int len) @@ -178,8 +178,8 @@ public abstract class EditorKit implements Cloneable, Serializable { * @param doc The destination for the insertion. * @param pos The location in the document to place the * content >= 0. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ public abstract void read(Reader in, Document doc, int pos) @@ -199,8 +199,8 @@ public abstract class EditorKit implements Cloneable, Serializable { * @param pos The location in the document to fetch the * content >= 0. * @param len The amount to write out >= 0. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ public abstract void write(Writer out, Document doc, int pos, int len) diff --git a/src/java.desktop/share/classes/javax/swing/text/FieldView.java b/src/java.desktop/share/classes/javax/swing/text/FieldView.java index 936a78700beb40346c5bf38e1507c1b56eae4556..b5ad636994527f59113ebb51eb2b28c07961aff2 100644 --- a/src/java.desktop/share/classes/javax/swing/text/FieldView.java +++ b/src/java.desktop/share/classes/javax/swing/text/FieldView.java @@ -258,7 +258,7 @@ public class FieldView extends PlainView { * @param pos the position to convert >= 0 * @param a the allocated region to render into * @return the bounding box of the given position - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see View#modelToView */ diff --git a/src/java.desktop/share/classes/javax/swing/text/GapContent.java b/src/java.desktop/share/classes/javax/swing/text/GapContent.java index c59c350541b117fad90cd1c992cb4d5fe88d5836..6c96b2b0ec3db8db94b91ebc0101385de3caabae 100644 --- a/src/java.desktop/share/classes/javax/swing/text/GapContent.java +++ b/src/java.desktop/share/classes/javax/swing/text/GapContent.java @@ -130,7 +130,7 @@ public class GapContent extends GapVector implements AbstractDocument.Content, S * @param where the starting position >= 0, < length() * @param str the non-null string to insert * @return an UndoableEdit object for undoing - * @exception BadLocationException if the specified position is invalid + * @throws BadLocationException if the specified position is invalid * @see AbstractDocument.Content#insertString */ public UndoableEdit insertString(int where, String str) throws BadLocationException { @@ -148,7 +148,7 @@ public class GapContent extends GapVector implements AbstractDocument.Content, S * @param where the starting position >= 0, where + nitems < length() * @param nitems the number of characters to remove >= 0 * @return an UndoableEdit object for undoing - * @exception BadLocationException if the specified position is invalid + * @throws BadLocationException if the specified position is invalid * @see AbstractDocument.Content#remove */ public UndoableEdit remove(int where, int nitems) throws BadLocationException { @@ -168,7 +168,7 @@ public class GapContent extends GapVector implements AbstractDocument.Content, S * @param where the starting position >= 0 * @param len the length to retrieve >= 0 * @return a string representing the content - * @exception BadLocationException if the specified position is invalid + * @throws BadLocationException if the specified position is invalid * @see AbstractDocument.Content#getString */ public String getString(int where, int len) throws BadLocationException { @@ -186,7 +186,7 @@ public class GapContent extends GapVector implements AbstractDocument.Content, S * @param where the starting position >= 0, where + len <= length() * @param len the number of characters to retrieve >= 0 * @param chars the Segment object to return the characters in - * @exception BadLocationException if the specified position is invalid + * @throws BadLocationException if the specified position is invalid * @see AbstractDocument.Content#getChars */ public void getChars(int where, int len, Segment chars) throws BadLocationException { @@ -237,7 +237,7 @@ public class GapContent extends GapVector implements AbstractDocument.Content, S * * @param offset the offset to track >= 0 * @return the position - * @exception BadLocationException if the specified position is invalid + * @throws BadLocationException if the specified position is invalid */ public Position createPosition(int offset) throws BadLocationException { while ( queue.poll() != null ) { diff --git a/src/java.desktop/share/classes/javax/swing/text/GlyphPainter2.java b/src/java.desktop/share/classes/javax/swing/text/GlyphPainter2.java index 3a070bb4040f605712ffd4fbb9bc1087575871ac..59e2a9da491cff09b9c29de942560dc87e922289 100644 --- a/src/java.desktop/share/classes/javax/swing/text/GlyphPainter2.java +++ b/src/java.desktop/share/classes/javax/swing/text/GlyphPainter2.java @@ -231,8 +231,8 @@ class GlyphPainter2 extends GlyphView.GlyphPainter { * SwingConstants.NORTH, or SwingConstants.SOUTH. * @return the location within the model that best represents the next * location visual position. - * @exception BadLocationException - * @exception IllegalArgumentException for an invalid direction + * @throws BadLocationException + * @throws IllegalArgumentException for an invalid direction */ public int getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, diff --git a/src/java.desktop/share/classes/javax/swing/text/GlyphView.java b/src/java.desktop/share/classes/javax/swing/text/GlyphView.java index b075356593c595e667935f58a5d6846ada4b8aae..8a4828f62d54775aea6d64560722dddd8bbdfd82 100644 --- a/src/java.desktop/share/classes/javax/swing/text/GlyphView.java +++ b/src/java.desktop/share/classes/javax/swing/text/GlyphView.java @@ -637,7 +637,7 @@ public class GlyphView extends View implements TabableView, Cloneable { * @param b either Position.Bias.Forward * or Position.Bias.Backward * @return the bounding box of the given position - * @exception BadLocationException if the given position does not represent a + * @throws BadLocationException if the given position does not represent a * valid location in the associated document * @see View#modelToView */ @@ -885,9 +885,9 @@ public class GlyphView extends View implements TabableView, Cloneable { * SwingConstants.NORTH, or SwingConstants.SOUTH. * @return the location within the model that best represents the next * location visual position. - * @exception BadLocationException the given position is not a valid + * @throws BadLocationException the given position is not a valid * position within the document - * @exception IllegalArgumentException for an invalid direction + * @throws IllegalArgumentException for an invalid direction */ public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, @@ -1199,7 +1199,7 @@ public class GlyphView extends View implements TabableView, Cloneable { * or Position.Bias.Backward * @param a Bounds of the View * @return the bounding box of the given position - * @exception BadLocationException if the given position does not represent a + * @throws BadLocationException if the given position does not represent a * valid location in the associated document * @see View#modelToView */ @@ -1283,8 +1283,8 @@ public class GlyphView extends View implements TabableView, Cloneable { * is returned as the zero-th element of this array * @return the location within the model that best represents the next * location visual position. - * @exception BadLocationException for a bad location within a document model - * @exception IllegalArgumentException for an invalid direction + * @throws BadLocationException for a bad location within a document model + * @throws IllegalArgumentException for an invalid direction */ public int getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, int direction, diff --git a/src/java.desktop/share/classes/javax/swing/text/Highlighter.java b/src/java.desktop/share/classes/javax/swing/text/Highlighter.java index 10243f10cdd9b34d9e2e6a7c907bee56f0ccbd15..7913e47b948c28e232e89975be00d0b798948fc0 100644 --- a/src/java.desktop/share/classes/javax/swing/text/Highlighter.java +++ b/src/java.desktop/share/classes/javax/swing/text/Highlighter.java @@ -70,7 +70,7 @@ public interface Highlighter { * @param p1 the end of the range >= p0 * @param p the painter to use for the actual highlighting * @return an object that refers to the highlight - * @exception BadLocationException for an invalid range specification + * @throws BadLocationException for an invalid range specification */ public Object addHighlight(int p0, int p1, HighlightPainter p) throws BadLocationException; @@ -95,7 +95,7 @@ public interface Highlighter { * @param tag which highlight to change * @param p0 the beginning of the range >= 0 * @param p1 the end of the range >= p0 - * @exception BadLocationException for an invalid range specification + * @throws BadLocationException for an invalid range specification */ public void changeHighlight(Object tag, int p0, int p1) throws BadLocationException; diff --git a/src/java.desktop/share/classes/javax/swing/text/IconView.java b/src/java.desktop/share/classes/javax/swing/text/IconView.java index c908e973753cc385e1c8f2ba0c4b406a95a8f4e2..76cb653c9ae0d14484400b1c99dbfb46ac5f602b 100644 --- a/src/java.desktop/share/classes/javax/swing/text/IconView.java +++ b/src/java.desktop/share/classes/javax/swing/text/IconView.java @@ -81,7 +81,7 @@ public class IconView extends View { * Typically the view is told to render into the span * that is returned, although there is no guarantee. * The parent may choose to resize or break the view. - * @exception IllegalArgumentException for an invalid axis + * @throws IllegalArgumentException for an invalid axis */ public float getPreferredSpan(int axis) { switch (axis) { @@ -123,7 +123,7 @@ public class IconView extends View { * @param pos the position to convert >= 0 * @param a the allocated region to render into * @return the bounding box of the given position - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see View#modelToView */ diff --git a/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java b/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java index cbdd308cc84b81dc0b516a9da0ad7d9d25e5105c..d618dc6a2a1989db5a22684e4d6e99340980c433 100644 --- a/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java +++ b/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java @@ -672,7 +672,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * component's {@code TransferHandler}. * * @param b whether or not to enable automatic drag handling - * @exception HeadlessException if + * @throws HeadlessException if * b is true and * GraphicsEnvironment.isHeadless() * returns true @@ -1358,7 +1358,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * @param offs the offset ≥ 0 * @param len the length ≥ 0 * @return the text - * @exception BadLocationException if the offset or length are invalid + * @throws BadLocationException if the offset or length are invalid */ public String getText(int offs, int len) throws BadLocationException { return getDocument().getText(offs, len); @@ -1376,7 +1376,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * @return the coordinates as a rectangle, with (r.x, r.y) as the location * in the coordinate system, or null if the component does * not yet have a positive size. - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see TextUI#modelToView * @@ -1400,7 +1400,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * @return the coordinates as a rectangle, with (r.x, r.y) as the location * in the coordinate system, or null if the component does * not yet have a positive size. - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see TextUI#modelToView2D * @@ -1545,7 +1545,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * an exception is thrown. * * @param pos the position - * @exception IllegalArgumentException if the value supplied + * @throws IllegalArgumentException if the value supplied * for position is less than zero or greater * than the component's text length * @see #setCaretPosition @@ -1617,7 +1617,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * of documents (such as html for example) might be * able to make use of this information; if non-null, * it is added as a property of the document - * @exception IOException as thrown by the stream being + * @throws IOException as thrown by the stream being * used to initialize * @see EditorKit#createDefaultDocument * @see #setDocument @@ -1643,7 +1643,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * text. * * @param out the output stream - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ public void write(Writer out) throws IOException { Document doc = getDocument(); @@ -1672,7 +1672,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * an exception is thrown. * * @param position the position - * @exception IllegalArgumentException if the value supplied + * @throws IllegalArgumentException if the value supplied * for position is less than zero or greater * than the component's text length */ @@ -1743,7 +1743,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * use DocumentListener. * * @return the text - * @exception NullPointerException if the document is null + * @throws NullPointerException if the document is null * @see #setText */ public String getText() { @@ -1763,7 +1763,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * null or the document empty, returns null. * * @return the text - * @exception IllegalArgumentException if the selection doesn't + * @throws IllegalArgumentException if the selection doesn't * have a valid mapping into the document for some reason * @see #setText */ @@ -2013,7 +2013,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * @param direction less than zero to scroll up/left, greater than * zero for down/right * @return the "unit" increment for scrolling in the specified direction - * @exception IllegalArgumentException for an invalid orientation + * @throws IllegalArgumentException for an invalid orientation * @see JScrollBar#setUnitIncrement */ public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { @@ -2043,7 +2043,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * @param direction less than zero to scroll up/left, greater than zero * for down/right * @return the "block" increment for scrolling in the specified direction - * @exception IllegalArgumentException for an invalid orientation + * @throws IllegalArgumentException for an invalid orientation * @see JScrollBar#setBlockIncrement */ public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) { diff --git a/src/java.desktop/share/classes/javax/swing/text/NavigationFilter.java b/src/java.desktop/share/classes/javax/swing/text/NavigationFilter.java index 648625e8974f7b8e832412561aa4e99226105caa..a7d85a71e02d130cb67b4508862c0f1bccd1a22e 100644 --- a/src/java.desktop/share/classes/javax/swing/text/NavigationFilter.java +++ b/src/java.desktop/share/classes/javax/swing/text/NavigationFilter.java @@ -105,8 +105,8 @@ public class NavigationFilter { * @param biasRet Used to return resulting Bias of next position * @return the location within the model that best represents the next * location visual position - * @exception BadLocationException for a bad location within a document model - * @exception IllegalArgumentException if direction + * @throws BadLocationException for a bad location within a document model + * @throws IllegalArgumentException if direction * doesn't have one of the legal values above */ public int getNextVisualPositionFrom(JTextComponent text, int pos, diff --git a/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java b/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java index f8d0e390cb2a84e9c1f0042dcf213a8d70ddb80a..e24583af13b140a8ec5557169a34161549e21053 100644 --- a/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java +++ b/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java @@ -876,7 +876,7 @@ public class ParagraphView extends FlowView implements TabExpander { * @param pos the position to convert * @param a the allocated region to render into * @return the bounding box of the given position - * @exception BadLocationException if the given position does not represent a + * @throws BadLocationException if the given position does not represent a * valid location in the associated document * @see View#modelToView */ diff --git a/src/java.desktop/share/classes/javax/swing/text/PasswordView.java b/src/java.desktop/share/classes/javax/swing/text/PasswordView.java index 38bb0eec13ea1c1f0bf5daeb926ea454e192c0ca..bdf8d5cdfe64c6aedb7c7b03cdb7dc1fe04fc71f 100644 --- a/src/java.desktop/share/classes/javax/swing/text/PasswordView.java +++ b/src/java.desktop/share/classes/javax/swing/text/PasswordView.java @@ -61,7 +61,7 @@ public class PasswordView extends FieldView { * @param p0 the starting offset in the model >= 0 * @param p1 the ending offset in the model >= p0 * @return the X location of the end of the range >= 0 - * @exception BadLocationException if p0 or p1 are out of range + * @throws BadLocationException if p0 or p1 are out of range * * @deprecated replaced by * {@link #drawUnselectedText(Graphics2D, float, float, int, int)} @@ -131,7 +131,7 @@ public class PasswordView extends FieldView { * @param p0 the starting offset in the model >= 0 * @param p1 the ending offset in the model >= p0 * @return the X location of the end of the range >= 0 - * @exception BadLocationException if p0 or p1 are out of range + * @throws BadLocationException if p0 or p1 are out of range * * @deprecated replaced by * {@link #drawSelectedText(Graphics2D, float, float, int, int)} @@ -240,7 +240,7 @@ public class PasswordView extends FieldView { * @param pos the position to convert >= 0 * @param a the allocated region to render into * @return the bounding box of the given position - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see View#modelToView */ diff --git a/src/java.desktop/share/classes/javax/swing/text/PlainDocument.java b/src/java.desktop/share/classes/javax/swing/text/PlainDocument.java index cd397d12a684b17707be2299a5c96f10d5a5d5d9..ad6a0bdf2d3e9b7448830fbcd979569db8bd2792 100644 --- a/src/java.desktop/share/classes/javax/swing/text/PlainDocument.java +++ b/src/java.desktop/share/classes/javax/swing/text/PlainDocument.java @@ -107,7 +107,7 @@ public class PlainDocument extends AbstractDocument { * @param offs the starting offset >= 0 * @param str the string to insert; does nothing with null/empty strings * @param a the attributes for the inserted content - * @exception BadLocationException the given insert position is not a valid + * @throws BadLocationException the given insert position is not a valid * position within the document * @see Document#insertString */ diff --git a/src/java.desktop/share/classes/javax/swing/text/PlainView.java b/src/java.desktop/share/classes/javax/swing/text/PlainView.java index 725dec9bb7dd783bb356b2f7392778638cc33693..0c245196d995420f2b8dd0cb786374ba3822d889 100644 --- a/src/java.desktop/share/classes/javax/swing/text/PlainView.java +++ b/src/java.desktop/share/classes/javax/swing/text/PlainView.java @@ -179,7 +179,7 @@ public class PlainView extends View implements TabExpander { * @param p0 the beginning position in the model >= 0 * @param p1 the ending position in the model >= 0 * @return the X location of the end of the range >= 0 - * @exception BadLocationException if the range is invalid + * @throws BadLocationException if the range is invalid * * @deprecated replaced by * {@link #drawUnselectedText(Graphics2D, float, float, int, int)} @@ -224,7 +224,7 @@ public class PlainView extends View implements TabExpander { * @param p0 the beginning position in the model {@code >= 0} * @param p1 the ending position in the model {@code >= 0} * @return the X location of the end of the range {@code >= 0} - * @exception BadLocationException if the range is invalid + * @throws BadLocationException if the range is invalid * * @since 9 */ @@ -245,7 +245,7 @@ public class PlainView extends View implements TabExpander { * @param p0 the beginning position in the model >= 0 * @param p1 the ending position in the model >= 0 * @return the location of the end of the range - * @exception BadLocationException if the range is invalid + * @throws BadLocationException if the range is invalid * * @deprecated replaced by * {@link #drawSelectedText(Graphics2D, float, float, int, int)} @@ -294,7 +294,7 @@ public class PlainView extends View implements TabExpander { * @param p0 the beginning position in the model {@code >= 0} * @param p1 the ending position in the model {@code >= 0} * @return the location of the end of the range - * @exception BadLocationException if the range is invalid + * @throws BadLocationException if the range is invalid * * @since 9 */ @@ -351,7 +351,7 @@ public class PlainView extends View implements TabExpander { * Typically the view is told to render into the span * that is returned, although there is no guarantee. * The parent may choose to resize or break the view. - * @exception IllegalArgumentException for an invalid axis + * @throws IllegalArgumentException for an invalid axis */ public float getPreferredSpan(int axis) { updateMetrics(); @@ -468,7 +468,7 @@ public class PlainView extends View implements TabExpander { * @param pos the position to convert >= 0 * @param a the allocated region to render into * @return the bounding box of the given position - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see View#modelToView */ diff --git a/src/java.desktop/share/classes/javax/swing/text/StringContent.java b/src/java.desktop/share/classes/javax/swing/text/StringContent.java index 7f154df38edffce7203667f93ff9980c0c6268ba..04bd4d7e0b464880b01f3857a57fd6c7c1cb6a8b 100644 --- a/src/java.desktop/share/classes/javax/swing/text/StringContent.java +++ b/src/java.desktop/share/classes/javax/swing/text/StringContent.java @@ -90,7 +90,7 @@ public final class StringContent implements AbstractDocument.Content, Serializab * @param where the starting position >= 0 && < length() * @param str the non-null string to insert * @return an UndoableEdit object for undoing - * @exception BadLocationException if the specified position is invalid + * @throws BadLocationException if the specified position is invalid * @see AbstractDocument.Content#insertString */ public UndoableEdit insertString(int where, String str) throws BadLocationException { @@ -111,7 +111,7 @@ public final class StringContent implements AbstractDocument.Content, Serializab * @param where the starting position >= 0 * @param nitems the number of characters to remove >= 0 * @return an UndoableEdit object for undoing - * @exception BadLocationException if the specified position is invalid + * @throws BadLocationException if the specified position is invalid * @see AbstractDocument.Content#remove */ public UndoableEdit remove(int where, int nitems) throws BadLocationException { @@ -134,7 +134,7 @@ public final class StringContent implements AbstractDocument.Content, Serializab * @param where the starting position >= 0 * @param len the length to retrieve >= 0 * @return a string representing the content; may be empty - * @exception BadLocationException if the specified position is invalid + * @throws BadLocationException if the specified position is invalid * @see AbstractDocument.Content#getString */ public String getString(int where, int len) throws BadLocationException { @@ -150,7 +150,7 @@ public final class StringContent implements AbstractDocument.Content, Serializab * @param where the starting position >= 0 * @param len the number of characters to retrieve >= 0 * @param chars the Segment object to return the characters in - * @exception BadLocationException if the specified position is invalid + * @throws BadLocationException if the specified position is invalid * @see AbstractDocument.Content#getChars */ public void getChars(int where, int len, Segment chars) throws BadLocationException { @@ -168,7 +168,7 @@ public final class StringContent implements AbstractDocument.Content, Serializab * * @param offset the offset to create a position for >= 0 * @return the position - * @exception BadLocationException if the specified position is invalid + * @throws BadLocationException if the specified position is invalid */ public Position createPosition(int offset) throws BadLocationException { // some small documents won't have any sticky positions diff --git a/src/java.desktop/share/classes/javax/swing/text/StyleContext.java b/src/java.desktop/share/classes/javax/swing/text/StyleContext.java index 9e01aecd3fb6dc3c5cef3abdfdebf0368cf9c77f..70da1356b99557b11cb9a83540ee0c45b144962c 100644 --- a/src/java.desktop/share/classes/javax/swing/text/StyleContext.java +++ b/src/java.desktop/share/classes/javax/swing/text/StyleContext.java @@ -579,7 +579,7 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon * Context-specific handling of writing out attributes * @param out the output stream * @param a the attribute set - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ public void writeAttributes(ObjectOutputStream out, AttributeSet a) throws IOException { @@ -591,9 +591,9 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon * @param in the object stream to read the attribute data from. * @param a the attribute set to place the attribute * definitions in. - * @exception ClassNotFoundException passed upward if encountered + * @throws ClassNotFoundException passed upward if encountered * when reading the object stream. - * @exception IOException passed upward if encountered when + * @throws IOException passed upward if encountered when * reading the object stream. */ public void readAttributes(ObjectInputStream in, @@ -613,7 +613,7 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon * * @param out the output stream * @param a the attribute set - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ public static void writeAttributeSet(ObjectOutputStream out, AttributeSet a) throws IOException { @@ -660,9 +660,9 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon * @param in the object stream to read the attribute data from. * @param a the attribute set to place the attribute * definitions in. - * @exception ClassNotFoundException passed upward if encountered + * @throws ClassNotFoundException passed upward if encountered * when reading the object stream. - * @exception IOException passed upward if encountered when + * @throws IOException passed upward if encountered when * reading the object stream. */ public static void readAttributeSet(ObjectInputStream in, @@ -1077,7 +1077,7 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon * Returns the next element of this enumeration. * * @return the next element of this enumeration. - * @exception NoSuchElementException if no more elements exist. + * @throws NoSuchElementException if no more elements exist. * @since 1.0 */ public Object nextElement() { diff --git a/src/java.desktop/share/classes/javax/swing/text/StyledEditorKit.java b/src/java.desktop/share/classes/javax/swing/text/StyledEditorKit.java index 00ad982cbf45d939dd91fc37146f1018b8eee6b5..a4984efce6c0f609443a661a1c1ed82923def864 100644 --- a/src/java.desktop/share/classes/javax/swing/text/StyledEditorKit.java +++ b/src/java.desktop/share/classes/javax/swing/text/StyledEditorKit.java @@ -411,7 +411,7 @@ public class StyledEditorKit extends DefaultEditorKit { * * @param e the editor * @return the document - * @exception IllegalArgumentException for the wrong document type + * @throws IllegalArgumentException for the wrong document type */ protected final StyledDocument getStyledDocument(JEditorPane e) { Document d = e.getDocument(); @@ -426,7 +426,7 @@ public class StyledEditorKit extends DefaultEditorKit { * * @param e the editor pane * @return the kit - * @exception IllegalArgumentException for the wrong document type + * @throws IllegalArgumentException for the wrong document type */ protected final StyledEditorKit getStyledEditorKit(JEditorPane e) { EditorKit k = e.getEditorKit(); diff --git a/src/java.desktop/share/classes/javax/swing/text/TableView.java b/src/java.desktop/share/classes/javax/swing/text/TableView.java index bd1c677ffaec7d48d74ba615dc23f52490775e0f..d18bd5a93db49bd3db24cb1b0e69c4da2836edd5 100644 --- a/src/java.desktop/share/classes/javax/swing/text/TableView.java +++ b/src/java.desktop/share/classes/javax/swing/text/TableView.java @@ -805,7 +805,7 @@ public abstract class TableView extends BoxView { * * @param axis may be either View.X_AXIS or View.Y_AXIS * @return the resize weight - * @exception IllegalArgumentException for an invalid axis + * @throws IllegalArgumentException for an invalid axis */ public int getResizeWeight(int axis) { return 1; diff --git a/src/java.desktop/share/classes/javax/swing/text/Utilities.java b/src/java.desktop/share/classes/javax/swing/text/Utilities.java index ae93b5a40b5f01dc1a79ec277bcf0cfbfc9a27c8..62f323f076aa5ac23eb7481f07935b43e940bb96 100644 --- a/src/java.desktop/share/classes/javax/swing/text/Utilities.java +++ b/src/java.desktop/share/classes/javax/swing/text/Utilities.java @@ -683,7 +683,7 @@ public class Utilities { * @param offs the offset in the document >= 0 * @return the position >= 0 if the request can be computed, otherwise * a value of -1 will be returned. - * @exception BadLocationException if the offset is out of range + * @throws BadLocationException if the offset is out of range */ @SuppressWarnings("deprecation") public static final int getRowStart(JTextComponent c, int offs) throws BadLocationException { @@ -714,7 +714,7 @@ public class Utilities { * @param offs the offset in the document >= 0 * @return the position >= 0 if the request can be computed, otherwise * a value of -1 will be returned. - * @exception BadLocationException if the offset is out of range + * @throws BadLocationException if the offset is out of range */ @SuppressWarnings("deprecation") public static final int getRowEnd(JTextComponent c, int offs) throws BadLocationException { @@ -747,7 +747,7 @@ public class Utilities { * @param x the X coordinate >= 0 * @return the position >= 0 if the request can be computed, otherwise * a value of -1 will be returned. - * @exception BadLocationException if the offset is out of range + * @throws BadLocationException if the offset is out of range * * @deprecated replaced by * {@link #getPositionAbove(JTextComponent, int, float)} @@ -802,7 +802,7 @@ public class Utilities { * @param x the X coordinate {@code >= 0} * @return the position {@code >= 0} if the request can be computed, otherwise * a value of -1 will be returned. - * @exception BadLocationException if the offset is out of range + * @throws BadLocationException if the offset is out of range * * @since 9 */ @@ -822,7 +822,7 @@ public class Utilities { * @param x the X coordinate >= 0 * @return the position >= 0 if the request can be computed, otherwise * a value of -1 will be returned. - * @exception BadLocationException if the offset is out of range + * @throws BadLocationException if the offset is out of range * * @deprecated replaced by * {@link #getPositionBelow(JTextComponent, int, float)} @@ -878,7 +878,7 @@ public class Utilities { * @param x the X coordinate {@code >= 0} * @return the position {@code >= 0} if the request can be computed, otherwise * a value of -1 will be returned. - * @exception BadLocationException if the offset is out of range + * @throws BadLocationException if the offset is out of range * * @since 9 */ @@ -894,7 +894,7 @@ public class Utilities { * @param c the editor * @param offs the offset in the document >= 0 * @return the location in the model of the word start >= 0 - * @exception BadLocationException if the offset is out of range + * @throws BadLocationException if the offset is out of range */ public static final int getWordStart(JTextComponent c, int offs) throws BadLocationException { Document doc = c.getDocument(); @@ -928,7 +928,7 @@ public class Utilities { * @param c the editor * @param offs the offset in the document >= 0 * @return the location in the model of the word end >= 0 - * @exception BadLocationException if the offset is out of range + * @throws BadLocationException if the offset is out of range */ public static final int getWordEnd(JTextComponent c, int offs) throws BadLocationException { Document doc = c.getDocument(); @@ -961,7 +961,7 @@ public class Utilities { * @param c the editor * @param offs the offset in the document >= 0 * @return the location in the model of the word start >= 0 - * @exception BadLocationException if the offset is out of range + * @throws BadLocationException if the offset is out of range */ public static final int getNextWord(JTextComponent c, int offs) throws BadLocationException { int nextWord; @@ -1039,7 +1039,7 @@ public class Utilities { * @param c the editor * @param offs the offset in the document >= 0 * @return the location in the model of the word start >= 0 - * @exception BadLocationException if the offset is out of range + * @throws BadLocationException if the offset is out of range */ public static final int getPreviousWord(JTextComponent c, int offs) throws BadLocationException { int prevWord; @@ -1271,8 +1271,8 @@ public class Utilities { * @param biasRet an array contain the bias that was checked * @return the location within the model that best represents the next * location visual position - * @exception BadLocationException - * @exception IllegalArgumentException if direction is invalid + * @throws BadLocationException + * @throws IllegalArgumentException if direction is invalid */ static int getNextVisualPositionFrom(View v, int pos, Position.Bias b, Shape alloc, int direction, diff --git a/src/java.desktop/share/classes/javax/swing/text/View.java b/src/java.desktop/share/classes/javax/swing/text/View.java index a3ad927e3a8e5185d471f53677be8715f96a1e43..eb10efb0e83fb36f933dd46c20a72b74da601604 100644 --- a/src/java.desktop/share/classes/javax/swing/text/View.java +++ b/src/java.desktop/share/classes/javax/swing/text/View.java @@ -495,9 +495,9 @@ public abstract class View implements SwingConstants { * @param biasRet the returned bias * @return the location within the model that best represents the next * location visual position - * @exception BadLocationException the given position is not a valid + * @throws BadLocationException the given position is not a valid * position within the document - * @exception IllegalArgumentException if direction + * @throws IllegalArgumentException if direction * doesn't have one of the legal values above */ @SuppressWarnings("deprecation") @@ -585,9 +585,9 @@ public abstract class View implements SwingConstants { * * @return the bounding box, in view coordinate space, * of the character at the specified position - * @exception BadLocationException if the specified position does + * @throws BadLocationException if the specified position does * not represent a valid location in the associated document - * @exception IllegalArgumentException if b is not one of the + * @throws IllegalArgumentException if b is not one of the * legal Position.Bias values listed above * @see View#viewToModel */ @@ -615,9 +615,9 @@ public abstract class View implements SwingConstants { * @param a the area of the view, which encompasses the requested region * @return the bounding box which is a union of the region specified * by the first and last character positions - * @exception BadLocationException if the given position does + * @throws BadLocationException if the given position does * not represent a valid location in the associated document - * @exception IllegalArgumentException if b0 or + * @throws IllegalArgumentException if b0 or * b1 are not one of the * legal Position.Bias values listed above * @see View#viewToModel @@ -1337,7 +1337,7 @@ public abstract class View implements SwingConstants { * @param pos the position to convert >= 0 * @param a the allocated region in which to render * @return the bounding box of the given position is returned - * @exception BadLocationException if the given position does + * @throws BadLocationException if the given position does * not represent a valid location in the associated document * @see View#modelToView * @deprecated diff --git a/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java b/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java index b229fa69f9f88c1ddeccf9a9508a4b3cc79104ca..d3587c8b40b4bd56b40dc98cb399ac8f6d9e8a50 100644 --- a/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java +++ b/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java @@ -207,7 +207,7 @@ public class WrappedPlainView extends BoxView implements TabExpander { * @param p0 the beginning position in the model >= 0 * @param p1 the ending position in the model >= p0 * @return the X location of the end of the range >= 0 - * @exception BadLocationException if the range is invalid + * @throws BadLocationException if the range is invalid * * @deprecated replaced by * {@link #drawUnselectedText(Graphics2D, float, float, int, int)} @@ -252,7 +252,7 @@ public class WrappedPlainView extends BoxView implements TabExpander { * @param p0 the beginning position in the model >= 0 * @param p1 the ending position in the model >= p0 * @return the X location of the end of the range >= 0 - * @exception BadLocationException if the range is invalid + * @throws BadLocationException if the range is invalid * * @since 9 */ @@ -272,7 +272,7 @@ public class WrappedPlainView extends BoxView implements TabExpander { * @param p0 the beginning position in the model >= 0 * @param p1 the ending position in the model >= p0 * @return the location of the end of the range. - * @exception BadLocationException if the range is invalid + * @throws BadLocationException if the range is invalid * * @deprecated replaced by * {@link #drawSelectedText(Graphics2D, float, float, int, int)} @@ -320,7 +320,7 @@ public class WrappedPlainView extends BoxView implements TabExpander { * @param p0 the beginning position in the model >= 0 * @param p1 the ending position in the model >= p0 * @return the location of the end of the range. - * @exception BadLocationException if the range is invalid + * @throws BadLocationException if the range is invalid * * @since 9 */ @@ -748,7 +748,7 @@ public class WrappedPlainView extends BoxView implements TabExpander { * @param pos the position to convert * @param a the allocated region to render into * @return the bounding box of the given position is returned - * @exception BadLocationException if the given position does not represent a + * @throws BadLocationException if the given position does not represent a * valid location in the associated document * @see View#modelToView */ diff --git a/src/java.desktop/share/classes/javax/swing/text/ZoneView.java b/src/java.desktop/share/classes/javax/swing/text/ZoneView.java index 1deb927fb6e5fdc558c75710c8a6caef5cff7598..595eafc336bd9ec71cb7df0da0f6c118665a4d2b 100644 --- a/src/java.desktop/share/classes/javax/swing/text/ZoneView.java +++ b/src/java.desktop/share/classes/javax/swing/text/ZoneView.java @@ -134,7 +134,7 @@ public class ZoneView extends BoxView { * * @param mzl the desired maximum number of zones * to be actively loaded, must be greater than 0 - * @exception IllegalArgumentException if mzl is < 1 + * @throws IllegalArgumentException if mzl is < 1 */ public void setMaxZonesLoaded(int mzl) { if (mzl < 1) { @@ -579,7 +579,7 @@ public class ZoneView extends BoxView { * @param pos the position to convert * @param a the allocated region to render into * @return the bounding box of the given position - * @exception BadLocationException if the given position does not represent a + * @throws BadLocationException if the given position does not represent a * valid location in the associated document * @see View#modelToView */ diff --git a/src/java.desktop/share/classes/javax/swing/text/html/AccessibleHTML.java b/src/java.desktop/share/classes/javax/swing/text/html/AccessibleHTML.java index 12cd5a74a721795e3814091d2bdd31621d3491e9..77623a541e00d3aa059c2d2483ae9765d1e95dbf 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/AccessibleHTML.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/AccessibleHTML.java @@ -384,7 +384,7 @@ class AccessibleHTML implements Accessible { * @return this component's locale. If this component does not have * a locale, the locale of its parent is returned. * - * @exception IllegalComponentStateException + * @throws IllegalComponentStateException * If the Component does not have its own locale and has not yet been * added to a containment hierarchy such that the locale can be * determined from the containing parent. diff --git a/src/java.desktop/share/classes/javax/swing/text/html/BlockView.java b/src/java.desktop/share/classes/javax/swing/text/html/BlockView.java index 524a57d93c1ee47ddfd762d46b56effeff90459f..dc2a5e22477128b73508d6f9de47acbfc1b9cd07 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/BlockView.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/BlockView.java @@ -300,7 +300,7 @@ public class BlockView extends BoxView { * * @param axis may be either X_AXIS or Y_AXIS * @return the weight - * @exception IllegalArgumentException for an invalid axis + * @throws IllegalArgumentException for an invalid axis */ public int getResizeWeight(int axis) { switch (axis) { @@ -356,7 +356,7 @@ public class BlockView extends BoxView { * typically the view is told to render into the span * that is returned, although there is no guarantee; * the parent may choose to resize or break the view - * @exception IllegalArgumentException for an invalid axis type + * @throws IllegalArgumentException for an invalid axis type */ public float getPreferredSpan(int axis) { return super.getPreferredSpan(axis); @@ -372,7 +372,7 @@ public class BlockView extends BoxView { * typically the view is told to render into the span * that is returned, although there is no guarantee; * the parent may choose to resize or break the view - * @exception IllegalArgumentException for an invalid axis type + * @throws IllegalArgumentException for an invalid axis type */ public float getMinimumSpan(int axis) { return super.getMinimumSpan(axis); @@ -388,7 +388,7 @@ public class BlockView extends BoxView { * typically the view is told to render into the span * that is returned, although there is no guarantee; * the parent may choose to resize or break the view - * @exception IllegalArgumentException for an invalid axis type + * @throws IllegalArgumentException for an invalid axis type */ public float getMaximumSpan(int axis) { return super.getMaximumSpan(axis); diff --git a/src/java.desktop/share/classes/javax/swing/text/html/FormView.java b/src/java.desktop/share/classes/javax/swing/text/html/FormView.java index 467651a9d98d2071c3aa6c5165eb92d3e45f800d..b0855832a1d3924b9299b1afaec5c1fc8b4ac570 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/FormView.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/FormView.java @@ -380,7 +380,7 @@ public class FormView extends ComponentView implements ActionListener { * Typically the view is told to render into the span * that is returned, although there is no guarantee. * The parent may choose to resize or break the view. - * @exception IllegalArgumentException for an invalid axis + * @throws IllegalArgumentException for an invalid axis */ public float getMaximumSpan(int axis) { switch (axis) { diff --git a/src/java.desktop/share/classes/javax/swing/text/html/HRuleView.java b/src/java.desktop/share/classes/javax/swing/text/html/HRuleView.java index 885f0b7f2c9d63411d4b0210a5d22c957531db11..29a7fce803df876197d20c091f96452bc1163b9d 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/HRuleView.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/HRuleView.java @@ -245,7 +245,7 @@ class HRuleView extends View { * @param pos the position to convert * @param a the allocated region to render into * @return the bounding box of the given position - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document * @see View#modelToView */ diff --git a/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java b/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java index 46d84e3cadcc31da718c032f2d172a431dc3501a..f4bbb772e78c70d50035a5b751e156abae21226a 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java @@ -427,7 +427,7 @@ public class HTMLDocument extends DefaultStyledDocument { * * @param offset the starting offset * @param data the element data - * @exception BadLocationException if the given position does not + * @throws BadLocationException if the given position does not * represent a valid location in the associated document. */ protected void insert(int offset, ElementSpec[] data) throws BadLocationException { diff --git a/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java b/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java index 8d78819b0e8d4e169bf6894804976c50fcf784e2..a5c1067f03f1f4fb25918668b6a2302d5bb77fb7 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java @@ -298,10 +298,10 @@ public class HTMLEditorKit extends StyledEditorKit implements Accessible { * @param doc the destination for the insertion * @param pos the location in the document to place the * content - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document - * @exception RuntimeException (will eventually be a BadLocationException) + * @throws RuntimeException (will eventually be a BadLocationException) * if pos is invalid */ public void read(Reader in, Document doc, int pos) throws IOException, BadLocationException { @@ -337,7 +337,7 @@ public class HTMLEditorKit extends StyledEditorKit implements Accessible { * * @throws BadLocationException if {@code offset} is invalid * @throws IOException on I/O error - * @exception RuntimeException (will eventually be a BadLocationException) + * @throws RuntimeException (will eventually be a BadLocationException) * if pos is invalid */ public void insertHTML(HTMLDocument doc, int offset, String html, @@ -367,8 +367,8 @@ public class HTMLEditorKit extends StyledEditorKit implements Accessible { * @param pos the location in the document to fetch the * content * @param len the amount to write out - * @exception IOException on any I/O error - * @exception BadLocationException if {@code pos} represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if {@code pos} represents an invalid * location within the document */ public void write(Writer out, Document doc, int pos, int len) diff --git a/src/java.desktop/share/classes/javax/swing/text/html/HTMLWriter.java b/src/java.desktop/share/classes/javax/swing/text/html/HTMLWriter.java index c11214d71e3bce696dcef6900888ad0eabf6ce92..270e46153098e93549e69cb4006b2dd97c5a759c 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/HTMLWriter.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/HTMLWriter.java @@ -125,8 +125,8 @@ public class HTMLWriter extends AbstractWriter { * Element tree and controls the writing out of * all the tags and its attributes. * - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. * */ @@ -248,7 +248,7 @@ public class HTMLWriter extends AbstractWriter { * HTML.Attribute.ENDTAG. * * @param attr an AttributeSet - * @exception IOException on any I/O error + * @throws IOException on any I/O error * */ protected void writeAttributes(AttributeSet attr) throws IOException { @@ -273,8 +273,8 @@ public class HTMLWriter extends AbstractWriter { * corresponding end tag). * * @param elem an Element - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ protected void emptyTag(Element elem) throws BadLocationException, IOException { @@ -451,8 +451,8 @@ public class HTMLWriter extends AbstractWriter { * element. * * @param attr an AttributeSet - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ protected void textAreaContent(AttributeSet attr) throws BadLocationException, IOException { @@ -485,8 +485,8 @@ public class HTMLWriter extends AbstractWriter { * out. * * @param elem an Element - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ protected void text(Element elem) throws BadLocationException, IOException { @@ -523,7 +523,7 @@ public class HTMLWriter extends AbstractWriter { * Writes out the content of the SELECT form element. * * @param attr the AttributeSet associated with the form element - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void selectContent(AttributeSet attr) throws IOException { Object model = attr.getAttribute(StyleConstants.ModelAttribute); @@ -552,7 +552,7 @@ public class HTMLWriter extends AbstractWriter { /** * Writes out the content of the Option form element. * @param option an Option - * @exception IOException on any I/O error + * @throws IOException on any I/O error * */ protected void writeOption(Option option) throws IOException { @@ -580,7 +580,7 @@ public class HTMLWriter extends AbstractWriter { * Writes out an end tag for the element. * * @param elem an Element - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void endTag(Element elem) throws IOException { if (synthesizedElement(elem)) { @@ -615,8 +615,8 @@ public class HTMLWriter extends AbstractWriter { * Writes out comments. * * @param elem an Element - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ protected void comment(Element elem) throws BadLocationException, IOException { @@ -637,8 +637,8 @@ public class HTMLWriter extends AbstractWriter { * Writes out comment string. * * @param string the comment - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ void writeComment(String string) throws IOException { @@ -712,7 +712,7 @@ public class HTMLWriter extends AbstractWriter { * written out. * * @param attr a set of attributes - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeEmbeddedTags(AttributeSet attr) throws IOException { @@ -767,7 +767,7 @@ public class HTMLWriter extends AbstractWriter { * end tag is written out. * * @param attr a set of attributes - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void closeOutUnwantedEmbeddedTags(AttributeSet attr) throws IOException { diff --git a/src/java.desktop/share/classes/javax/swing/text/html/ImageView.java b/src/java.desktop/share/classes/javax/swing/text/html/ImageView.java index 6f0a7cbdff41431d09ea34caa4183ed216fb074a..7d2583509c16a4be9fd0c2001c70e67c3ef43af3 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/ImageView.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/ImageView.java @@ -557,7 +557,7 @@ public class ImageView extends View { * @param pos the position to convert * @param a the allocated region to render into * @return the bounding box of the given position - * @exception BadLocationException if the given position does not represent a + * @throws BadLocationException if the given position does not represent a * valid location in the associated document * @see View#modelToView */ diff --git a/src/java.desktop/share/classes/javax/swing/text/html/MinimalHTMLWriter.java b/src/java.desktop/share/classes/javax/swing/text/html/MinimalHTMLWriter.java index caa8dd07051938e66e38691ca7fd785fae5d788e..712cb350ee95d5e3036c3bf5963085c2078740e0 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/MinimalHTMLWriter.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/MinimalHTMLWriter.java @@ -128,8 +128,8 @@ public class MinimalHTMLWriter extends AbstractWriter { * Generates HTML output * from a StyledDocument. * - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. * */ @@ -152,7 +152,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * The attribute name and value are separated by a colon. * Each pair is separated by a semicolon. * - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeAttributes(AttributeSet attr) throws IOException { Enumeration attributeNames = attr.getAttributeNames(); @@ -178,7 +178,7 @@ public class MinimalHTMLWriter extends AbstractWriter { /** * Writes out text. * - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void text(Element elem) throws IOException, BadLocationException { String contentStr = getText(elem); @@ -196,7 +196,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * indented. Also increments the indent level. * * @param tag a start tag - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeStartTag(String tag) throws IOException { indent(); @@ -211,7 +211,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * indented. Also decrements the indent level. * * @param endTag an end tag - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeEndTag(String endTag) throws IOException { decrIndent(); @@ -230,7 +230,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * document is viewable in applications/browsers * that do not support the tag. * - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeHeader() throws IOException { writeStartTag(""); @@ -248,7 +248,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * Writes out all the named styles as the * content of the <style> tag. * - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeStyles() throws IOException { /* @@ -338,7 +338,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * that all other tags that have been opened are * appropriately closed off. * - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeEndParagraph() throws IOException { writeEndMask(fontMask); @@ -359,7 +359,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * style. * * @param elem an element - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeStartParagraph(Element elem) throws IOException { AttributeSet attr = elem.getAttributes(); @@ -377,7 +377,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * elements. * * @param elem an element - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeLeaf(Element elem) throws IOException { indent(); @@ -434,8 +434,8 @@ public class MinimalHTMLWriter extends AbstractWriter { * * @param elem an element * @param needsIndenting indention will be added if {@code needsIndenting} is {@code true} - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ protected void writeContent(Element elem, boolean needsIndenting) @@ -457,7 +457,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * text based on its attribute settings. * * @param attr a set of attributes - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeHTMLTags(AttributeSet attr) throws IOException { @@ -522,7 +522,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * Writes out start tags <u>, <i>, and <b> based on * the mask settings. * - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ private void writeStartMask(int mask) throws IOException { if (mask != 0) { @@ -542,7 +542,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * Writes out end tags for <u>, <i>, and <b> based on * the mask settings. * - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ private void writeEndMask(int mask) throws IOException { if (mask != 0) { @@ -569,7 +569,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * attributes just like inline styles. * * @param attr a set of attributes - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void writeNonHTMLAttributes(AttributeSet attr) throws IOException { @@ -636,7 +636,7 @@ public class MinimalHTMLWriter extends AbstractWriter { *

    * Writes out an end tag for the <font> tag. * - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void endFontTag() throws IOException { write(NEWLINE); @@ -655,7 +655,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * new start tag. * * @param style a font style - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ protected void startFontTag(String style) throws IOException { boolean callIndent = false; @@ -676,7 +676,7 @@ public class MinimalHTMLWriter extends AbstractWriter { * any enclosing font tag before writing out a * new start tag. * - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ private void startSpanTag(String style) throws IOException { boolean callIndent = false; @@ -693,7 +693,7 @@ public class MinimalHTMLWriter extends AbstractWriter { /** * Writes out an end tag for the <span> tag. * - * @exception IOException on any I/O error + * @throws IOException on any I/O error */ private void endSpanTag() throws IOException { write(NEWLINE); diff --git a/src/java.desktop/share/classes/javax/swing/text/html/OptionListModel.java b/src/java.desktop/share/classes/javax/swing/text/html/OptionListModel.java index 2b84b54b3e162ddb924c985c7d2d63f5fb7b53d8..c7f0ff34a9bd1ff62f6b33197a7e26b20a04cf5c 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/OptionListModel.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/OptionListModel.java @@ -464,7 +464,7 @@ class OptionListModel extends DefaultListModel implements ListSelectionMod * listenerLists are not duplicated. * * @return a clone of the receiver - * @exception CloneNotSupportedException if the receiver does not + * @throws CloneNotSupportedException if the receiver does not * both (a) implement the Cloneable interface * and (b) define a clone method */ diff --git a/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java b/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java index 9ce35f47ee9eb420129ac6aef21a54da87209670..35002f9fff27e7887fa672a2bdfd8bc3b89bb9e4 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java @@ -1886,7 +1886,7 @@ public class StyleSheet extends StyleContext { * used to get the AttributeSet, and may be used to * resolve percentage arguments. * @return the inset needed for the margin, border and padding. - * @exception IllegalArgumentException for an invalid direction + * @throws IllegalArgumentException for an invalid direction */ public float getInset(int side, View v) { AttributeSet a = v.getAttributes(); diff --git a/src/java.desktop/share/classes/javax/swing/text/html/TableView.java b/src/java.desktop/share/classes/javax/swing/text/html/TableView.java index c088bf0eb9a773ed0b0a280d39402dc6d95da1db..11b383acd3187ed587cf97eea3a1351d8ddb6e4c 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/TableView.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/TableView.java @@ -1611,7 +1611,7 @@ import javax.swing.text.*; * * @param axis may be either View.X_AXIS or View.Y_AXIS * @return the resize weight - * @exception IllegalArgumentException for an invalid axis + * @throws IllegalArgumentException for an invalid axis */ public int getResizeWeight(int axis) { return 1; diff --git a/src/java.desktop/share/classes/javax/swing/text/rtf/RTFEditorKit.java b/src/java.desktop/share/classes/javax/swing/text/rtf/RTFEditorKit.java index 794c2cfee40b3b4dea5bac1ff444f6c6d76ff0bf..f841d9119f50924268f966eaf953e5243b90db1f 100644 --- a/src/java.desktop/share/classes/javax/swing/text/rtf/RTFEditorKit.java +++ b/src/java.desktop/share/classes/javax/swing/text/rtf/RTFEditorKit.java @@ -70,8 +70,8 @@ public class RTFEditorKit extends StyledEditorKit { * @param doc The destination for the insertion. * @param pos The location in the document to place the * content. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ public void read(InputStream in, Document doc, int pos) throws IOException, BadLocationException { @@ -97,8 +97,8 @@ public class RTFEditorKit extends StyledEditorKit { * @param pos The location in the document to fetch the * content. * @param len The amount to write out. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ public void write(OutputStream out, Document doc, int pos, int len) @@ -117,8 +117,8 @@ public class RTFEditorKit extends StyledEditorKit { * @param doc The destination for the insertion. * @param pos The location in the document to place the * content. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ public void read(Reader in, Document doc, int pos) @@ -143,8 +143,8 @@ public class RTFEditorKit extends StyledEditorKit { * @param pos The location in the document to fetch the * content. * @param len The amount to write out. - * @exception IOException on any I/O error - * @exception BadLocationException if pos represents an invalid + * @throws IOException on any I/O error + * @throws BadLocationException if pos represents an invalid * location within the document. */ public void write(Writer out, Document doc, int pos, int len) diff --git a/src/java.desktop/share/classes/javax/swing/tree/DefaultMutableTreeNode.java b/src/java.desktop/share/classes/javax/swing/tree/DefaultMutableTreeNode.java index 7735895502ecce78574ffbbf314c928975b9ec26..11efb12e7a288791f7b721e2c31b5f33319fdb5f 100644 --- a/src/java.desktop/share/classes/javax/swing/tree/DefaultMutableTreeNode.java +++ b/src/java.desktop/share/classes/javax/swing/tree/DefaultMutableTreeNode.java @@ -174,12 +174,12 @@ public class DefaultMutableTreeNode implements Cloneable, * @param newChild the MutableTreeNode to insert under this node * @param childIndex the index in this node's child array * where this node is to be inserted - * @exception ArrayIndexOutOfBoundsException if + * @throws ArrayIndexOutOfBoundsException if * childIndex is out of bounds - * @exception IllegalArgumentException if + * @throws IllegalArgumentException if * newChild is null or is an * ancestor of this node - * @exception IllegalStateException if this node does not allow + * @throws IllegalStateException if this node does not allow * children * @see #isNodeDescendant */ @@ -211,7 +211,7 @@ public class DefaultMutableTreeNode implements Cloneable, * * @param childIndex the index in this node's child array * of the child to remove - * @exception ArrayIndexOutOfBoundsException if + * @throws ArrayIndexOutOfBoundsException if * childIndex is out of bounds */ public void remove(int childIndex) { @@ -247,7 +247,7 @@ public class DefaultMutableTreeNode implements Cloneable, * Returns the child at the specified index in this node's child array. * * @param index an index into this node's child array - * @exception ArrayIndexOutOfBoundsException if index + * @throws ArrayIndexOutOfBoundsException if index * is out of bounds * @return the TreeNode in this node's child array at the specified index */ @@ -278,7 +278,7 @@ public class DefaultMutableTreeNode implements Cloneable, * where n is the number of children. * * @param aChild the TreeNode to search for among this node's children - * @exception IllegalArgumentException if aChild + * @throws IllegalArgumentException if aChild * is null * @return an int giving the index of the node in this node's child * array, or -1 if the specified node is a not @@ -382,7 +382,7 @@ public class DefaultMutableTreeNode implements Cloneable, * null parent. * * @param aChild a child of this node to remove - * @exception IllegalArgumentException if aChild + * @throws IllegalArgumentException if aChild * is null or is not a child of this node */ public void remove(MutableTreeNode aChild) { @@ -412,9 +412,9 @@ public class DefaultMutableTreeNode implements Cloneable, * * @see #insert * @param newChild node to add as a child of this node - * @exception IllegalArgumentException if newChild + * @throws IllegalArgumentException if newChild * is null - * @exception IllegalStateException if this node does not allow + * @throws IllegalStateException if this node does not allow * children */ public void add(MutableTreeNode newChild) { @@ -846,7 +846,7 @@ public class DefaultMutableTreeNode implements Cloneable, * @param ancestor the node to start enumeration from * @see #isNodeAncestor * @see #isNodeDescendant - * @exception IllegalArgumentException if ancestor is + * @throws IllegalArgumentException if ancestor is * not an ancestor of this node * @return an enumeration for following the path from an ancestor of * this node to this one @@ -890,7 +890,7 @@ public class DefaultMutableTreeNode implements Cloneable, * throws NoSuchElementException. * * @return the first child of this node - * @exception NoSuchElementException if this node has no children + * @throws NoSuchElementException if this node has no children */ public TreeNode getFirstChild() { if (getChildCount() == 0) { @@ -905,7 +905,7 @@ public class DefaultMutableTreeNode implements Cloneable, * throws NoSuchElementException. * * @return the last child of this node - * @exception NoSuchElementException if this node has no children + * @throws NoSuchElementException if this node has no children */ public TreeNode getLastChild() { if (getChildCount() == 0) { @@ -925,7 +925,7 @@ public class DefaultMutableTreeNode implements Cloneable, * * @param aChild the child node to look for next child after it * @see #children - * @exception IllegalArgumentException if aChild is + * @throws IllegalArgumentException if aChild is * null or is not a child of this node * @return the child of this node that immediately follows * aChild @@ -957,7 +957,7 @@ public class DefaultMutableTreeNode implements Cloneable, * and is O(n) where n is the number of children. * * @param aChild the child node to look for previous child before it - * @exception IllegalArgumentException if aChild is null + * @throws IllegalArgumentException if aChild is null * or is not a child of this node * @return the child of this node that immediately precedes * aChild diff --git a/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeModel.java b/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeModel.java index 4cdec3f6b381895d6c1bf98e8c489a1e43933ccf..511cde568c0929e9b189bf4ea4a850a6ee7f6fb3 100644 --- a/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeModel.java +++ b/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeModel.java @@ -672,7 +672,7 @@ public class DefaultTreeModel implements Serializable, TreeModel { * FooListeners on this component, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType + * @throws ClassCastException if listenerType * doesn't specify a class or interface that implements * java.util.EventListener * diff --git a/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java b/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java index e1bdc4fc94b3952bdf3856f43dc80d3979e1361c..ff7ed27302dcbbd9a5841e09c028fbe68e9e6cc0 100644 --- a/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java +++ b/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java @@ -679,7 +679,7 @@ public class DefaultTreeSelectionModel implements Cloneable, Serializable, TreeS * FooListeners on this component, * or an empty array if no such * listeners have been added - * @exception ClassCastException if listenerType + * @throws ClassCastException if listenerType * doesn't specify a class or interface that implements * java.util.EventListener * @@ -1187,7 +1187,7 @@ public class DefaultTreeSelectionModel implements Cloneable, Serializable, TreeS * This method does not duplicate * selection listeners and property listeners. * - * @exception CloneNotSupportedException never thrown by instances of + * @throws CloneNotSupportedException never thrown by instances of * this class */ public Object clone() throws CloneNotSupportedException { diff --git a/src/java.desktop/share/classes/javax/swing/undo/AbstractUndoableEdit.java b/src/java.desktop/share/classes/javax/swing/undo/AbstractUndoableEdit.java index 7184557d1e77afb39045042080962bba6a1c6e47..94f5eb69a74ad19bc0f1fb3d22128e7005013c39 100644 --- a/src/java.desktop/share/classes/javax/swing/undo/AbstractUndoableEdit.java +++ b/src/java.desktop/share/classes/javax/swing/undo/AbstractUndoableEdit.java @@ -102,7 +102,7 @@ public class AbstractUndoableEdit implements UndoableEdit, Serializable { * operation represented by this edit. Override should begin with * a call to super. * - * @exception CannotUndoException if canUndo + * @throws CannotUndoException if canUndo * returns false * @see #canUndo */ @@ -134,7 +134,7 @@ public class AbstractUndoableEdit implements UndoableEdit, Serializable { * Subclasses should override to redo the operation represented by * this edit. Override should begin with a call to super. * - * @exception CannotRedoException if canRedo + * @throws CannotRedoException if canRedo * returns false * @see #canRedo */ diff --git a/src/java.desktop/share/classes/sun/awt/AppContext.java b/src/java.desktop/share/classes/sun/awt/AppContext.java index 6ed0b2b325efc7c3a95c893c67f9d18cc99f5bb9..741b52d8bae4a71de7106c392f9e239c2e4702d4 100644 --- a/src/java.desktop/share/classes/sun/awt/AppContext.java +++ b/src/java.desktop/share/classes/sun/awt/AppContext.java @@ -391,7 +391,7 @@ public final class AppContext { * This method must be called from a Thread which is not contained * within this AppContext. * - * @exception IllegalThreadStateException if the current thread is + * @throws IllegalThreadStateException if the current thread is * contained within this AppContext * @since 1.2 */ @@ -660,7 +660,7 @@ public final class AppContext { * @param value the value. * @return the previous value of the specified key in this * AppContext, or {@code null} if it did not have one. - * @exception NullPointerException if the key or value is + * @throws NullPointerException if the key or value is * {@code null}. * @see #get(Object) * @since 1.2 diff --git a/src/java.desktop/share/classes/sun/awt/FontConfiguration.java b/src/java.desktop/share/classes/sun/awt/FontConfiguration.java index e2e7ab3e5ae1bf488d9728a6c05c7e35b7e40e60..45035042992ea1dbd942a520feba3011beb59138 100644 --- a/src/java.desktop/share/classes/sun/awt/FontConfiguration.java +++ b/src/java.desktop/share/classes/sun/awt/FontConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -960,7 +960,9 @@ public abstract class FontConfiguration { return fc.newEncoder(); } - if (!charsetName.startsWith("sun.awt.") && !charsetName.equals("default")) { + if (!charsetName.startsWith("sun.awt.") && + !charsetName.equals("default") && + !charsetName.startsWith("sun.font.")) { fc = Charset.forName(charsetName); } else { @SuppressWarnings("removal") diff --git a/src/java.desktop/share/classes/sun/awt/SunToolkit.java b/src/java.desktop/share/classes/sun/awt/SunToolkit.java index 380a5e4db017e29a66f329891bc075786e04dfa4..1e144c373e4d18b7183d5519d2b54e690dc26012 100644 --- a/src/java.desktop/share/classes/sun/awt/SunToolkit.java +++ b/src/java.desktop/share/classes/sun/awt/SunToolkit.java @@ -1181,7 +1181,7 @@ public abstract class SunToolkit extends Toolkit variant = AccessController.doPrivileged( new GetPropertyAction("user.variant", "")); } - startupLocale = new Locale(language, country, variant); + startupLocale = Locale.of(language, country, variant); } return startupLocale; } diff --git a/src/java.desktop/share/classes/sun/awt/im/ExecutableInputMethodManager.java b/src/java.desktop/share/classes/sun/awt/im/ExecutableInputMethodManager.java index eb8f6368c20496dfa4969080c3b5a1f83cd78f72..5b32879b59814452c70edceb20577e33679b8f0b 100644 --- a/src/java.desktop/share/classes/sun/awt/im/ExecutableInputMethodManager.java +++ b/src/java.desktop/share/classes/sun/awt/im/ExecutableInputMethodManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -375,7 +375,7 @@ class ExecutableInputMethodManager extends InputMethodManager variant = localeString.substring(postIndex + 1); } } - Locale locale = new Locale(language, country, variant); + Locale locale = Locale.of(language, country, variant); locator = locator.deriveLocator(locale); } @@ -550,8 +550,8 @@ class ExecutableInputMethodManager extends InputMethodManager if (preferredLocale.equals(Locale.KOREA)) { preferredLocale = Locale.KOREAN; } - if (preferredLocale.equals(new Locale("th", "TH"))) { - preferredLocale = new Locale("th"); + if (preferredLocale.equals(Locale.of("th", "TH"))) { + preferredLocale = Locale.of("th"); } // obtain node @@ -623,10 +623,10 @@ class ExecutableInputMethodManager extends InputMethodManager advertised = Locale.KOREAN; } } else if (locale.getLanguage().equals("th")) { - if (locator.isLocaleAvailable(new Locale("th", "TH"))) { - advertised = new Locale("th", "TH"); - } else if (locator.isLocaleAvailable(new Locale("th"))) { - advertised = new Locale("th"); + if (locator.isLocaleAvailable(Locale.of("th", "TH"))) { + advertised = Locale.of("th", "TH"); + } else if (locator.isLocaleAvailable(Locale.of("th"))) { + advertised = Locale.of("th"); } } diff --git a/src/java.desktop/share/classes/sun/awt/im/InputContext.java b/src/java.desktop/share/classes/sun/awt/im/InputContext.java index c35d17bfae3611114bb36694888975065cce65c2..237164a9d421cd5fee56d0c9895ce91a1e4fc365 100644 --- a/src/java.desktop/share/classes/sun/awt/im/InputContext.java +++ b/src/java.desktop/share/classes/sun/awt/im/InputContext.java @@ -133,7 +133,7 @@ public class InputContext extends java.awt.im.InputContext /** * @see java.awt.im.InputContext#selectInputMethod - * @exception NullPointerException when the locale is null. + * @throws NullPointerException when the locale is null. */ public synchronized boolean selectInputMethod(Locale locale) { if (locale == null) { @@ -206,7 +206,7 @@ public class InputContext extends java.awt.im.InputContext /** * @see java.awt.im.InputContext#reconvert * @since 1.3 - * @exception UnsupportedOperationException when input method is null + * @throws UnsupportedOperationException when input method is null */ public synchronized void reconvert() { InputMethod inputMethod = getInputMethod(); @@ -610,7 +610,7 @@ public class InputContext extends java.awt.im.InputContext /** * @see java.awt.im.InputContext#removeNotify - * @exception NullPointerException when the component is null. + * @throws NullPointerException when the component is null. */ public synchronized void removeNotify(Component component) { if (component == null) { @@ -662,7 +662,7 @@ public class InputContext extends java.awt.im.InputContext /** * @see java.awt.im.InputContext#dispose - * @exception IllegalStateException when the currentClientComponent is not null + * @throws IllegalStateException when the currentClientComponent is not null */ public synchronized void dispose() { if (currentClientComponent != null) { @@ -723,7 +723,7 @@ public class InputContext extends java.awt.im.InputContext /** * @see java.awt.im.InputContext#setCompositionEnabled(boolean) - * @exception UnsupportedOperationException when input method is null + * @throws UnsupportedOperationException when input method is null */ public void setCompositionEnabled(boolean enable) { InputMethod inputMethod = getInputMethod(); @@ -736,7 +736,7 @@ public class InputContext extends java.awt.im.InputContext /** * @see java.awt.im.InputContext#isCompositionEnabled - * @exception UnsupportedOperationException when input method is null + * @throws UnsupportedOperationException when input method is null */ public boolean isCompositionEnabled() { InputMethod inputMethod = getInputMethod(); @@ -749,7 +749,7 @@ public class InputContext extends java.awt.im.InputContext /** * @return a string with information about the current input method. - * @exception UnsupportedOperationException when input method is null + * @throws UnsupportedOperationException when input method is null */ public String getInputMethodInfo() { InputMethod inputMethod = getInputMethod(); diff --git a/src/java.desktop/share/classes/sun/awt/im/InputMethodAdapter.java b/src/java.desktop/share/classes/sun/awt/im/InputMethodAdapter.java index dfc31799bfb037a5a798edb943545d4dea82298b..b70f5bbbf712e862125b6a2bb0ddd08c727e4086 100644 --- a/src/java.desktop/share/classes/sun/awt/im/InputMethodAdapter.java +++ b/src/java.desktop/share/classes/sun/awt/im/InputMethodAdapter.java @@ -93,7 +93,7 @@ public abstract class InputMethodAdapter implements InputMethod { /** * Starts reconvertion. An implementing host adapter has to override * this method if it can support reconvert(). - * @exception UnsupportedOperationException when the adapter does not override + * @throws UnsupportedOperationException when the adapter does not override * the method. */ public void reconvert() { diff --git a/src/java.desktop/share/classes/sun/awt/image/ByteBandedRaster.java b/src/java.desktop/share/classes/sun/awt/image/ByteBandedRaster.java index 882881f13b95833590389c36c1befa1984e8f255..0afae4060c07822ce2bcf3792e412fb9bf9cbd13 100644 --- a/src/java.desktop/share/classes/sun/awt/image/ByteBandedRaster.java +++ b/src/java.desktop/share/classes/sun/awt/image/ByteBandedRaster.java @@ -634,7 +634,7 @@ public class ByteBandedRaster extends SunWritableRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public WritableRaster createWritableChild (int x, int y, @@ -689,7 +689,7 @@ public class ByteBandedRaster extends SunWritableRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public Raster createChild (int x, int y, diff --git a/src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java b/src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java index 6a92748330cb7d239e362b763b6449f3e9a379fd..3ec93b741e7cb65a87c9eac567226916aa96ed1e 100644 --- a/src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java +++ b/src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java @@ -759,7 +759,7 @@ public class ByteComponentRaster extends SunWritableRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public Raster createChild(int x, int y, @@ -788,7 +788,7 @@ public class ByteComponentRaster extends SunWritableRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent Raster. */ public WritableRaster createWritableChild(int x, int y, diff --git a/src/java.desktop/share/classes/sun/awt/image/ByteInterleavedRaster.java b/src/java.desktop/share/classes/sun/awt/image/ByteInterleavedRaster.java index 796f0835972ab4416059faf8b87ead8b87822530..f0dedd9775a3aeb20546fd60c67dfeb01959964b 100644 --- a/src/java.desktop/share/classes/sun/awt/image/ByteInterleavedRaster.java +++ b/src/java.desktop/share/classes/sun/awt/image/ByteInterleavedRaster.java @@ -1195,7 +1195,7 @@ public class ByteInterleavedRaster extends ByteComponentRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public Raster createChild(int x, int y, @@ -1224,7 +1224,7 @@ public class ByteInterleavedRaster extends ByteComponentRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent Raster. */ public WritableRaster createWritableChild(int x, int y, diff --git a/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java b/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java index d721eee57390d2898cfa2ac41412624f11c165d5..cadc390e6e9cba8879353e95ac4251d8a20ac3d9 100644 --- a/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java +++ b/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java @@ -143,7 +143,7 @@ public class BytePackedRaster extends SunWritableRaster { * @param origin The Point that specifies the origin. * @param parent The parent (if any) of this raster. * - * @exception RasterFormatException if the parameters do not conform + * @throws RasterFormatException if the parameters do not conform * to requirements of this Raster type. */ public BytePackedRaster(SampleModel sampleModel, @@ -1258,7 +1258,7 @@ public class BytePackedRaster extends SunWritableRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public Raster createChild(int x, int y, @@ -1286,7 +1286,7 @@ public class BytePackedRaster extends SunWritableRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent Raster. */ public WritableRaster createWritableChild(int x, int y, diff --git a/src/java.desktop/share/classes/sun/awt/image/IntegerComponentRaster.java b/src/java.desktop/share/classes/sun/awt/image/IntegerComponentRaster.java index 3b110e77eca55b94814a1898434bcc1e29547403..e918a285aaaaeda2a0e170b5e4941af1c4c5742d 100644 --- a/src/java.desktop/share/classes/sun/awt/image/IntegerComponentRaster.java +++ b/src/java.desktop/share/classes/sun/awt/image/IntegerComponentRaster.java @@ -535,7 +535,7 @@ public class IntegerComponentRaster extends SunWritableRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public WritableRaster createWritableChild (int x, int y, @@ -589,7 +589,7 @@ public class IntegerComponentRaster extends SunWritableRaster { * @param x0 Translated X origin of the subRaster. * @param y0 Translated Y origin of the subRaster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public Raster createChild (int x, int y, diff --git a/src/java.desktop/share/classes/sun/awt/image/IntegerInterleavedRaster.java b/src/java.desktop/share/classes/sun/awt/image/IntegerInterleavedRaster.java index cb84024ae22d37f4994270cee70d347105acd1ad..b00b03011306b7efb69f8a40e88cb71c19c734f3 100644 --- a/src/java.desktop/share/classes/sun/awt/image/IntegerInterleavedRaster.java +++ b/src/java.desktop/share/classes/sun/awt/image/IntegerInterleavedRaster.java @@ -447,7 +447,7 @@ public class IntegerInterleavedRaster extends IntegerComponentRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public WritableRaster createWritableChild (int x, int y, @@ -501,7 +501,7 @@ public class IntegerInterleavedRaster extends IntegerComponentRaster { * @param x0 Translated X origin of the subRaster. * @param y0 Translated Y origin of the subRaster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public Raster createChild (int x, int y, diff --git a/src/java.desktop/share/classes/sun/awt/image/ShortBandedRaster.java b/src/java.desktop/share/classes/sun/awt/image/ShortBandedRaster.java index d84039265676354feda99d862b1adbd3e6c757cb..17d24e276860a166256d9a7669d516d98b62a6b5 100644 --- a/src/java.desktop/share/classes/sun/awt/image/ShortBandedRaster.java +++ b/src/java.desktop/share/classes/sun/awt/image/ShortBandedRaster.java @@ -633,7 +633,7 @@ public class ShortBandedRaster extends SunWritableRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent Raster. */ public WritableRaster createWritableChild(int x, int y, @@ -689,7 +689,7 @@ public class ShortBandedRaster extends SunWritableRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public Raster createChild (int x, int y, diff --git a/src/java.desktop/share/classes/sun/awt/image/ShortComponentRaster.java b/src/java.desktop/share/classes/sun/awt/image/ShortComponentRaster.java index 3e95f652d331ad1f5f3eb615e709afb4d7ef61c3..b24b664826fc26d7454420cbe7a3838f812827c9 100644 --- a/src/java.desktop/share/classes/sun/awt/image/ShortComponentRaster.java +++ b/src/java.desktop/share/classes/sun/awt/image/ShortComponentRaster.java @@ -693,7 +693,7 @@ public class ShortComponentRaster extends SunWritableRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public Raster createChild (int x, int y, @@ -722,7 +722,7 @@ public class ShortComponentRaster extends SunWritableRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent Raster. */ public WritableRaster createWritableChild(int x, int y, diff --git a/src/java.desktop/share/classes/sun/awt/image/ShortInterleavedRaster.java b/src/java.desktop/share/classes/sun/awt/image/ShortInterleavedRaster.java index d4926bb295eedd872e9e25f45b80441fc91da6a2..327adf9ac98a02ff7ffcdbe0c7e4ab38bc060bc9 100644 --- a/src/java.desktop/share/classes/sun/awt/image/ShortInterleavedRaster.java +++ b/src/java.desktop/share/classes/sun/awt/image/ShortInterleavedRaster.java @@ -666,7 +666,7 @@ public class ShortInterleavedRaster extends ShortComponentRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent raster. */ public Raster createChild (int x, int y, @@ -695,7 +695,7 @@ public class ShortInterleavedRaster extends ShortComponentRaster { * @param x0 Translated X origin of the subraster. * @param y0 Translated Y origin of the subraster. * @param bandList Array of band indices. - * @exception RasterFormatException + * @throws RasterFormatException * if the specified bounding box is outside of the parent Raster. */ public WritableRaster createWritableChild(int x, int y, diff --git a/src/java.desktop/share/classes/sun/awt/resources/awt_de.properties b/src/java.desktop/share/classes/sun/awt/resources/awt_de.properties index 471c4c2fc8b3d2c87c47345440b30e7e4de0c1bc..80e22e5c8cf40509355b4088dae81adb7348bb4d 100644 --- a/src/java.desktop/share/classes/sun/awt/resources/awt_de.properties +++ b/src/java.desktop/share/classes/sun/awt/resources/awt_de.properties @@ -201,8 +201,8 @@ AWT.HostInputMethodDisplayName=Systemeingabemethoden AWT.InputMethodLanguage.ja=Japanisch AWT.InputMethodLanguage.ko=Koreanisch AWT.InputMethodLanguage.zh=Chinesisch -AWT.InputMethodLanguage.zh_CN=Vereinfachtes Chinesisch -AWT.InputMethodLanguage.zh_TW=Traditionelles Chinesisch +AWT.InputMethodLanguage.zh_CN=Chinesisch (vereinfacht) +AWT.InputMethodLanguage.zh_TW=Chinesisch (traditionell) AWT.InputMethodCreationFailed={0} konnte nicht erstellt werden. Grund: {1} # Property to select between on-the-spot and below-the-spot diff --git a/src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java b/src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java index 3aa91dcb6006f31bb0e7ed32719098c4b69407a8..1f95995a222ae3258d6038e296bd6114ebe5c15e 100644 --- a/src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java +++ b/src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java @@ -253,13 +253,12 @@ public abstract class ShellFolder extends File { /** * Return a shell folder from a file object - * @exception FileNotFoundException if file does not exist + * @throws FileNotFoundException if file does not exist */ public static ShellFolder getShellFolder(File file) throws FileNotFoundException { if (file instanceof ShellFolder) { return (ShellFolder)file; } - if (!Files.exists(Paths.get(file.getPath()), LinkOption.NOFOLLOW_LINKS)) { throw new FileNotFoundException(); } diff --git a/src/java.desktop/share/classes/sun/awt/util/IdentityArrayList.java b/src/java.desktop/share/classes/sun/awt/util/IdentityArrayList.java index 98f93cc3ec7027fa9942a230d7889addeb9ea0df..202a55a8135bd55d46296aefb8127d180ab96d99 100644 --- a/src/java.desktop/share/classes/sun/awt/util/IdentityArrayList.java +++ b/src/java.desktop/share/classes/sun/awt/util/IdentityArrayList.java @@ -113,7 +113,7 @@ public class IdentityArrayList extends AbstractList * Constructs an empty list with the specified initial capacity. * * @param initialCapacity the initial capacity of the list - * @exception IllegalArgumentException if the specified initial capacity + * @throws IllegalArgumentException if the specified initial capacity * is negative */ public IdentityArrayList(int initialCapacity) { diff --git a/src/java.desktop/share/classes/sun/font/SunFontManager.java b/src/java.desktop/share/classes/sun/font/SunFontManager.java index 4f36498f6e2718fee47ee1b067a8a92612e81db0..3395e343e2e692c7ab399ca5339ecd9871a181ad 100644 --- a/src/java.desktop/share/classes/sun/font/SunFontManager.java +++ b/src/java.desktop/share/classes/sun/font/SunFontManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -3466,7 +3466,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE { String language = System.getProperty("user.language", "en"); String country = System.getProperty("user.country",""); String variant = System.getProperty("user.variant",""); - return new Locale(language, country, variant); + return Locale.of(language, country, variant); } }); } diff --git a/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java b/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java index 193a8a38587ecc7c989956ea8a94b463d5c32408..5c681b454b9deae5bb39b5c29da942886dcc5277 100644 --- a/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java +++ b/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java @@ -409,7 +409,7 @@ public final class SunGraphics2D * drawback of the workaround is that the resulting * clip and device origin cannot be "enforced". * - * @exception IllegalStateException If the Graphics + * @throws IllegalStateException If the Graphics * to be constrained has a complex transform. */ @Override diff --git a/src/java.desktop/share/classes/sun/print/PSPrinterJob.java b/src/java.desktop/share/classes/sun/print/PSPrinterJob.java index 61450e49553f7c788d39ebe30da208ac6cbeba84..01a24adfda43fe58bb3d2464a6a06a3d354e2046 100644 --- a/src/java.desktop/share/classes/sun/print/PSPrinterJob.java +++ b/src/java.desktop/share/classes/sun/print/PSPrinterJob.java @@ -418,7 +418,7 @@ public class PSPrinterJob extends RasterPrinterJob { * print job interactively. * @return false if the user cancels the dialog and * true otherwise. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ diff --git a/src/java.desktop/share/classes/sun/print/PrintJob2D.java b/src/java.desktop/share/classes/sun/print/PrintJob2D.java index 9083bd3e26965be3ba66460049c4f645a5dc2b7b..7a238383ce859a4fdb586cb63c1003d030facf00 100644 --- a/src/java.desktop/share/classes/sun/print/PrintJob2D.java +++ b/src/java.desktop/share/classes/sun/print/PrintJob2D.java @@ -966,7 +966,7 @@ public class PrintJob2D extends PrintJob implements Printable, Runnable { * @return PAGE_EXISTS if the page is rendered successfully * or NO_SUCH_PAGE if {@code pageIndex} specifies a * non-existent page. - * @exception java.awt.print.PrinterException + * @throws java.awt.print.PrinterException * thrown when the print job is terminated. */ public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) diff --git a/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java b/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java index 6ceeb48df85279161c11f8fb6327c4147a8059ef..ffdebb82d0ba221d3d039bbbfb2da2e15c90fd75 100644 --- a/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java +++ b/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java @@ -714,7 +714,7 @@ public abstract class RasterPrinterJob extends PrinterJob { * is cancelled, or a new PageFormat object containing * the format indicated by the user if the dialog is * acknowledged - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.2 @@ -947,7 +947,7 @@ public abstract class RasterPrinterJob extends PrinterJob { * * @param attributes to store changed properties. * @return false if the user cancels the dialog and true otherwise. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -1100,7 +1100,7 @@ public abstract class RasterPrinterJob extends PrinterJob { * print job interactively. * @return false if the user cancels the dialog and * true otherwise. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -1183,7 +1183,7 @@ public abstract class RasterPrinterJob extends PrinterJob { * for the number of pages as well as the PageFormat and * Printable for each page. * @param document The document to be printed. It may not be null. - * @exception NullPointerException the Pageable passed in was null. + * @throws NullPointerException the Pageable passed in was null. * @see PageFormat * @see Printable */ @@ -1477,7 +1477,7 @@ public abstract class RasterPrinterJob extends PrinterJob { /** * Prints a set of pages. - * @exception java.awt.print.PrinterException an error in the print system + * @throws java.awt.print.PrinterException an error in the print system * caused the job to be aborted * @see java.awt.print.Book * @see java.awt.print.Pageable diff --git a/make/data/dtdbuilder/HTMLlat1.sgml b/src/java.desktop/share/data/dtdbuilder/HTMLlat1.sgml similarity index 100% rename from make/data/dtdbuilder/HTMLlat1.sgml rename to src/java.desktop/share/data/dtdbuilder/HTMLlat1.sgml diff --git a/make/data/dtdbuilder/HTMLspecial.sgml b/src/java.desktop/share/data/dtdbuilder/HTMLspecial.sgml similarity index 100% rename from make/data/dtdbuilder/HTMLspecial.sgml rename to src/java.desktop/share/data/dtdbuilder/HTMLspecial.sgml diff --git a/make/data/dtdbuilder/HTMLsymbol.sgml b/src/java.desktop/share/data/dtdbuilder/HTMLsymbol.sgml similarity index 100% rename from make/data/dtdbuilder/HTMLsymbol.sgml rename to src/java.desktop/share/data/dtdbuilder/HTMLsymbol.sgml diff --git a/make/data/dtdbuilder/html32.dtd b/src/java.desktop/share/data/dtdbuilder/html32.dtd similarity index 100% rename from make/data/dtdbuilder/html32.dtd rename to src/java.desktop/share/data/dtdbuilder/html32.dtd diff --git a/make/data/dtdbuilder/public.map b/src/java.desktop/share/data/dtdbuilder/public.map similarity index 100% rename from make/data/dtdbuilder/public.map rename to src/java.desktop/share/data/dtdbuilder/public.map diff --git a/src/java.desktop/share/native/liblcms/LCMS.c b/src/java.desktop/share/native/liblcms/LCMS.c index 27c23c6d92f6f749173aa80115f5a44364d724e5..06a7eb261408bfd8505e3a27109438fda335741b 100644 --- a/src/java.desktop/share/native/liblcms/LCMS.c +++ b/src/java.desktop/share/native/liblcms/LCMS.c @@ -734,34 +734,43 @@ static cmsHPROFILE _writeCookedTag(const cmsHPROFILE pfTarget, // now we have all tags moved to the new profile. // do some sanity checks: write it to a memory buffer and read again. + void* buf = NULL; if (cmsSaveProfileToMem(p, NULL, &pfSize)) { - void* buf = malloc(pfSize); + buf = malloc(pfSize); if (buf != NULL) { // load raw profile data into the buffer if (cmsSaveProfileToMem(p, buf, &pfSize)) { pfSanity = cmsOpenProfileFromMem(buf, pfSize); } - free(buf); } } + cmsCloseProfile(p); // No longer needed. + if (pfSanity == NULL) { // for some reason, we failed to save and read the updated profile // It likely indicates that the profile is not correct, so we report // a failure here. - cmsCloseProfile(p); - p = NULL; + free(buf); + return NULL; } else { // do final check whether we can read and handle the target tag. const void* pTag = cmsReadTag(pfSanity, sig); if (pTag == NULL) { // the tag can not be cooked - cmsCloseProfile(p); - p = NULL; + free(buf); + cmsCloseProfile(pfSanity); + return NULL; } + // The profile we used for sanity checking needs to be returned + // since the one we updated is raw - not cooked. + // Except we want to re-open it since the call to cmsReadTag() + // means we may not get back the same bytes as we set. + // Whilst this may change later anyway, we can at least prevent + // it from happening immediately. cmsCloseProfile(pfSanity); - pfSanity = NULL; + pfSanity = cmsOpenProfileFromMem(buf, pfSize); + free(buf); + return pfSanity; } - - return p; } diff --git a/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java b/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java index a7ab4f3e830745989d148005e629da74332f9100..7a23c806374b8eba66728815c7f9142270bc3dc8 100644 --- a/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java +++ b/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -524,13 +524,6 @@ static native String XSetLocaleModifiers(String modifier_list); static native void XChangeActivePointerGrab(long display, int mask, long cursor, long time); - /* - int (*XSynchronize(Display *display, Bool onoff))(); - display Specifies the connection to the X server. - onoff Specifies a Boolean value that indicates whether to enable or disable synchronization. - */ - static native int XSynchronize(long display, boolean onoff); - /** * Extracts an X event that can be processed in a secondary loop. * Should only be called on the toolkit thread. diff --git a/src/java.desktop/unix/classes/sun/print/CUPSPrinter.java b/src/java.desktop/unix/classes/sun/print/CUPSPrinter.java index e41a096f55f60d2f5ffe001621324ec9367f1842..0e398edef8575a020cbecf181f22986b7d082607 100644 --- a/src/java.desktop/unix/classes/sun/print/CUPSPrinter.java +++ b/src/java.desktop/unix/classes/sun/print/CUPSPrinter.java @@ -53,6 +53,7 @@ public class CUPSPrinter { private static native String getCupsServer(); private static native int getCupsPort(); private static native String getCupsDefaultPrinter(); + private static native String[] getCupsDefaultPrinters(); private static native boolean canConnect(String server, int port); private static native boolean initIDs(); // These functions need to be synchronized as @@ -77,6 +78,7 @@ public class CUPSPrinter { private static boolean libFound; private static String cupsServer = null; + private static String domainSocketPathname = null; private static int cupsPort = 0; static { @@ -96,6 +98,13 @@ public class CUPSPrinter { libFound = initIDs(); if (libFound) { cupsServer = getCupsServer(); + // Is this a local domain socket pathname? + if (cupsServer != null && cupsServer.startsWith("/")) { + if (isSandboxedApp()) { + domainSocketPathname = cupsServer; + } + cupsServer = "localhost"; + } cupsPort = getCupsPort(); } } @@ -381,6 +390,20 @@ public class CUPSPrinter { * Get list of all CUPS printers using IPP. */ static String[] getAllPrinters() { + + if (getDomainSocketPathname() != null) { + String[] printerNames = getCupsDefaultPrinters(); + if (printerNames != null && printerNames.length > 0) { + String[] printerURIs = new String[printerNames.length]; + for (int i=0; i< printerNames.length; i++) { + printerURIs[i] = String.format("ipp://%s:%d/printers/%s", + getServer(), getPort(), printerNames[i]); + } + return printerURIs; + } + return null; + } + try { URL url = new URL("http", getServer(), getPort(), ""); @@ -464,15 +487,39 @@ public class CUPSPrinter { return cupsPort; } + /** + * Returns CUPS domain socket pathname. + */ + private static String getDomainSocketPathname() { + return domainSocketPathname; + } + + @SuppressWarnings("removal") + private static boolean isSandboxedApp() { + if (PrintServiceLookupProvider.isMac()) { + return java.security.AccessController + .doPrivileged((java.security.PrivilegedAction) () -> + System.getenv("APP_SANDBOX_CONTAINER_ID") != null); + } + return false; + } + + /** * Detects if CUPS is running. */ public static boolean isCupsRunning() { IPPPrintService.debug_println(debugPrefix+"libFound "+libFound); if (libFound) { - IPPPrintService.debug_println(debugPrefix+"CUPS server "+getServer()+ - " port "+getPort()); - return canConnect(getServer(), getPort()); + String server = getDomainSocketPathname() != null + ? getDomainSocketPathname() + : getServer(); + IPPPrintService.debug_println(debugPrefix+"CUPS server "+server+ + " port "+getPort()+ + (getDomainSocketPathname() != null + ? " use domain socket pathname" + : "")); + return canConnect(server, getPort()); } else { return false; } diff --git a/make/data/x11wrappergen/sizes-32.txt b/src/java.desktop/unix/data/x11wrappergen/sizes-32.txt similarity index 100% rename from make/data/x11wrappergen/sizes-32.txt rename to src/java.desktop/unix/data/x11wrappergen/sizes-32.txt diff --git a/make/data/x11wrappergen/sizes-64.txt b/src/java.desktop/unix/data/x11wrappergen/sizes-64.txt similarity index 100% rename from make/data/x11wrappergen/sizes-64.txt rename to src/java.desktop/unix/data/x11wrappergen/sizes-64.txt diff --git a/make/data/x11wrappergen/xlibtypes.txt b/src/java.desktop/unix/data/x11wrappergen/xlibtypes.txt similarity index 100% rename from make/data/x11wrappergen/xlibtypes.txt rename to src/java.desktop/unix/data/x11wrappergen/xlibtypes.txt diff --git a/src/java.desktop/unix/native/common/awt/CUPSfuncs.c b/src/java.desktop/unix/native/common/awt/CUPSfuncs.c index 62f57ffde5edec4a7b871e7ff6676f7e2ed28d3a..52677659ed3bed340c50370844ddbb1da299f4c8 100644 --- a/src/java.desktop/unix/native/common/awt/CUPSfuncs.c +++ b/src/java.desktop/unix/native/common/awt/CUPSfuncs.c @@ -172,12 +172,7 @@ Java_sun_print_CUPSPrinter_getCupsServer(JNIEnv *env, jstring cServer = NULL; const char* server = j2d_cupsServer(); if (server != NULL) { - // Is this a local domain socket? - if (strncmp(server, "/", 1) == 0) { - cServer = JNU_NewStringPlatform(env, "localhost"); - } else { - cServer = JNU_NewStringPlatform(env, server); - } + cServer = JNU_NewStringPlatform(env, server); } return cServer; } @@ -219,6 +214,57 @@ Java_sun_print_CUPSPrinter_getCupsDefaultPrinter(JNIEnv *env, return cDefPrinter; } +/* + * Returns list of default local printers + */ +JNIEXPORT jobjectArray JNICALL +Java_sun_print_CUPSPrinter_getCupsDefaultPrinters(JNIEnv *env, + jobject printObj) +{ + cups_dest_t *dests; + int i, j, num_dests; + jstring utf_str; + jclass cls; + jobjectArray nameArray = NULL; + + cls = (*env)->FindClass(env, "java/lang/String"); + CHECK_NULL_RETURN(cls, NULL); + + num_dests = j2d_cupsGetDests(&dests); + + if (dests == NULL) { + return NULL; + } + + nameArray = (*env)->NewObjectArray(env, num_dests, cls, NULL); + if (nameArray == NULL) { + j2d_cupsFreeDests(num_dests, dests); + DPRINTF("CUPSfuncs::bad alloc new array\n", "") + return NULL; + } + + for (i = 0; i < num_dests; i++) { + utf_str = JNU_NewStringPlatform(env, dests[i].name); + if (utf_str == NULL) { + for (j = i - 1; j >= 0; j--) { + utf_str = (*env)->GetObjectArrayElement(env, nameArray, j); + (*env)->SetObjectArrayElement(env, nameArray, j, NULL); + (*env)->DeleteLocalRef(env, utf_str); + utf_str = NULL; + } + j2d_cupsFreeDests(num_dests, dests); + (*env)->DeleteLocalRef(env, nameArray); + DPRINTF("CUPSfuncs::bad alloc new string ->name\n", "") + return NULL; + } + (*env)->SetObjectArrayElement(env, nameArray, i, utf_str); + (*env)->DeleteLocalRef(env, utf_str); + } + + j2d_cupsFreeDests(num_dests, dests); + return nameArray; +} + /* * Checks if connection can be made to the server. * diff --git a/src/java.desktop/unix/native/common/awt/fontpath.c b/src/java.desktop/unix/native/common/awt/fontpath.c index 051c9de88fa851296b8c4134c423f80ebd396af9..fd28f5c0ea6dc1d2fe33afffb7462e206da0c837 100644 --- a/src/java.desktop/unix/native/common/awt/fontpath.c +++ b/src/java.desktop/unix/native/common/awt/fontpath.c @@ -496,6 +496,7 @@ typedef FcResult (*FcPatternGetStringFuncType)(const FcPattern *p, FcChar8 ** s); typedef FcChar8* (*FcStrDirnameFuncType)(const FcChar8 *file); typedef void (*FcPatternDestroyFuncType)(FcPattern *p); +typedef void (*FcObjectSetDestroyFuncType)(FcObjectSet *os); typedef void (*FcFontSetDestroyFuncType)(FcFontSet *s); typedef FcPattern* (*FcNameParseFuncType)(const FcChar8 *name); typedef FcBool (*FcPatternAddStringFuncType)(FcPattern *p, @@ -542,6 +543,7 @@ static char **getFontConfigLocations() { FcPatternGetStringFuncType FcPatternGetString; FcStrDirnameFuncType FcStrDirname; FcPatternDestroyFuncType FcPatternDestroy; + FcObjectSetDestroyFuncType FcObjectSetDestroy; FcFontSetDestroyFuncType FcFontSetDestroy; FcConfig *fontconfig; @@ -571,6 +573,8 @@ static char **getFontConfigLocations() { (FcStrDirnameFuncType)dlsym(libfontconfig, "FcStrDirname"); FcPatternDestroy = (FcPatternDestroyFuncType)dlsym(libfontconfig, "FcPatternDestroy"); + FcObjectSetDestroy = + (FcObjectSetDestroyFuncType)dlsym(libfontconfig, "FcObjectSetDestroy"); FcFontSetDestroy = (FcFontSetDestroyFuncType)dlsym(libfontconfig, "FcFontSetDestroy"); @@ -580,6 +584,7 @@ static char **getFontConfigLocations() { FcFontList == NULL || FcStrDirname == NULL || FcPatternDestroy == NULL || + FcObjectSetDestroy == NULL || FcFontSetDestroy == NULL) { /* problem with the library: return. */ closeFontConfig(libfontconfig, JNI_FALSE); return NULL; @@ -636,6 +641,7 @@ static char **getFontConfigLocations() { cleanup: /* Free memory and close the ".so" */ + (*FcObjectSetDestroy)(objset); (*FcPatternDestroy)(pattern); closeFontConfig(libfontconfig, JNI_TRUE); return fontdirs; diff --git a/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c b/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c index 815289b7c8f75fb30359ce2623c5150944f73284..c014ca5f5826014a6f1853ebc4eee0563ff31d9a 100644 --- a/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c +++ b/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -579,7 +579,8 @@ cleanup: XFree (pVI8sg); if (n1sg != 0) XFree (pVI1sg); - + if (nTrue != 0) + XFree (pVITrue); AWT_UNLOCK (); } @@ -1428,6 +1429,9 @@ Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals(JNIEnv *env, break; } } + AWT_LOCK(); + XdbeFreeVisualInfo(visScreenInfo); + AWT_UNLOCK(); } /* diff --git a/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c b/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c index 851071db3e0c673e8088c1a3d1613ddec7ef0799..20f5f2b4fc719efc9cdea701ab7da528de468b90 100644 --- a/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c +++ b/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c @@ -2184,11 +2184,6 @@ Java_sun_awt_X11_XlibWrapper_copyLongArray(JNIEnv *env, } } -JNIEXPORT jint JNICALL -Java_sun_awt_X11_XlibWrapper_XSynchronize(JNIEnv *env, jclass clazz, jlong display, jboolean onoff) -{ - return (jint) XSynchronize((Display*)jlong_to_ptr(display), (onoff == JNI_TRUE ? True : False)); -} JNIEXPORT jboolean JNICALL Java_sun_awt_X11_XlibWrapper_XShapeQueryExtension diff --git a/make/data/fontconfig/windows.fontconfig.properties b/src/java.desktop/windows/data/fontconfig/fontconfig.properties similarity index 100% rename from make/data/fontconfig/windows.fontconfig.properties rename to src/java.desktop/windows/data/fontconfig/fontconfig.properties diff --git a/src/java.management/share/classes/java/lang/management/ManagementFactory.java b/src/java.management/share/classes/java/lang/management/ManagementFactory.java index 13db85d0f094cc3b10e07d40500a662f15981cb2..375f0ebb719b18dd8ecc405843237c9bb03eebb1 100644 --- a/src/java.management/share/classes/java/lang/management/ManagementFactory.java +++ b/src/java.management/share/classes/java/lang/management/ManagementFactory.java @@ -936,8 +936,7 @@ public class ManagementFactory { all.add(new DefaultPlatformMBeanProvider()); return all; } - }, null, new FilePermission("<>", "read"), - new RuntimePermission("sun.management.spi.PlatformMBeanProvider.subclass")); + }, null, new FilePermission("<>", "read")); // load all platform components into a map var map = new HashMap>(); diff --git a/src/java.management/share/classes/sun/management/spi/PlatformMBeanProvider.java b/src/java.management/share/classes/sun/management/spi/PlatformMBeanProvider.java index 93779f0a811e3652fa8dda1e037144aa38ca467d..12472cabfccd363f3c0c155dcebb96e2f45eb099 100644 --- a/src/java.management/share/classes/sun/management/spi/PlatformMBeanProvider.java +++ b/src/java.management/share/classes/sun/management/spi/PlatformMBeanProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -203,15 +203,8 @@ public abstract class PlatformMBeanProvider { /** * Instantiates a new PlatformMBeanProvider. - * - * @throws SecurityException if the subclass (and calling code) does not - * have {@code RuntimePermission("sun.management.spi.PlatformMBeanProvider.subclass")} */ protected PlatformMBeanProvider () { - this(checkSubclassPermission()); - } - - private PlatformMBeanProvider(Void unused) { } /** @@ -222,13 +215,4 @@ public abstract class PlatformMBeanProvider { * MBeans provided by this provider. */ public abstract List> getPlatformComponentList(); - - private static Void checkSubclassPermission() { - @SuppressWarnings("removal") - SecurityManager sm = System.getSecurityManager(); - if (sm != null) { - sm.checkPermission(new RuntimePermission(PlatformMBeanProvider.class.getName()+".subclass")); - } - return null; - } } diff --git a/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java b/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java index 3c75f75519af56b00e322edfc2656831dc364a00..41144b132c087f982f71cde483a9e876f6820868 100644 --- a/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java +++ b/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -435,11 +435,10 @@ public final class StartTlsResponseImpl extends StartTlsResponse { /* * Pass up the cause of the failure */ - throw(SSLPeerUnverifiedException) - new SSLPeerUnverifiedException("hostname of the server '" + + throw new SSLPeerUnverifiedException("hostname of the server '" + hostname + "' does not match the hostname in the " + - "server's certificate.").initCause(e); + "server's certificate.", e); } } diff --git a/src/java.net.http/share/classes/java/net/http/HttpRequest.java b/src/java.net.http/share/classes/java/net/http/HttpRequest.java index fc9c10b14bc0b055397c9b82c542b4c2e627b3d8..974ea54717ee31cdfd3c4020aab6a81904679b8e 100644 --- a/src/java.net.http/share/classes/java/net/http/HttpRequest.java +++ b/src/java.net.http/share/classes/java/net/http/HttpRequest.java @@ -292,6 +292,10 @@ public abstract class HttpRequest { /** * Builds and returns an {@link HttpRequest}. * + * @implSpec This method returns a new {@code HttpRequest} each time it is + * invoked. Once built, the {@code HttpRequest} is immutable and can be + * sent multiple times. + * * @return a new {@code HttpRequest} * @throws IllegalStateException if a URI has not been set */ diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/Exchange.java b/src/java.net.http/share/classes/jdk/internal/net/http/Exchange.java index 36af30050328367d2b59eb2a0f6a26b982e1d04e..8c9282c0579150b74ed2c0d80f6fa1de783afc92 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/Exchange.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/Exchange.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -144,14 +144,45 @@ final class Exchange { private volatile boolean closeRequested; void connection(HttpConnection connection) { - this.connection = connection; - if (closeRequested) closeConnection(); + boolean closeRequested; + synchronized (this) { + // check whether this new connection should be + // closed + closeRequested = this.closeRequested; + if (!closeRequested) { + this.connection = connection; + } else { + // assert this.connection == null + this.closeRequested = false; + } + } + if (closeRequested) closeConnection(connection); } void closeConnection() { - closeRequested = true; - HttpConnection connection = this.connection; - this.connection = null; + HttpConnection connection; + synchronized (this) { + connection = this.connection; + if (connection == null) { + closeRequested = true; + } else { + this.connection = null; + } + } + closeConnection(connection); + } + + HttpConnection disable() { + HttpConnection connection; + synchronized (this) { + connection = this.connection; + this.connection = null; + this.closeRequested = false; + } + return connection; + } + + private static void closeConnection(HttpConnection connection) { if (connection != null) { try { connection.close(); @@ -160,11 +191,6 @@ final class Exchange { } } } - - void disable() { - connection = null; - closeRequested = false; - } } // Called for 204 response - when no body is permitted @@ -524,8 +550,11 @@ final class Exchange { client.client2(), this, e::drainLeftOverBytes) .thenCompose((Http2Connection c) -> { + HttpConnection connection = connectionAborter.disable(); boolean cached = c.offerConnection(); - if (cached) connectionAborter.disable(); + if (!cached && connection != null) { + connectionAborter.connection(connection); + } Stream s = c.getStream(1); if (s == null) { diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/Http2ClientImpl.java b/src/java.net.http/share/classes/jdk/internal/net/http/Http2ClientImpl.java index 4101133a025d87c576bcbf4e2379f19034f6b540..c3861b2ad9fd3266b2610442501f7c123752df5f 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/Http2ClientImpl.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/Http2ClientImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ package jdk.internal.net.http; import java.io.EOFException; import java.io.IOException; import java.io.UncheckedIOException; -import java.net.ConnectException; import java.net.InetSocketAddress; import java.net.URI; import java.util.Base64; @@ -101,7 +100,7 @@ class Http2ClientImpl { Http2Connection connection = connections.get(key); if (connection != null) { try { - if (connection.closed || !connection.reserveStream(true)) { + if (!connection.isOpen() || !connection.reserveStream(true)) { if (debug.on()) debug.log("removing found closed or closing connection: %s", connection); deleteConnection(connection); @@ -153,7 +152,7 @@ class Http2ClientImpl { */ boolean offerConnection(Http2Connection c) { if (debug.on()) debug.log("offering to the connection pool: %s", c); - if (c.closed || c.finalStream()) { + if (!c.isOpen() || c.finalStream()) { if (debug.on()) debug.log("skipping offered closed or closing connection: %s", c); return false; @@ -161,6 +160,11 @@ class Http2ClientImpl { String key = c.key(); synchronized(this) { + if (!c.isOpen()) { + if (debug.on()) + debug.log("skipping offered closed or closing connection: %s", c); + return false; + } Http2Connection c1 = connections.putIfAbsent(key, c); if (c1 != null) { c.setFinalStream(); diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java b/src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java index 6a07d755e69684ba34138b7697e128295d7eccf4..8cd9db1210a5e7c041ff73c88a80c7857ae6d91c 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -880,6 +880,10 @@ class Http2Connection { } } + boolean isOpen() { + return !closed && connection.channel().isOpen(); + } + void resetStream(int streamid, int code) { try { if (connection.channel().isOpen()) { diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java b/src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java index 6394b7b3cfa18bdcd29ead3d5dd38450eef607ac..fc2596e0aa4ec05812d5e6345a43d9e0f0bc44cd 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -573,9 +573,7 @@ final class HttpClientImpl extends HttpClient implements Trackable { throw ce; } else if (throwable instanceof SSLHandshakeException) { // special case for SSLHandshakeException - SSLHandshakeException he = new SSLHandshakeException(msg); - he.initCause(throwable); - throw he; + throw new SSLHandshakeException(msg, throwable); } else if (throwable instanceof SSLException) { // any other SSLException is wrapped in a plain // SSLException diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLTube.java b/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLTube.java index 42174ef9c44feacbed750301ba1dbc14bd7162fb..e72ba9d33dc1e3a201bc3c0e08a44314b18ccaf1 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLTube.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -592,9 +592,7 @@ public class SSLTube implements FlowTube { engine.isOutboundDone(), handshakeFailed); - SSLHandshakeException e = new SSLHandshakeException(handshakeFailed); - if (t != null) e.initCause(t); - return e; + return new SSLHandshakeException(handshakeFailed, t); } @Override diff --git a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_de.properties b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_de.properties index e8f4189062c9d7808f116cacee83ebba5c5b31f2..ae2c6bf5cd1567c5db642d27ddf27b7bbdb5845e 100644 --- a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_de.properties +++ b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_de.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_ja.properties b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_ja.properties index ef6246e2e23795ea78950fe8db36bc6b173ec1fb..46261e666e4e3a7c0dbf705bf9cc4d4261a95129 100644 --- a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_ja.properties +++ b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_ja.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_zh_CN.properties b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_zh_CN.properties index 445d5ba87cd11635465081a72cdd9f92eda8bb7d..9a5a2bf4af467f91cae236fc2db26f4e8410c131 100644 --- a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_zh_CN.properties +++ b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_zh_CN.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/make/data/jdwp/jdwp.spec b/src/java.se/share/data/jdwp/jdwp.spec similarity index 100% rename from make/data/jdwp/jdwp.spec rename to src/java.se/share/data/jdwp/jdwp.spec diff --git a/src/java.security.jgss/share/classes/org/ietf/jgss/GSSContext.java b/src/java.security.jgss/share/classes/org/ietf/jgss/GSSContext.java index 1492033c49ce590b18720914302c2ac1c10da570..7bbb89544be3545849402241e6f1db6e141a6adf 100644 --- a/src/java.security.jgss/share/classes/org/ietf/jgss/GSSContext.java +++ b/src/java.security.jgss/share/classes/org/ietf/jgss/GSSContext.java @@ -101,7 +101,7 @@ import java.io.OutputStream; * * The stream-based methods of {@code GSSContext} have been deprecated in * Java SE 11. These methods have also been removed from - * + * * RFC 8353: Generic Security Service API Version 2: Java Bindings Update * for the following reasons (see section 11): "The overloaded methods of * GSSContext that use input and output streams as the means to convey diff --git a/src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5MechFactory.java b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5MechFactory.java index 21b48d58fc226816f5d0e8dd8d200acda5a7ee16..d0acdd5c6e241ba211ef6863905a29fcd2c91978 100644 --- a/src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5MechFactory.java +++ b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5MechFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -146,8 +146,7 @@ public final class Krb5MechFactory implements MechanismFactory { SecurityManager sm = System.getSecurityManager(); if (sm != null) { String realm = (name.getKrb5PrincipalName()).getRealmAsString(); - String tgsPrincipal = - new String("krbtgt/" + realm + '@' + realm); + String tgsPrincipal = "krbtgt/" + realm + '@' + realm; ServicePermission perm = new ServicePermission(tgsPrincipal, "initiate"); try { diff --git a/src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5NameElement.java b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5NameElement.java index ea2e24f6a8a060aaabb5ba210da0105e0a17f30c..b286f2c5844e70c83b0411884f3ba1b072a9c88f 100644 --- a/src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5NameElement.java +++ b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5NameElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,7 +63,7 @@ public class Krb5NameElement /** * Instantiates a new Krb5NameElement object. Internally it stores the * information provided by the input parameters so that they may later - * be used for output when a printable representaion of this name is + * be used for output when a printable representation of this name is * needed in GSS-API format rather than in Kerberos format. * */ @@ -158,7 +158,7 @@ public class Krb5NameElement // Look for @ as in service@host // Assumes host name will not have an escaped '@' - int separatorPos = gssNameStr.lastIndexOf('@', gssNameStr.length()); + int separatorPos = gssNameStr.lastIndexOf('@'); // Not really a separator if it is escaped. Then this is just part // of the principal name or service name diff --git a/src/java.security.jgss/share/classes/sun/security/krb5/EncryptionKey.java b/src/java.security.jgss/share/classes/sun/security/krb5/EncryptionKey.java index 917f0449f179aef1b0d67255ff19aada3d8e60e7..58cc98c14ecd82c6f64c8a0989e220fe7684fffe 100644 --- a/src/java.security.jgss/share/classes/sun/security/krb5/EncryptionKey.java +++ b/src/java.security.jgss/share/classes/sun/security/krb5/EncryptionKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -497,13 +497,13 @@ public class EncryptionKey } public String toString() { - return new String("EncryptionKey: keyType=" + keyType - + " kvno=" + kvno - + " keyValue (hex dump)=" - + (keyValue == null || keyValue.length == 0 ? - " Empty Key" : '\n' - + Krb5.hexDumper.encodeBuffer(keyValue) - + '\n')); + return "EncryptionKey: keyType=" + keyType + + " kvno=" + kvno + + " keyValue (hex dump)=" + + (keyValue == null || keyValue.length == 0 ? + " Empty Key" : '\n' + + Krb5.hexDumper.encodeBuffer(keyValue) + + '\n'); } /** diff --git a/src/java.security.jgss/share/classes/sun/security/krb5/KrbCryptoException.java b/src/java.security.jgss/share/classes/sun/security/krb5/KrbCryptoException.java index 28522e8316dcc4c556abfbcd034ba73285ac6d05..eda5fcec397fc593eba8a8bfb0ec1ab668cc1061 100644 --- a/src/java.security.jgss/share/classes/sun/security/krb5/KrbCryptoException.java +++ b/src/java.security.jgss/share/classes/sun/security/krb5/KrbCryptoException.java @@ -31,7 +31,7 @@ package sun.security.krb5; /** - * KrbCryptoExceptoin is a wrapper exception for exceptions thrown by JCE. + * KrbCryptoException is a wrapper exception for exceptions thrown by JCE. * * @author Yanni Zhang */ @@ -39,7 +39,7 @@ public class KrbCryptoException extends KrbException { private static final long serialVersionUID = -1657367919979982250L; - public KrbCryptoException (String s) { + public KrbCryptoException(String s) { super(s); } } diff --git a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_de.properties b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_de.properties index e1e43a16010cecd4df619ec025dcbaf7fe090f40..84fb41ce788818d1edc8149af2de40a2b491c45d 100644 --- a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_de.properties +++ b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,11 +26,11 @@ # CacheRowSetImpl exceptions cachedrowsetimpl.populate = Ung\u00FCltiges ResultSet-Objekt zum Auff\u00FCllen der Methode angegeben cachedrowsetimpl.invalidp = Ung\u00FCltiger Persistence-Provider generiert -cachedrowsetimpl.nullhash = CachedRowSetImpl-Instanz kann nicht instanziiert werden. Null-Hash-Tabelle f\u00FCr Constructor angegeben +cachedrowsetimpl.nullhash = CachedRowSetImpl-Instanz kann nicht instanziiert werden. Null-Hashtabelle f\u00FCr Constructor angegeben cachedrowsetimpl.invalidop = Ung\u00FCltiger Vorgang beim Zeileneinf\u00FCgen cachedrowsetimpl.accfailed = acceptChanges nicht erfolgreich cachedrowsetimpl.invalidcp = Ung\u00FCltige Cursorposition -cachedrowsetimpl.illegalop = Ung\u00FCltiger Vorgang bei nicht eingef\u00FCgter Zeile +cachedrowsetimpl.illegalop = Unzul\u00E4ssiger Vorgang bei nicht eingef\u00FCgter Zeile cachedrowsetimpl.clonefail = Klonen nicht erfolgreich: {0} cachedrowsetimpl.invalidcol = Ung\u00FCltiger Spaltenindex cachedrowsetimpl.invalcolnm = Ung\u00FCltiger Spaltenname @@ -60,6 +60,7 @@ cachedrowsetimpl.movetoins1 = moveToInsertRow: keine Metadaten cachedrowsetimpl.movetoins2 = moveToInsertRow: ung\u00FCltige Spaltenanzahl cachedrowsetimpl.tablename = Tabellenname darf nicht null sein cachedrowsetimpl.keycols = Ung\u00FCltige Schl\u00FCsselspalten +cachedrowsetimpl.invalidcol = Ung\u00FCltiger Spaltenindex cachedrowsetimpl.opnotsupp = Vorgang nicht von Datenbank unterst\u00FCtzt cachedrowsetimpl.matchcols = \u00DCbereinstimmungsspalten entsprechen nicht den festgelegten Spalten cachedrowsetimpl.setmatchcols = \u00DCbereinstimmungsspalten m\u00FCssen vor dem Abrufen festgelegt werden @@ -79,7 +80,7 @@ cachedrowsetimpl.opnotysupp = Vorgang noch nicht unterst\u00FCtzt cachedrowsetimpl.featnotsupp = Feature nicht unterst\u00FCtzt # WebRowSetImpl exceptions -webrowsetimpl.nullhash = WebRowSetImpl-Instanz kann nicht instanziiert werden. Null-Hash-Tabelle f\u00FCr Constructor angegeben +webrowsetimpl.nullhash = WebRowSetImpl-Instanz kann nicht instanziiert werden. Null-Hashtabelle f\u00FCr Constructor angegeben webrowsetimpl.invalidwr = Ung\u00FCltiger Writer webrowsetimpl.invalidrd = Ung\u00FCltiger Reader diff --git a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ja.properties b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ja.properties index cd40ad2ef42837884eabb474a0044fe4eea56c98..3181e64c1ff686e9d91f544286ba202ea29575d0 100644 --- a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ja.properties +++ b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -60,6 +60,7 @@ cachedrowsetimpl.movetoins1 = moveToInsertRow: \u30E1\u30BF\u30C7\u30FC\u30BF\u3 cachedrowsetimpl.movetoins2 = moveToInsertRow: \u7121\u52B9\u306A\u5217\u6570 cachedrowsetimpl.tablename = \u8868\u540D\u306Bnull\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 cachedrowsetimpl.keycols = \u7121\u52B9\u306A\u30AD\u30FC\u5217 +cachedrowsetimpl.invalidcol = \u7121\u52B9\u306A\u5217\u7D22\u5F15 cachedrowsetimpl.opnotsupp = \u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u306A\u3044\u64CD\u4F5C cachedrowsetimpl.matchcols = \u4E00\u81F4\u5217\u304C\u5217\u306E\u30BB\u30C3\u30C8\u3068\u540C\u3058\u3067\u306F\u3042\u308A\u307E\u305B\u3093 cachedrowsetimpl.setmatchcols = \u4E00\u81F4\u5217\u3092\u53D6\u5F97\u3059\u308B\u524D\u306B\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044 diff --git a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_zh_CN.properties b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_zh_CN.properties index a9f1203518caa09600b935d8d034bb505bc43db4..29d1823149dbc070f4c3b71559e681eb735a8804 100644 --- a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_zh_CN.properties +++ b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -60,6 +60,7 @@ cachedrowsetimpl.movetoins1 = moveToInsertRow: \u65E0\u5143\u6570\u636E cachedrowsetimpl.movetoins2 = moveToInsertRow: \u5217\u6570\u65E0\u6548 cachedrowsetimpl.tablename = \u8868\u540D\u4E0D\u80FD\u4E3A\u7A7A\u503C cachedrowsetimpl.keycols = \u5173\u952E\u5B57\u5217\u65E0\u6548 +cachedrowsetimpl.invalidcol = \u5217\u7D22\u5F15\u65E0\u6548 cachedrowsetimpl.opnotsupp = \u64CD\u4F5C\u4E0D\u53D7\u6570\u636E\u5E93\u652F\u6301 cachedrowsetimpl.matchcols = \u5339\u914D\u5217\u4E0E\u8BBE\u7F6E\u7684\u90A3\u4E9B\u5339\u914D\u5217\u4E0D\u540C cachedrowsetimpl.setmatchcols = \u5728\u83B7\u53D6\u5339\u914D\u5217\u4E4B\u524D\u5148\u8BBE\u7F6E\u5339\u914D\u5217 diff --git a/src/java.sql/share/classes/java/sql/package-info.java b/src/java.sql/share/classes/java/sql/package-info.java index be494454a063d54accf73cc27c4d2787848f57bb..9e94e0b9393a1d5d46f2ef6f72ff6ab19cc0f490 100644 --- a/src/java.sql/share/classes/java/sql/package-info.java +++ b/src/java.sql/share/classes/java/sql/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -334,7 +334,7 @@ * *

    diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/I18n.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/I18n.java index 9b928794c6e44b32d6eeaba674e298670bf07fba..d2d63fc85ff5b14754b07ef81176958b30dc283e 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/I18n.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/I18n.java @@ -160,7 +160,7 @@ public final class I18n { I18n.resourceBundle = ResourceBundle.getBundle( Constants.exceptionMessagesResourceBundleBase, - new Locale(languageCode, countryCode) + Locale.of(languageCode, countryCode) ); alreadyInitialized = true; } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java index f71357900f7052bfb55841158bfea1d52071b756..07ea3779a20e94446efa7957affd15e05d17bf3a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java @@ -481,7 +481,7 @@ public class XSLTErrorResources_de extends ListResourceBundle "Fehler: \"{\" darf nicht im Ausdruck enthalten sein"}, { ER_ILLEGAL_ATTRIBUTE , - "{0} hat ein ung\u00FCltiges Attribut: {1}"}, + "{0} hat ein unzul\u00E4ssiges Attribut: {1}"}, {ER_NULL_SOURCENODE_APPLYIMPORTS , "sourceNode ist null in xsl:apply-imports."}, @@ -526,7 +526,7 @@ public class XSLTErrorResources_de extends ListResourceBundle "Namespace-Pr\u00E4fix kann nicht aufgel\u00F6st werden: {0}"}, { ER_ILLEGAL_VALUE, - "xml:space hat einen ung\u00FCltigen Wert: {0}"}, + "xml:space hat einen unzul\u00E4ssigen Wert: {0}"}, { ER_NO_OWNERDOC, "Der untergeordnete Knoten hat kein Eigent\u00FCmerdokument."}, @@ -646,7 +646,7 @@ public class XSLTErrorResources_de extends ListResourceBundle "Element in Ergebnisbaum kann nicht erstellt werden: {0}"}, { ER_XMLSPACE_ILLEGAL_VALUE, - "xml:space in Quell-XML hat einen ung\u00FCltigen Wert: {0}"}, + "xml:space in Quell-XML hat einen unzul\u00E4ssigen Wert: {0}"}, { ER_NO_XSLKEY_DECLARATION, "Keine xsl:key-Deklaration f\u00FCr {0} vorhanden."}, @@ -673,7 +673,7 @@ public class XSLTErrorResources_de extends ListResourceBundle "indent-result wird nicht mehr unterst\u00FCtzt. Verwenden Sie stattdessen xsl:output."}, { ER_ILLEGAL_ATTRIB, - "(StylesheetHandler) {0} hat ein ung\u00FCltiges Attribut: {1}"}, + "(StylesheetHandler) {0} hat ein unzul\u00E4ssiges Attribut: {1}"}, { ER_UNKNOWN_XSL_ELEM, "Unbekanntes XSL-Element: {0}"}, @@ -706,7 +706,7 @@ public class XSLTErrorResources_de extends ListResourceBundle "(StylesheetHandler) {0} importiert sich direkt oder indirekt selbst."}, { ER_XMLSPACE_ILLEGAL_VAL, - "(StylesheetHandler) xml:space hat einen ung\u00FCltigen Wert: {0}"}, + "(StylesheetHandler) xml:space hat einen unzul\u00E4ssigen Wert: {0}"}, { ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL, "processStylesheet nicht erfolgreich."}, @@ -740,7 +740,7 @@ public class XSLTErrorResources_de extends ListResourceBundle "Pr\u00E4fix in exclude-result-prefixes ist nicht g\u00FCltig: {0}"}, { ER_MISSING_NS_URI, - "Fehlender Namespace-URI f\u00FCr angegebenes Pr\u00E4fix"}, + "Fehlende Namespace-URI f\u00FCr angegebenes Pr\u00E4fix"}, { ER_MISSING_ARG_FOR_OPTION, "Fehlendes Argument f\u00FCr Option: {0}"}, @@ -872,7 +872,7 @@ public class XSLTErrorResources_de extends ListResourceBundle "Stylesheet-Root wurde nicht gefunden."}, { ER_ILLEGAL_XMLSPACE_VALUE, - "Ung\u00FCltiger Wert f\u00FCr xml:space"}, + "Unzul\u00E4ssiger Wert f\u00FCr xml:space"}, { ER_PROCESSFROMNODE_FAILED, "processFromNode nicht erfolgreich"}, @@ -990,7 +990,7 @@ public class XSLTErrorResources_de extends ListResourceBundle "{0}-Attributwert nicht erkannt "}, { ER_NULL_URI_NAMESPACE, - "Versuch, ein Namespace-Pr\u00E4fix mit einem Null-URI zu generieren"}, + "Versuch, ein Namespace-Pr\u00E4fix mit einer Null-URI zu generieren"}, { ER_NUMBER_TOO_BIG, "Versuch, eine Zahl zu formatieren, die gr\u00F6\u00DFer als die gr\u00F6\u00DFte Long-Ganzzahl ist"}, @@ -1272,7 +1272,7 @@ public class XSLTErrorResources_de extends ListResourceBundle "xsl:decimal-format-Namen m\u00FCssen eindeutig sein. Name \"{0}\" wurde dupliziert."}, { WG_ILLEGAL_ATTRIBUTE, - "{0} hat ein ung\u00FCltiges Attribut: {1}"}, + "{0} hat ein unzul\u00E4ssiges Attribut: {1}"}, { WG_COULD_NOT_RESOLVE_PREFIX, "Namespace-Pr\u00E4fix konnte nicht aufgel\u00F6st werden: {0}. Der Knoten wird ignoriert."}, @@ -1281,10 +1281,10 @@ public class XSLTErrorResources_de extends ListResourceBundle "xsl:stylesheet erfordert ein \"version\"-Attribut."}, { WG_ILLEGAL_ATTRIBUTE_NAME, - "Ung\u00FCltiger Attributname: {0}"}, + "Unzul\u00E4ssiger Attributname: {0}"}, { WG_ILLEGAL_ATTRIBUTE_VALUE, - "Ung\u00FCltiger Wert f\u00FCr Attribut {0}: {1}"}, + "Unzul\u00E4ssiger Wert f\u00FCr Attribut {0}: {1}"}, { WG_EMPTY_SECOND_ARG, "Resultierendes NodeSet aus zweitem Argument von Dokumentfunktion ist leer. Geben Sie ein leeres NodeSet zur\u00FCck."}, diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java index 425707e4792ca3ef5e029faadd3b8a95055d48be..ea6eecee48dcf4a9daf0085c48b641f3dfe594ad 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java @@ -167,7 +167,7 @@ public class ErrorMessages_de extends ListResourceBundle { * mentioned in the substitution text is not well-formed syntactically. */ {ErrorMsg.INVALID_URI_ERR, - "Ung\u00FCltiger URI \"{0}\"."}, + "Ung\u00FCltige URI \"{0}\"."}, /* * Note to translators: This message is displayed when the URI @@ -234,7 +234,7 @@ public class ErrorMessages_de extends ListResourceBundle { * text is the offending character. */ {ErrorMsg.ILLEGAL_CHAR_ERR, - "Ung\u00FCltiges Zeichen \"{0}\" in XPath-Ausdruck."}, + "Unzul\u00E4ssiges Zeichen \"{0}\" in XPath-Ausdruck."}, /* * Note to translators: A processing instruction is a mark-up item in @@ -243,7 +243,7 @@ public class ErrorMessages_de extends ListResourceBundle { * text is the name. */ {ErrorMsg.ILLEGAL_PI_ERR, - "Ung\u00FCltiger Name \"{0}\" f\u00FCr Verarbeitungsanweisung."}, + "Unzul\u00E4ssiger Name \"{0}\" f\u00FCr Verarbeitungsanweisung."}, /* * Note to translators: This message is reported if the stylesheet @@ -261,7 +261,7 @@ public class ErrorMessages_de extends ListResourceBundle { * text. */ {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, - "Ung\u00FCltiges Attribut \"{0}\"."}, + "Unzul\u00E4ssiges Attribut \"{0}\"."}, /* * Note to translators: "import" and "include" are keywords that should @@ -321,7 +321,7 @@ public class ErrorMessages_de extends ListResourceBundle { * function has too many or too few arguments. */ {ErrorMsg.ILLEGAL_ARG_ERR, - "Ung\u00FCltige Argumente f\u00FCr Funktionsaufruf."}, + "Unzul\u00E4ssige Argumente f\u00FCr Funktionsaufruf."}, /* * Note to translators: "document()" is the name of function and must @@ -383,7 +383,7 @@ public class ErrorMessages_de extends ListResourceBundle { * element of a type that it was not permitted to contain. */ {ErrorMsg.ILLEGAL_CHILD_ERR, - "Ung\u00FCltiges untergeordnetes Element."}, + "Unzul\u00E4ssiges untergeordnetes Element."}, /* * Note to translators: The stylesheet tried to create an element with diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CollatorFactoryBase.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CollatorFactoryBase.java index ce50940962055ed280ef1d481b0fa42c1498ba0b..1cfd9693901b741b3576d4085cd13945da49c048 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CollatorFactoryBase.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/CollatorFactoryBase.java @@ -38,7 +38,7 @@ public class CollatorFactoryBase implements CollatorFactory { } public Collator getCollator(String lang, String country) { - return Collator.getInstance(new Locale(lang, country)); + return Collator.getInstance(Locale.of(lang, country)); } public Collator getCollator(Locale locale) { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_de.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_de.java index 6b44ace762dcfbe3ac19d332c7ac94f77c5dc919..dadea4ba3b00c259756975ea6c5cc3797b499c48 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_de.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_de.java @@ -149,7 +149,7 @@ public class ErrorMessages_de extends ListResourceBundle { * iterator. (See definition of iterator above.) */ {BasisLibrary.ITERATOR_CLONE_ERR, - "Iterator \"{0}\" kann nicht geclont werden."}, + "Iterator \"{0}\" kann nicht geklont werden."}, /* * Note to translators: The following represents an internal error diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/PropertyManager.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/PropertyManager.java index 4fc9a71b157de69c5c9a43b9c5496c480d753238..98c2c01310ce32ce44172e548f09729399b921bf 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/PropertyManager.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/PropertyManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,6 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ - package com.sun.org.apache.xerces.internal.impl; import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; @@ -39,29 +38,31 @@ import jdk.xml.internal.JdkProperty; import jdk.xml.internal.JdkXmlUtils; /** - * This class manages different properties related to Stax specification and its implementation. - * This class constructor also takes itself (PropertyManager object) as parameter and initializes the - * object with the property taken from the object passed. + * This class manages the properties for the Stax specification and its + * implementation. A PropertyManager object can be constructed based on the + * context or initialized with another PropertyManager object. * * @author Neeraj Bajaj * @author K Venugopal * @author Sunitha Reddy */ - public class PropertyManager { - public static final String STAX_NOTATIONS = "javax.xml.stream.notations"; public static final String STAX_ENTITIES = "javax.xml.stream.entities"; private static final String STRING_INTERNING = "http://xml.org/sax/features/string-interning"; - /** Property identifier: Security manager. */ + /** + * Property identifier: Security manager. + */ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; - /** Property identifier: Security property manager. */ - private static final String XML_SECURITY_PROPERTY_MANAGER = - JdkConstants.XML_SECURITY_PROPERTY_MANAGER; + /** + * Property identifier: Security property manager. + */ + private static final String XML_SECURITY_PROPERTY_MANAGER + = JdkConstants.XML_SECURITY_PROPERTY_MANAGER; HashMap supportedProps = new HashMap<>(); @@ -71,14 +72,18 @@ public class PropertyManager { public static final int CONTEXT_READER = 1; public static final int CONTEXT_WRITER = 2; - /** Creates a new instance of PropertyManager */ + /** + * Creates a new instance of the PropertyManager based on the context. + * + * @param context a flag indicating the context: for a reader or writer. + */ public PropertyManager(int context) { - switch(context){ - case CONTEXT_READER:{ + switch (context) { + case CONTEXT_READER: { initConfigurableReaderProperties(); break; } - case CONTEXT_WRITER:{ + case CONTEXT_WRITER: { initWriterProps(); break; } @@ -86,28 +91,29 @@ public class PropertyManager { } /** - * Initialize this object with the properties taken from passed PropertyManager object. + * Initializes the object with the properties of another + * PropertyManager object. + * + * @param propertyManager another PropertyManager object */ - public PropertyManager(PropertyManager propertyManager){ + public PropertyManager(PropertyManager propertyManager) { HashMap properties = propertyManager.getProperties(); supportedProps.putAll(properties); - fSecurityManager = (XMLSecurityManager)getProperty(SECURITY_MANAGER); - fSecurityPropertyMgr = (XMLSecurityPropertyManager)getProperty(XML_SECURITY_PROPERTY_MANAGER); + fSecurityManager = (XMLSecurityManager) getProperty(SECURITY_MANAGER); + fSecurityPropertyMgr = (XMLSecurityPropertyManager) getProperty(XML_SECURITY_PROPERTY_MANAGER); } - private HashMap getProperties(){ - return supportedProps ; + private HashMap getProperties() { + return supportedProps; } - /** - * Important point: - * 1. We are not exposing Xerces namespace property. Application should configure namespace through - * Stax specific property. + * Initializes reader properties. * + * @implNote: StAX defined namespace rather than Xerces' should be used. */ - private void initConfigurableReaderProperties(){ + private void initConfigurableReaderProperties() { //spec default values supportedProps.put(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE); supportedProps.put(XMLInputFactory.IS_VALIDATING, Boolean.FALSE); @@ -118,18 +124,18 @@ public class PropertyManager { supportedProps.put(XMLInputFactory.REPORTER, null); supportedProps.put(XMLInputFactory.RESOLVER, null); supportedProps.put(XMLInputFactory.ALLOCATOR, null); - supportedProps.put(STAX_NOTATIONS,null ); + supportedProps.put(STAX_NOTATIONS, null); //zephyr (implementation) specific properties which can be set by the application. //interning is always done - supportedProps.put(Constants.SAX_FEATURE_PREFIX + Constants.STRING_INTERNING_FEATURE , true); + supportedProps.put(Constants.SAX_FEATURE_PREFIX + Constants.STRING_INTERNING_FEATURE, true); //recognizing java encoding names by default - supportedProps.put(Constants.XERCES_FEATURE_PREFIX + Constants.ALLOW_JAVA_ENCODINGS_FEATURE, true) ; + supportedProps.put(Constants.XERCES_FEATURE_PREFIX + Constants.ALLOW_JAVA_ENCODINGS_FEATURE, true); //in stax mode, namespace declarations are not added as attributes - supportedProps.put(Constants.ADD_NAMESPACE_DECL_AS_ATTRIBUTE , Boolean.FALSE) ; + supportedProps.put(Constants.ADD_NAMESPACE_DECL_AS_ATTRIBUTE, Boolean.FALSE); supportedProps.put(Constants.READER_IN_DEFINED_STATE, true); supportedProps.put(Constants.REUSE_INSTANCE, true); - supportedProps.put(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.STAX_REPORT_CDATA_EVENT , false); + supportedProps.put(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.STAX_REPORT_CDATA_EVENT, false); supportedProps.put(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.IGNORE_EXTERNAL_DTD, Boolean.FALSE); supportedProps.put(Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_DUPLICATE_ATTDEF_FEATURE, false); supportedProps.put(Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_DUPLICATE_ENTITYDEF_FEATURE, false); @@ -142,61 +148,89 @@ public class PropertyManager { // Initialize Catalog features supportedProps.put(XMLConstants.USE_CATALOG, JdkXmlUtils.USE_CATALOG_DEFAULT); - for( CatalogFeatures.Feature f : CatalogFeatures.Feature.values()) { + for (CatalogFeatures.Feature f : CatalogFeatures.Feature.values()) { supportedProps.put(f.getPropertyName(), null); } supportedProps.put(JdkConstants.CDATA_CHUNK_SIZE, JdkConstants.CDATA_CHUNK_SIZE_DEFAULT); } - private void initWriterProps(){ - supportedProps.put(XMLOutputFactory.IS_REPAIRING_NAMESPACES , Boolean.FALSE); + /** + * Initializes writer properties. + */ + private void initWriterProps() { + supportedProps.put(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE); //default value of escaping characters is 'true' - supportedProps.put(Constants.ESCAPE_CHARACTERS , Boolean.TRUE); + supportedProps.put(Constants.ESCAPE_CHARACTERS, Boolean.TRUE); supportedProps.put(Constants.REUSE_INSTANCE, true); } /** - * public void reset(){ - * supportedProps.clear() ; - * } + * Checks whether a property is managed by the PropertyManager. + * + * @param property the name of a property + * @return true if the property is managed by the PropertyManager, false + * otherwise */ - public boolean containsProperty(String property){ - return supportedProps.containsKey(property) || - (fSecurityManager != null && fSecurityManager.getIndex(property) > -1) || - (fSecurityPropertyMgr!=null && fSecurityPropertyMgr.getIndex(property) > -1) ; + public boolean containsProperty(String property) { + return supportedProps.containsKey(property) + || (fSecurityManager != null && fSecurityManager.getIndex(property) > -1) + || (fSecurityPropertyMgr != null && fSecurityPropertyMgr.getIndex(property) > -1); } - public Object getProperty(String property){ - /** Check to see if the property is managed by the security manager **/ - String propertyValue = (fSecurityManager != null) ? - fSecurityManager.getLimitAsString(property) : null; + /** + * Returns the value of a property. + * + * @param property the name of the property + * @return the value of a property + */ + public Object getProperty(String property) { + /** + * Check to see if the property is managed by the security manager * + */ + String propertyValue = (fSecurityManager != null) + ? fSecurityManager.getLimitAsString(property) : null; + /** + * Check to see if the property is managed by the security property + * manager + */ + if (propertyValue == null) { + propertyValue = (fSecurityPropertyMgr != null) + ? fSecurityPropertyMgr.getValue(property) : null; + } return propertyValue != null ? propertyValue : supportedProps.get(property); } - public void setProperty(String property, Object value){ - String equivalentProperty = null ; - if(property.equals(XMLInputFactory.IS_NAMESPACE_AWARE)){ - equivalentProperty = Constants.XERCES_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE ; - } - else if(property.equals(XMLInputFactory.IS_VALIDATING)){ - if( (value instanceof Boolean) && ((Boolean)value).booleanValue()){ - throw new java.lang.IllegalArgumentException("true value of isValidating not supported") ; + /** + * Sets a property value. + * + * @param property the name of the property + * @param value the value of the property + */ + public void setProperty(String property, Object value) { + String equivalentProperty = null; + if (property.equals(XMLInputFactory.IS_NAMESPACE_AWARE)) { + equivalentProperty = Constants.XERCES_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE; + } else if (property.equals(XMLInputFactory.IS_VALIDATING)) { + if ((value instanceof Boolean) && ((Boolean) value)) { + throw new IllegalArgumentException("true value of isValidating not supported"); } - } - else if(property.equals(STRING_INTERNING)){ - if( (value instanceof Boolean) && !((Boolean)value).booleanValue()){ - throw new java.lang.IllegalArgumentException("false value of " + STRING_INTERNING + "feature is not supported") ; + } else if (property.equals(STRING_INTERNING)) { + if ((value instanceof Boolean) && !((Boolean) value)) { + throw new IllegalArgumentException("false value of " + + STRING_INTERNING + "feature is not supported"); } - } - else if(property.equals(XMLInputFactory.RESOLVER)){ + } else if (property.equals(XMLInputFactory.RESOLVER)) { //add internal stax property - supportedProps.put( Constants.XERCES_PROPERTY_PREFIX + Constants.STAX_ENTITY_RESOLVER_PROPERTY , new StaxEntityResolverWrapper((XMLResolver)value)) ; + supportedProps.put(Constants.XERCES_PROPERTY_PREFIX + + Constants.STAX_ENTITY_RESOLVER_PROPERTY, + new StaxEntityResolverWrapper((XMLResolver) value)); } /** - * It's possible for users to set a security manager through the interface. - * If it's the old SecurityManager, convert it to the new XMLSecurityManager + * It's possible for users to set a security manager through the + * interface. If it's the old SecurityManager, convert it to the new + * XMLSecurityManager */ if (property.equals(Constants.SECURITY_MANAGER)) { fSecurityManager = XMLSecurityManager.convert(value, fSecurityManager); @@ -207,29 +241,30 @@ public class PropertyManager { if (value == null) { fSecurityPropertyMgr = new XMLSecurityPropertyManager(); } else { - fSecurityPropertyMgr = (XMLSecurityPropertyManager)value; + fSecurityPropertyMgr = (XMLSecurityPropertyManager) value; } supportedProps.put(JdkConstants.XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); return; } //check if the property is managed by security manager - if (fSecurityManager == null || - !fSecurityManager.setLimit(property, JdkProperty.State.APIPROPERTY, value)) { + if (fSecurityManager == null + || !fSecurityManager.setLimit(property, JdkProperty.State.APIPROPERTY, value)) { //check if the property is managed by security property manager - if (fSecurityPropertyMgr == null || - !fSecurityPropertyMgr.setValue(property, XMLSecurityPropertyManager.State.APIPROPERTY, value)) { + if (fSecurityPropertyMgr == null + || !fSecurityPropertyMgr.setValue(property, XMLSecurityPropertyManager.State.APIPROPERTY, value)) { //fall back to the existing property manager supportedProps.put(property, value); } } - if(equivalentProperty != null){ - supportedProps.put(equivalentProperty, value ) ; + if (equivalentProperty != null) { + supportedProps.put(equivalentProperty, value); } } - public String toString(){ + @Override + public String toString() { return supportedProps.toString(); } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties index 0b8ee27b51ef64d734364dd6c2336c9520c331e5..5b802e6ea58ef6faeded656644771cd767543d3d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces # DOM implementation. # @@ -39,7 +14,7 @@ HIERARCHY_REQUEST_ERR = Es wurde versucht, einen Knoten an einer Stelle einzuf\ INDEX_SIZE_ERR = Index oder Gr\u00F6\u00DFe ist negativ oder gr\u00F6\u00DFer als der zul\u00E4ssige Wert. INUSE_ATTRIBUTE_ERR = Es wurde versucht, ein Attribut hinzuzuf\u00FCgen, das bereits an einer anderen Stelle verwendet wird. INVALID_ACCESS_ERR = Ein Parameter oder Vorgang wird nicht vom zugrunde liegenden Objekt unterst\u00FCtzt. -INVALID_CHARACTER_ERR = Ung\u00FCltiges XML-Zeichen angegeben. +INVALID_CHARACTER_ERR = Ung\u00FCltiges oder unzul\u00E4ssiges XML-Zeichen angegeben. INVALID_MODIFICATION_ERR = Es wurde versucht, den Typ des zugrunde liegenden Objekts zu \u00E4ndern. INVALID_STATE_ERR = Es wurde versucht, ein Objekt zu \u00E4ndern, das nicht verwendet werden kann. NAMESPACE_ERR = Es wurde versucht, ein Objekt auf eine Weise zu erstellen oder zu \u00E4ndern, die falsch in Bezug auf Namespaces ist. @@ -47,7 +22,7 @@ NOT_FOUND_ERR = Es wurde versucht, einen Knoten in einem Kontext zu referenziere NOT_SUPPORTED_ERR = Der angeforderte Typ des Objekts oder Vorgangs wird nicht von der Implementierung unterst\u00FCtzt. NO_DATA_ALLOWED_ERR = Daten wurden f\u00FCr einen Knoten angegeben, der keine Daten unterst\u00FCtzt. NO_MODIFICATION_ALLOWED_ERR = Es wurde versucht, ein Objekt zu \u00E4ndern, bei dem \u00C4nderungen nicht zul\u00E4ssig sind. -SYNTAX_ERR = Ung\u00FCltige Zeichenfolge angegeben. +SYNTAX_ERR = Ung\u00FCltige oder unzul\u00E4ssige Zeichenfolge angegeben. VALIDATION_ERR = Aufruf einer Methode wie insertBefore oder removeChild w\u00FCrde die Dokumentgrammatik des Knotens ung\u00FCltig machen. WRONG_DOCUMENT_ERR = Ein Knoten wird in einem anderen Dokument verwendet als dem, von dem er erstellt wurde. TYPE_MISMATCH_ERR = Der Werttyp f\u00FCr diesen Parameternamen ist nicht mit dem erwarteten Werttyp kompatibel. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties index e2f923e618158366d37a36c3ad131176f7b76a10..c6fe53e399b0bc9f3f089f0e5116b100a8ac82d2 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces # DOM implementation. # diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties index c59decb1b3de7a5ae63fbdd10b1bd06f13691008..2f74f54fbaba5c5c8953b717a8013f0d750db200 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces # DOM implementation. # diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties index 1d9f1a082fac474cdf1f08d2cb227fdcdad64e72..4bbbaea3b1ffc9c87465163e6f3058aa9eb93533 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties index 84d90d0fd416b3f939efb41a39fd647ee063aa3d..a8ef5dbddc0774cd75e5a45bfeb30b612858ef31 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties index 21a3e3c99190f41870e67d57a7075bdf539a6bb0..e5b9aca2e702e15100340d2f2ef6b580f7af46e7 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties index d9a740adbd805f85da6c4668b9b9f41e9952a705..820fc8fb2e3dc5951230f44bff32900c94792ec4 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties index 86120a72476e538ea8a9b79ebb4ec7aa309e3318..267c886ffed92d127e725354990163ca63f1fafd 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties index 9cc5ccb25f2fb60601bfff8d505fe5265d2678e4..9ffbd1c608e1a72b8ecc4652a9ddaf89df22cb85 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties index 2b99e3461e1e4e9aba0c5c9ee4f8545a29e0a529..4f6a8717006b3f0a60395cfa06ab386cb27d1ad7 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces # SAX implementation. # diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties index 21978c587cb20d3051f8a58b19db753e5a1f6206..0c6c98dc312b4bcbe1ef4cc6fb9aa305ea8a865d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces # SAX implementation. # diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties index cc07506f88800d593b68fa54a3678384f9b3664d..0d6e7a122428ddcea6a13ea98ac9236a91275a90 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces # SAX implementation. # diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_de.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_de.properties index 45c47c62709cceb081fbaec9bf5275c90bc14855..412d96f917e259c041c7abf2f31a26d87b3c42a4 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_de.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_de.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# 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. -# - # Messages for message reporting BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n @@ -51,7 +26,7 @@ MultipleRootElements = Ein ordnungsgem\u00E4\u00DF formatiertes Dokument darf ni ContentIllegalAtTopLevel = Der Ersatz eines "include"-Elements, das als Dokumentelement im Quell-Infoset der obersten Ebene angezeigt wird, darf keine Zeichen enthalten. UnexpandedEntityReferenceIllegal = Der Ersatz eines "include"-Elements, das als Dokumentelement im Quell-Infoset der obersten Ebene angezeigt wird, darf keine nicht erweiterten Entityreferenzen enthalten. HrefFragmentIdentifierIllegal = Fragment-IDs d\u00FCrfen nicht verwendet werden. Der "href"-Attributwert "{0}" ist nicht zul\u00E4ssig. -HrefSyntacticallyInvalid = "href"-Attributwert "{0}" hat eine ung\u00FCltige Syntax. Nach Anwenden der Escape-Regeln ist der Wert kein syntaktisch korrekter URI oder IRI. +HrefSyntacticallyInvalid = "href"-Attributwert "{0}" hat eine ung\u00FCltige Syntax. Nach Anwenden der Escape-Regeln ist der Wert keine syntaktisch korrekte URI oder IRI. XPointerStreamability = Es wurde ein xpointer angegeben, der auf eine Stelle im Quell-Infoset verweist. Auf diese Stelle kann aufgrund des Streamingcharakters des Prozessors nicht zugegriffen werden. XPointerResolutionUnsuccessful = XPointer-Aufl\u00F6sung nicht erfolgreich. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_ja.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_ja.properties index 2034e72751e73eeba4d58cfde49cc2c7f316bbc2..55abfda9b23fb2a7787cb1acbdfd2b25c2fe0a9e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_ja.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_ja.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# 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. -# - # Messages for message reporting BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_zh_CN.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_zh_CN.properties index 3231b7318926104db9de348d154e3cde5dab2f9f..8e32a7337a18c150c19c5109e4e646381312161a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_zh_CN.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_zh_CN.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# 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. -# - # Messages for message reporting BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties index e535ffc74b2cf600334f0dd97dac8d44c4cbe3e4..3848d68aa2e02d51a30f80842b3e086c96e31362 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties @@ -123,7 +123,7 @@ InvalidHighSurrogate = High-Surrogate-Bits in UTF-8-Sequenz d\u00FCrfen 0x10 nicht \u00FCberschreiten, gefunden wurde aber 0x{0}. OperationNotSupported = Vorgang "{0}" nicht unterst\u00FCtzt von {1}-Reader. InvalidASCII = Byte "{0}" geh\u00F6rt nicht zum (7-Bit) ASCII-Zeichensatz. - CharConversionFailure = Eine Entity, f\u00FCr die eine bestimmte Codierung ermittelt wurde, darf keine Sequenzen enthalten, die in dieser Codierung ung\u00FCltig sind. + CharConversionFailure = Eine Entity, f\u00FCr die eine bestimmte Codierung ermittelt wurde, darf keine Sequenzen enthalten, die in dieser Codierung unzul\u00E4ssig sind. # DTD Messages # 2.2 Characters @@ -278,7 +278,7 @@ # Namespaces support # 4. Using Qualified Names - IllegalQName = Element oder Attribut stimmt nicht mit QName-Production \u00FCberein: QName::=(NCName':')?NCName. + IllegalQName = Element oder Attribut "{0}" stimmt nicht mit QName-Produktion \u00FCberein: QName::=(NCName'':'')?NCName. ElementXMLNSPrefix = Element "{0}" darf nicht "xmlns" als Pr\u00E4fix enthalten. ElementPrefixUnbound = Pr\u00E4fix "{0}" f\u00FCr Element "{1}" ist nicht gebunden. AttributePrefixUnbound = Pr\u00E4fix "{2}" f\u00FCr Attribut "{1}", das mit Elementtyp "{0}" verkn\u00FCpft ist, ist nicht gebunden. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties index 859b35309087ef96c6cb667963a8ab250a1d9696..7001ef4526606eae8571d40586439d2c01787b1c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties @@ -278,7 +278,7 @@ # Namespaces support # 4. Using Qualified Names - IllegalQName = \u8981\u7D20\u307E\u305F\u306F\u5C5E\u6027\u304CQName\u751F\u6210\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093: QName::=(NCName':')?NCName\u3002 + IllegalQName = \u8981\u7D20\u307E\u305F\u306F\u5C5E\u6027"{0}"\u304CQName\u751F\u6210\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093: QName::=(NCName'':'')?NCName\u3002 ElementXMLNSPrefix = \u8981\u7D20"{0}"\u306E\u63A5\u982D\u8F9E\u3068\u3057\u3066"xmlns"\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002 ElementPrefixUnbound = \u8981\u7D20"{1}"\u306E\u63A5\u982D\u8F9E"{0}"\u304C\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 AttributePrefixUnbound = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027"{1}"\u306E\u63A5\u982D\u8F9E"{2}"\u304C\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties index 781b2c640c826075ab0310a4222e0075720e2faa..ac05ad875c6525c7692bdef5f7c0703adb1f7c38 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties @@ -278,7 +278,7 @@ # Namespaces support # 4. Using Qualified Names - IllegalQName = \u5143\u7D20\u6216\u5C5E\u6027\u4E0D\u5339\u914D QName \u751F\u4EA7: QName::=(NCName':')?NCName\u3002 + IllegalQName = \u5143\u7D20\u6216\u5C5E\u6027 "{0}" \u4E0D\u5339\u914D QName \u751F\u4EA7\uFF1AQName::=(NCName'':'')?NCName\u3002 ElementXMLNSPrefix = \u5143\u7D20 "{0}" \u4E0D\u80FD\u4F7F\u7528 "xmlns" \u4F5C\u4E3A\u524D\u7F00\u3002 ElementPrefixUnbound = \u5143\u7D20 "{1}" \u7684\u524D\u7F00 "{0}" \u672A\u7ED1\u5B9A\u3002 AttributePrefixUnbound = \u4E0E\u5143\u7D20\u7C7B\u578B "{0}" \u76F8\u5173\u8054\u7684\u5C5E\u6027 "{1}" \u7684\u524D\u7F00 "{2}" \u672A\u7ED1\u5B9A\u3002 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties index 7c864068a949d15dcf58cd1a9459be463dcffb5c..9ca2596f92edf15f13191de7c0fca201ae08e7a0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. @@ -64,7 +39,6 @@ cvc-complex-type.2.4.b = cvc-complex-type.2.4.b: Content des Elements ''{0}'' ist nicht vollst\u00E4ndig. ''{1}'' wird erwartet. cvc-complex-type.2.4.c = cvc-complex-type.2.4.c: \u00DCbereinstimmungsplatzhalter ist streng, aber es kann keine Deklaration f\u00FCr Element ''{0}'' gefunden werden. cvc-complex-type.2.4.d = cvc-complex-type.2.4.d: Ung\u00FCltiger Content wurde beginnend mit Element ''{0}'' gefunden. An dieser Stelle wird kein untergeordnetes Element erwartet. - cvc-complex-type.2.4.d.1 = cvc-complex-type.2.4.d: Ung\u00FCltiger Content wurde beginnend mit Element ''{0}'' gefunden. An dieser Stelle wird kein untergeordnetes Element ''{1}'' erwartet. cvc-complex-type.2.4.e = cvc-complex-type.2.4.e: "{0}" darf maximal "{2}"-mal in der aktuellen Abfolge auftreten. Dieser Grenzwert wurde \u00FCberschritten. An dieser Stelle wird eines von "{1}" erwartet. cvc-complex-type.2.4.f = cvc-complex-type.2.4.e: "{0}" darf maximal "{1}"-mal in der aktuellen Abfolge auftreten. Dieser Grenzwert wurde \u00FCberschritten. An dieser Stelle wird kein untergeordnetes Element erwartet. cvc-complex-type.2.4.g = cvc-complex-type.2.4.g: Ung\u00FCltigen Inhalt gefunden, der mit Element "{0}" beginnt. "{1}" soll erwartungsgem\u00E4\u00DF mindestens "{2}"-mal in der aktuellen Abfolge auftreten. Eine weitere Instanz ist erforderlich, um diesen Constraint zu erf\u00FCllen. @@ -259,14 +233,14 @@ rcase-MapAndSum.2 = rcase-MapAndSum.2: Vorkommensbereich der Gruppe ({0},{1}) ist keine g\u00FCltige Einschr\u00E4nkung des Vorkommensbereichs der Basisgruppe ({2},{3}). rcase-NameAndTypeOK.1 = rcase-NameAndTypeOK.1: Elemente haben Namen und Ziel-Namespaces, die nicht identisch sind: Element ''{0}'' in Namespace ''{1}'' und Element ''{2}'' in Namespace ''{3}''. rcase-NameAndTypeOK.2 = rcase-NameAndTypeOK.2: Fehler beim Partikel, dessen '{'term'}' die Elementdeklaration ''{0}'' ist. '{'nillable'}' ist bei der Elementdeklaration ''true'', aber das entsprechende Partikel im Basistyp hat eine Elementdeklaration, bei der '{'nillable'}' ''false'' ist. - rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3: Fehler beim Partikel, dessen '{'term'}' die Elementdeklaration ''{0}'' ist. Der Vorkommensbereich ({1},{2}) ist keine g\u00FCltige Einschr\u00E4nkung des Bereichs ({3},{4}) des entsprechenden Partikels im Basistyp. + rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3: Fehler beim Partikel, dessen "{''term''}" die Elementdeklaration "{0}" ist. Der Vorkommensbereich ({1},{2}) ist keine g\u00FCltige Einschr\u00E4nkung des Bereichs ({3},{4}) des entsprechenden Partikels im Basistyp. rcase-NameAndTypeOK.4.a = rcase-NameAndTypeOK.4.a: Element ''{0}'' ist nicht fest, aber das entsprechende Element im Basistyp ist fest mit Wert ''{1}''. rcase-NameAndTypeOK.4.b = rcase-NameAndTypeOK.4.b: Element ''{0}'' ist fest mit dem Wert ''{1}'', aber das entsprechende Element im Basistyp ist fest mit Wert ''{2}''. rcase-NameAndTypeOK.5 = rcase-NameAndTypeOK.5: Identity Constraints f\u00FCr Element ''{0}'' sind keine Teilmenge der Constraints in der Basis. rcase-NameAndTypeOK.6 = rcase-NameAndTypeOK.6: Die unzul\u00E4ssigen Substitutionen f\u00FCr Element ''{0}'' sind keine Obermenge der Substitutionen in der Basis. rcase-NameAndTypeOK.7 = rcase-NameAndTypeOK.7: Typ des Elements ''{0}'' ''{1}'' wurde nicht vom Typ des Basiselements ''{2}'' abgeleitet. rcase-NSCompat.1 = rcase-NSCompat.1: Element ''{0}'' hat den Namespace ''{1}''. Dies wird vom Platzhalter in der Basis nicht zugelassen. - rcase-NSCompat.2 = rcase-NSCompat.2: Fehler beim Partikel, dessen '{'term'}' die Elementdeklaration ''{0}'' ist. Der Vorkommensbereich ({1},{2}) ist keine g\u00FCltige Einschr\u00E4nkung des Bereichs ({3},{4}) des entsprechenden Partikels im Basistyp. + rcase-NSCompat.2 = rcase-NSCompat.2: Fehler beim Partikel, dessen "{''term''}" die Elementdeklaration "{0}" ist. Der Vorkommensbereich ({1},{2}) ist keine g\u00FCltige Einschr\u00E4nkung des Bereichs ({3},{4}) des entsprechenden Partikels im Basistyp. rcase-NSRecurseCheckCardinality.1 = rcase-NSRecurseCheckCardinality.1: Es ist keine vollst\u00E4ndige Funktionszuordnung zwischen den Partikeln vorhanden. rcase-NSRecurseCheckCardinality.2 = rcase-NSRecurseCheckCardinality.2: Vorkommensbereich der Gruppe ({0},{1}) ist keine g\u00FCltige Einschr\u00E4nkung des Bereichs des Basisplatzhalters ({2},{3}). rcase-NSSubset.1 = rcase-NSSubset.1: Platzhalter ist keine Teilmenge des entsprechenden Platzhalters in der Basis. @@ -311,15 +285,15 @@ EmptyTargetNamespace = EmptyTargetNamespace: In Schemadokument ''{0}'' kann der Wert des ''targetNamespace''-Attributs keine leere Zeichenfolge sein. FacetValueFromBase = FacetValueFromBase: In der Deklaration von Typ ''{0}'' muss der Wert ''{1}'' von Facet ''{2}'' aus dem Wertebereich des Basistyps ''{3}'' stammen. FixedFacetValue = FixedFacetValue: In der Definition von {3} ist der Wert ''{1}'' f\u00FCr Facet ''{0}'' ung\u00FCltig, da der Wert f\u00FCr ''{0}'' in einem der Vorg\u00E4ngertypen auf ''{2}'' gesetzt wurde und ''{''fixed'}''' = true ist. - InvalidRegex = InvalidRegex: Musterwert ''{0}'' ist kein g\u00FCltiger regul\u00E4rer Ausdruck. Der gemeldete Fehler war: ''{1}'' bei Spalte ''{2}''. - MaxOccurLimit = Aktuelle Konfiguration des Parsers l\u00E4sst nicht zu, dass ein maxOccurs-Attributwert auf einen h\u00F6heren Wert als {0} gesetzt wird. + InvalidRegex = InvalidRegex: Musterwert "{0}" ist kein g\u00FCltiger regul\u00E4rer Ausdruck. Der gemeldete Fehler war: "{1}". + MaxOccurLimit = Aktuelle Konfiguration des Parsers l\u00E4sst nicht zu, dass ein Inhaltsmodell so erweitert wird, dass ein komplexer Typ mehr als {0} Knoten enth\u00E4lt. PublicSystemOnNotation = PublicSystemOnNotation: Mindestens eines der Elemente 'public' und 'system' muss im Element 'notation' vorkommen. SchemaLocation = SchemaLocation: schemaLocation-Wert = ''{0}'' muss eine gerade Anzahl an URIs haben. TargetNamespace.1 = TargetNamespace.1: Namespace ''{0}'' wird erwartet, aber der Ziel-Namespace des Schemadokuments ist ''{1}''. TargetNamespace.2 = TargetNamespace.2: Kein Namespace wird erwartet, aber das Schemadokument hat den Ziel-Namespace ''{1}''. UndeclaredEntity = UndeclaredEntity: Entity ''{0}'' ist nicht deklariert. UndeclaredPrefix = UndeclaredPrefix: ''{0}'' kann nicht als QName aufgel\u00F6st werden: Pr\u00E4fix ''{1}'' ist nicht deklariert. - + FacetsContradict = FacetsContradict: F\u00FCr simpleType-Definition "{2}" widerspricht der Enumerationswert "{0}" dem Wert von Facet "{1}". # JAXP 1.2 schema source property errors diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties index b4d9ffafe78711a61ec24fba1014507f9d78606f..bcf6b336eb7aa4e39a6b07009c5a6d502d55a6e0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties index 602d1314ac64df5bfc521c305c68a2d96bbda114..4e9a16dcb4f1c19633c2431095eb9ec06b9c7831 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties index 3c1d9d8282cf29c7bdd836d6a19c4a934c21e306..c5b5cdbd949a21a52d0180448f739d4fcf2b5833 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores error messages for the Xerces XML # serializer. Many DOM Load/Save error messages also # live here, since the serializer largely implements that package. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties index 341497c9a6f3870380d5f07def46fe6775a8c709..b61a63b5b748314fc761b8dca05cddf7ea303319 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores error messages for the Xerces XML # serializer. Many DOM Load/Save error messages also # live here, since the serializer largely implements that package. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties index d8b2eb0bba5bec105a7c0ecdfd455cbe903ba5fc..4db14a65c4dd1a1bb9a82d768821a9ce322f6dc7 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores error messages for the Xerces XML # serializer. Many DOM Load/Save error messages also # live here, since the serializer largely implements that package. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties index dc787a6cd3dc02a6e6de8415f624d6b883a85e41..3d33f7b86995ac6731587e93b71ead8d3247c21a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties index e12a67655f8f1ba4b2ac182581b2879e44121c0d..a93488316057c0538fb26e22be5c954827cdac29 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties index cbbaad08e7ba4703e7d0ae4436a06bf70a610dbe..bbf46c70eb7fe52c1eb86de91e20043349bf837e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_de.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_de.properties index 549f517840cb8d1336b5172bc659d833ee4a4257..816e86b09a8c2b4a39cd5d3d8b5def918d61c838 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_de.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_de.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - parser.parse.1=Falsches Zeichen. parser.parse.2=Ung\u00FCltige Referenznummer. parser.next.1=Nach \\ ist ein Zeichen erforderlich. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_ja.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_ja.properties index fcc5ed576fb31d6219a5d0c37245ab4ad3fd1f37..09ffd559f5056102d9304c7258cd53d8f51040fb 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_ja.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_ja.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# 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. -# - parser.parse.1=\u6587\u5B57\u304C\u9055\u3063\u3066\u3044\u307E\u3059\u3002 parser.parse.2=\u7121\u52B9\u306A\u53C2\u7167\u756A\u53F7\u3067\u3059\u3002 parser.next.1=\\\u306E\u5F8C\u306B\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_zh_CN.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_zh_CN.properties index ee68bbdbcea5965693f2ce27aa877f739f7e0050..ab2e56846a9aeac3f8c41c551b7ec5b18f9dddf9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_zh_CN.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_zh_CN.properties @@ -1,28 +1,3 @@ -# -# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - parser.parse.1=\u5B57\u7B26\u9519\u8BEF\u3002 parser.parse.2=\u5F15\u7528\u53F7\u65E0\u6548\u3002 parser.next.1=\\ \u540E\u9762\u5FC5\u987B\u6709\u5B57\u7B26\u3002 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java index 46582fefd1b6f4bfc386d863640fef534bae2e78..fbb758def47166a5aa2d0bf671ddd58a792eebe2 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2425,12 +2425,12 @@ public class XMLGregorianCalendarImpl if (lang != null) { if (country != null) { if (variant != null) { - locale = new Locale(lang, country, variant); + locale = Locale.of(lang, country, variant); } else { - locale = new Locale(lang, country); + locale = Locale.of(lang, country); } } else { - locale = new Locale(lang); + locale = Locale.of(lang); } } if (locale == null) { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java index 5b85917759819384a578fbbd781ea088ed50604b..3c53ea089560645b5d1b5d1a71f3ea6f43b012dc 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java @@ -286,7 +286,7 @@ public class XMLErrorResources_de extends ListResourceBundle "Ung\u00FCltige Portnummer"}, { ER_FRAG_FOR_GENERIC_URI, - "Fragment kann nur f\u00FCr einen generischen URI festgelegt werden"}, + "Fragment kann nur f\u00FCr eine generische URI festgelegt werden"}, { ER_FRAG_WHEN_PATH_NULL, "Fragment kann nicht festgelegt werden, wenn der Pfad null ist"}, diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java index 93a4dd8d301f3726616266d0e3be1c588d7e5e37..126f5d152550b5b8a0f0089dd97a4266e44c7a6b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2022, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -20,6 +20,7 @@ package com.sun.org.apache.xml.internal.serializer; +import com.sun.org.apache.xerces.internal.util.XMLChar; import com.sun.org.apache.xml.internal.serializer.dom3.DOMConstants; import com.sun.org.apache.xml.internal.serializer.utils.MsgKey; import com.sun.org.apache.xml.internal.serializer.utils.Utils; @@ -54,7 +55,7 @@ import org.xml.sax.SAXException; * serializers (xml, html, text ...) that write output to a stream. * * @xsl.usage internal - * @LastModified: June 2021 + * @LastModified: Mar 2022 */ abstract public class ToStream extends SerializerBase { @@ -1745,13 +1746,19 @@ abstract public class ToStream extends SerializerBase { } else { - /* This if check is added to support control characters in XML 1.1. - * If a character is a Control Character within C0 and C1 range, it is desirable - * to write it out as Numeric Character Reference(NCR) regardless of XML Version - * being used for output document. + /* + * The check was added to support control characters in XML 1.1. + * It previously wrote Control Characters within C0 and C1 range + * as Numeric Character Reference(NCR) regardless of XML Version, + * which was incorrect as Control Characters are invalid in XML 1.0. */ - if (isCharacterInC0orC1Range(ch) || - (XMLVERSION11.equals(getVersion()) && isNELorLSEPCharacter(ch))) + boolean isVer11 = XMLVERSION11.equals(getVersion()); + if (!isVer11 && XMLChar.isInvalid(ch)) { + throw new org.xml.sax.SAXException(Utils.messages.createMessage( + MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, + new Object[]{Integer.toHexString(ch)})); + } + if (isCharacterInC0orC1Range(ch) || (isVer11 && isNELorLSEPCharacter(ch))) { writeCharRef(writer, ch); } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java index bc444738f1af248b5003245f177f7019210697b1..1874693ccfeaf660d491f441098fe0d13bc48277 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_de.java @@ -162,7 +162,7 @@ public class SerializerMessages_de extends ListResourceBundle { "Fragment kann nicht festgelegt werden, wenn der Pfad null ist" }, { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Fragment kann nur f\u00FCr einen generischen URI festgelegt werden" }, + "Fragment kann nur f\u00FCr eine generische URI festgelegt werden" }, { MsgKey.ER_NO_SCHEME_IN_URI, "Kein Schema gefunden in URI" }, diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/LocaleUtility.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/LocaleUtility.java index d63e26aafd45766fe26ff2e5b94d1582ca83b314..e08a619dd61f147c5621c56872e5eb47e238cf11 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/LocaleUtility.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/LocaleUtility.java @@ -78,7 +78,7 @@ public class LocaleUtility { variant = EMPTY_STRING; } - return new Locale(language, country, variant ); + return Locale.of(language, country, variant); } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java index db9a3fdbc2e228f7581f34c27d55268ee48d95a3..7b3c5473e5e7002331ab9490a06949f755228f4d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java @@ -1,6 +1,5 @@ /* - * reserved comment block - * DO NOT REMOVE OR ALTER! + * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import java.util.ListResourceBundle; * Also you need to update the count of messages(MAX_CODE)or * the count of warnings(MAX_WARNING) [ Information purpose only] * @xsl.usage advanced + * @LastModified: Nov 2021 */ public class XPATHErrorResources_de extends ListResourceBundle { @@ -150,6 +150,10 @@ public class XPATHErrorResources_de extends ListResourceBundle "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG"; public static final String ER_PREDICATE_ILLEGAL_SYNTAX = "ER_PREDICATE_ILLEGAL_SYNTAX"; + public static final String ER_PREDICATE_TOO_MANY_OPEN = + "ER_PREDICATE_TOO_MANY_OPEN"; + public static final String ER_COMPILATION_TOO_MANY_OPERATION = + "ER_COMPILATION_TOO_MANY_OPERATION"; public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME"; public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE"; public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED = @@ -318,6 +322,10 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE"; public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER"; public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER"; + public static final String ER_PROPERTY_NAME_NULL = "ER_PROPERTY_NAME_NULL"; + public static final String ER_PROPERTY_UNKNOWN = "ER_PROPERTY_UNKNOWN"; + public static final String ER_GETTING_NULL_PROPERTY = "ER_GETTING_NULL_PROPERTY"; + public static final String ER_GETTING_UNKNOWN_PROPERTY = "ER_GETTING_UNKNOWN_PROPERTY"; //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation public static final String WG_LOCALE_NAME_NOT_HANDLED = @@ -435,7 +443,7 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = "ERROR. Unbekannter Vorgangscode: {0}"}, { ER_EXTRA_ILLEGAL_TOKENS, - "Zus\u00E4tzliche ung\u00FCltige Tokens: {0}"}, + "Zus\u00E4tzliche unzul\u00E4ssige Tokens: {0}"}, { ER_EXPECTED_DOUBLE_QUOTE, "Literal in falschen Anf\u00FChrungszeichen... Doppelte Anf\u00FChrungszeichen erwartet."}, @@ -462,10 +470,16 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = "\",\" gefunden, aber kein folgendes Argument vorhanden."}, { ER_PREDICATE_ILLEGAL_SYNTAX, - "\"..[predicate]\" oder \".[predicate]\" ist ung\u00FCltige Syntax. Verwenden Sie stattdessen \"self::node()[predicate]\"."}, + "\"..[predicate]\" oder \".[predicate]\" ist unzul\u00E4ssige Syntax. Verwenden Sie stattdessen \"self::node()[predicate]\"."}, + + { ER_PREDICATE_TOO_MANY_OPEN, + "Stack\u00FCberlauf beim Parsen von {0} bei {1}. Es sind zu viele offene Pr\u00E4dikate vorhanden ({2})."}, + + { ER_COMPILATION_TOO_MANY_OPERATION, + "Stack\u00FCberlauf beim Kompilieren des Ausdrucks. Es sind zu viele Vorg\u00E4nge vorhanden ({0})."}, { ER_ILLEGAL_AXIS_NAME, - "Ung\u00FCltiger Achsenname: {0}"}, + "Unzul\u00E4ssiger Achsenname: {0}"}, { ER_UNKNOWN_NODETYPE, "Unbekannter Knotentyp: {0}"}, @@ -826,6 +840,26 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = { ER_NULL_XPATH_VARIABLE_RESOLVER, "Versuch, Null-XPathVariableResolver festzulegen:{0}#setXPathVariableResolver(null)"}, + /** Field ER_PROPERTY_NAME_NULL */ + + { ER_PROPERTY_NAME_NULL, + "Es wird versucht, eine Eigenschaft mit einem Nullnamen festzulegen: {0}#setProperty(null, {1})"}, + + /** Field ER_PROPERTY_UNKNOWN */ + + { ER_PROPERTY_UNKNOWN, + "Es wird versucht, die unbekannte Eigenschaft \"{0}\" festzulegen: {1}#setProperty({0},{2})"}, + + /** Field ER_GETTING_NULL_PROPERTY */ + + { ER_GETTING_NULL_PROPERTY, + "Es wird versucht, eine Eigenschaft mit einem Nullnamen abzurufen: {0}#getProperty(null)"}, + + /** Field ER_GETTING_NULL_PROPERTY */ + + { ER_GETTING_UNKNOWN_PROPERTY, + "Es wird versucht, die unbekannte Eigenschaft \"{0}\" abzurufen: {1}#getProperty({0})"}, + //END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation // Warnings... diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java index a8c681aaa373fda2495823071d4a1274fb4d8199..bdb2501b69abfca528b9b0c4bfa3bb89799ff82f 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,7 +31,7 @@ import java.util.ListResourceBundle; * Also you need to update the count of messages(MAX_CODE)or * the count of warnings(MAX_WARNING) [ Information purpose only] * @xsl.usage advanced - * @LastModified: May 2019 + * @LastModified: Nov 2021 */ public class XPATHErrorResources_ja extends ListResourceBundle { @@ -322,6 +322,10 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE"; public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER"; public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER"; + public static final String ER_PROPERTY_NAME_NULL = "ER_PROPERTY_NAME_NULL"; + public static final String ER_PROPERTY_UNKNOWN = "ER_PROPERTY_UNKNOWN"; + public static final String ER_GETTING_NULL_PROPERTY = "ER_GETTING_NULL_PROPERTY"; + public static final String ER_GETTING_UNKNOWN_PROPERTY = "ER_GETTING_UNKNOWN_PROPERTY"; //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation public static final String WG_LOCALE_NAME_NOT_HANDLED = @@ -836,6 +840,26 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = { ER_NULL_XPATH_VARIABLE_RESOLVER, "null\u306EXPathVariableResolver\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F: {0}#setXPathVariableResolver(null)"}, + /** Field ER_PROPERTY_NAME_NULL */ + + { ER_PROPERTY_NAME_NULL, + "\u30D7\u30ED\u30D1\u30C6\u30A3\u306Bnull\u306E\u540D\u524D\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F: {0}#setProperty( null, {1})"}, + + /** Field ER_PROPERTY_UNKNOWN */ + + { ER_PROPERTY_UNKNOWN, + "\u4E0D\u660E\u306A\u30D7\u30ED\u30D1\u30C6\u30A3\"{0}\"\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F:{1}#setProperty({0},{2})"}, + + /** Field ER_GETTING_NULL_PROPERTY */ + + { ER_GETTING_NULL_PROPERTY, + "null\u540D\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F: {0}#getProperty(null)"}, + + /** Field ER_GETTING_NULL_PROPERTY */ + + { ER_GETTING_UNKNOWN_PROPERTY, + "\u4E0D\u660E\u306A\u30D7\u30ED\u30D1\u30C6\u30A3\"{0}\"\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F:{1}#getProperty({0})"}, + //END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation // Warnings... diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java index d1e370f0d82c225bcede2c671b0850ed54139043..5c76b4c94718c6bff11be7f04326627fe3eedbee 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,7 +31,7 @@ import java.util.ListResourceBundle; * Also you need to update the count of messages(MAX_CODE)or * the count of warnings(MAX_WARNING) [ Information purpose only] * @xsl.usage advanced - * @LastModified: May 2019 + * @LastModified: Nov 2021 */ public class XPATHErrorResources_zh_CN extends ListResourceBundle { @@ -322,6 +322,10 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE"; public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER"; public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER"; + public static final String ER_PROPERTY_NAME_NULL = "ER_PROPERTY_NAME_NULL"; + public static final String ER_PROPERTY_UNKNOWN = "ER_PROPERTY_UNKNOWN"; + public static final String ER_GETTING_NULL_PROPERTY = "ER_GETTING_NULL_PROPERTY"; + public static final String ER_GETTING_UNKNOWN_PROPERTY = "ER_GETTING_UNKNOWN_PROPERTY"; //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation public static final String WG_LOCALE_NAME_NOT_HANDLED = @@ -836,6 +840,26 @@ public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = { ER_NULL_XPATH_VARIABLE_RESOLVER, "\u5C1D\u8BD5\u8BBE\u7F6E\u7A7A XPathVariableResolver:{0}#setXPathVariableResolver(null)"}, + /** Field ER_PROPERTY_NAME_NULL */ + + { ER_PROPERTY_NAME_NULL, + "\u5C1D\u8BD5\u8BBE\u7F6E\u5177\u6709\u7A7A\u540D\u79F0\u7684\u5C5E\u6027\uFF1A{0}#setProperty( null, {1})"}, + + /** Field ER_PROPERTY_UNKNOWN */ + + { ER_PROPERTY_UNKNOWN, + "\u5C1D\u8BD5\u8BBE\u7F6E\u672A\u77E5\u5C5E\u6027 \"{0}\":{1}#setProperty({0},{2})"}, + + /** Field ER_GETTING_NULL_PROPERTY */ + + { ER_GETTING_NULL_PROPERTY, + "\u5C1D\u8BD5\u83B7\u53D6\u5177\u6709\u7A7A\u540D\u79F0\u7684\u5C5E\u6027\uFF1A{0}#getProperty(null)"}, + + /** Field ER_GETTING_NULL_PROPERTY */ + + { ER_GETTING_UNKNOWN_PROPERTY, + "\u5C1D\u8BD5\u83B7\u53D6\u672A\u77E5\u5C5E\u6027 \"{0}\":{1}#getProperty({0})"}, + //END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation // Warnings... diff --git a/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java b/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java index 92c407e103ff8fa2043489d56d4ef0b6e4ab9c8e..6bbbdc77b7dd42714e9a1e8f7999b9b8a6ab4dc3 100644 --- a/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java +++ b/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,10 +28,8 @@ import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl; import java.io.IOException; import java.net.MalformedURLException; import java.net.URI; -import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; -import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; diff --git a/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java b/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java index 103078b15558b975a6aae7da130c61807b6c8a1a..1082f00450e16d5bdc9b15f7a0de2dfef2ca8c16 100644 --- a/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java +++ b/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,6 +40,9 @@ class GroupEntry extends BaseEntry { static final int ATTRIBUTE_DEFFER = 1; static final int ATTRIBUTE_RESOLUTION = 2; + //Indicates a continuous session, should not reset state + boolean shouldKeepState = false; + //Unmodifiable features when the Catalog is created CatalogFeatures features; @@ -164,6 +167,16 @@ class GroupEntry extends BaseEntry { longestSuffixMatch = 0; systemEntrySearched = false; } + + /** + * Resets the state of the Catalog instance, allowing it to be reused. + */ + private void resetOnStart() { + if (this instanceof Catalog && !shouldKeepState) { + reset(); + } + } + /** * Constructs a group entry. * @param catalog the catalog this GroupEntry belongs to @@ -228,6 +241,7 @@ class GroupEntry extends BaseEntry { * @return a URI string if a mapping is found, or null otherwise. */ public String matchSystem(String systemId) { + resetOnStart(); systemEntrySearched = true; String match = null; for (BaseEntry entry : entries) { @@ -296,6 +310,7 @@ class GroupEntry extends BaseEntry { * @return a URI string if a mapping is found, or null otherwise. */ public String matchPublic(String publicId) { + resetOnStart(); /* When both public and system identifiers are specified, and prefer is not public (that is, system), only system entry will be used. @@ -326,6 +341,51 @@ class GroupEntry extends BaseEntry { return matchDelegate(CatalogEntryType.DELEGATEPUBLIC, publicId); } + /** + * Attempt to find a matching entry in the catalog by publicId or systemId. + * + *

    + * The resolution follows the following rules determined by the prefer + * setting: + * + * prefer "system": attempts to resolve with a system entry; attempts to + * resolve with a public entry when only publicId is specified. + * + * prefer "public": attempts to resolve with a system entry; attempts to + * resolve with a public entry if no matching system entry is found. + * + * If no match is found, continue searching uri entries. + * + * @param publicId The public identifier of the external entity being + * referenced. + * + * @param systemId The system identifier of the external entity being + * referenced. + * + * @return the resolved systemId if a match is found, null otherwise + */ + String resolve(String publicId, String systemId) { + String resolvedSystemId = null; + shouldKeepState = true; + if (systemId != null) { + /* + If a system identifier is specified, it is used no matter how + prefer is set. + */ + resolvedSystemId = matchSystem(systemId); + } + + if (resolvedSystemId == null && publicId != null) { + resolvedSystemId = matchPublic(publicId); + } + + if (resolvedSystemId == null && systemId != null) { + resolvedSystemId = matchURI(systemId); + } + shouldKeepState = false; + return resolvedSystemId; + } + /** * Attempt to find a matching entry in the catalog by the uri element. * @@ -340,6 +400,7 @@ class GroupEntry extends BaseEntry { * @return a URI string if a mapping is found, or null otherwise. */ public String matchURI(String uri) { + resetOnStart(); String match = null; for (BaseEntry entry : entries) { switch (entry.type) { @@ -399,6 +460,7 @@ class GroupEntry extends BaseEntry { * @return the URI string if a mapping is found, or null otherwise. */ private String matchDelegate(CatalogEntryType type, String id) { + resetOnStart(); String match = null; int longestMatch = 0; URI catalogId = null; diff --git a/src/java.xml/share/classes/javax/xml/catalog/Util.java b/src/java.xml/share/classes/javax/xml/catalog/Util.java index af84c3f825df0b82b97b32925781c66d3b9c2db4..50a72aed6201607ec835bf96e4652e8d956de49c 100644 --- a/src/java.xml/share/classes/javax/xml/catalog/Util.java +++ b/src/java.xml/share/classes/javax/xml/catalog/Util.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,25 +74,9 @@ class Util { * @return the resolved systemId if a match is found, null otherwise */ static String resolve(CatalogImpl catalog, String publicId, String systemId) { - String resolvedSystemId = null; - //search the current catalog catalog.reset(); - if (systemId != null) { - /* - If a system identifier is specified, it is used no matter how - prefer is set. - */ - resolvedSystemId = catalog.matchSystem(systemId); - } - - if (resolvedSystemId == null && publicId != null) { - resolvedSystemId = catalog.matchPublic(publicId); - } - - if (resolvedSystemId == null && systemId != null) { - resolvedSystemId = catalog.matchURI(systemId); - } + String resolvedSystemId = catalog.resolve(publicId, systemId); //mark the catalog as having been searched before trying alternatives catalog.markAsSearched(); diff --git a/src/java.xml/share/classes/jdk/xml/internal/SecuritySupport.java b/src/java.xml/share/classes/jdk/xml/internal/SecuritySupport.java index c5678b8b75061f3c1cd3569383f891919fd00986..760db484b97da0755767760829b1378a6ec6a24a 100644 --- a/src/java.xml/share/classes/jdk/xml/internal/SecuritySupport.java +++ b/src/java.xml/share/classes/jdk/xml/internal/SecuritySupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -275,7 +275,7 @@ public class SecuritySupport { return ResourceBundle.getBundle(bundle, locale); } catch (MissingResourceException e) { try { - return ResourceBundle.getBundle(bundle, new Locale("en", "US")); + return ResourceBundle.getBundle(bundle, Locale.US); } catch (MissingResourceException e2) { throw new MissingResourceException( "Could not load any resource bundle by " + bundle, bundle, ""); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java index 51926a70529a0690d1dc7943d84edf87884394ad..f0b85ec263187014e3ec31aaea28f390ff5d5f75 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -654,6 +654,12 @@ public class Types { public JCDiagnostic getDiagnostic() { return diagnostic; } + + @Override + public Throwable fillInStackTrace() { + // This is an internal exception; the stack trace is irrelevant. + return this; + } } /** @@ -5055,6 +5061,12 @@ public class Types { public Type type() { return type; } + + @Override + public Throwable fillInStackTrace() { + // This is an internal exception; the stack trace is irrelevant. + return this; + } } private final Types types; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java index 5cf8c5d5387f733eb2209ebc772fd6333721a88c..dbb4f1a46a4e08aa23ecbfd92a25d91c863c756c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java @@ -377,7 +377,7 @@ public class Enter extends JCTree.Visitor { ClassSymbol c = syms.enterClass(tree.modle, name, tree.packge); c.flatname = names.fromString(tree.packge + "." + name); c.classfile = c.sourcefile = tree.sourcefile; - c.completer = Completer.NULL_COMPLETER; + c.completer = Completer.NULL_COMPLETER; c.members_field = WriteableScope.create(c); tree.packge.package_info = c; tree.packge.sourcefile = tree.sourcefile; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java index 2392ac3ffae484ee87f6441b4b02612826934916..2333d268c28b680ec77033d0b05013e7d312ea87 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1310,6 +1310,12 @@ public class Infer { public NodeNotFoundException(InferenceGraph graph) { this.graph = graph; } + + @Override + public Throwable fillInStackTrace() { + // This is an internal exception; the stack trace is irrelevant. + return this; + } } /** * Pick the next node (leaf) to solve in the graph diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java index 0638da66a8969191b572a18375af6bee01790718..28662fe2dcc0667b64236aa13d3b88309b8bd970 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2054,7 +2054,7 @@ public class LambdaToMethod extends TreeTranslator { }; break; case CAPTURED_OUTER_THIS: - Name name = names.fromString(new String(sym.flatName().toString().replace('.', '$') + names.dollarThis)); + Name name = names.fromString(sym.flatName().toString().replace('.', '$') + names.dollarThis); ret = new VarSymbol(SYNTHETIC | FINAL | PARAMETER, name, types.erasure(sym.type), translatedSym) { @Override public Symbol baseSymbol() { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java index 7c912dcc877cd1f069c625d4211046bcef00748b..b22a1825eab27b567c9e3ed3d4dd49be41b9cf58 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1407,6 +1407,12 @@ public class Resolve { public JCDiagnostic getDiagnostic() { return diagnostic; } + + @Override + public Throwable fillInStackTrace() { + // This is an internal exception; the stack trace is irrelevant. + return this; + } } /* *************************************************************************** diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java index bef291869ab36da185f5877c9ec044a480333e4e..1c3f8ba96f882cc7130c8523696c1cad7c002e8f 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,7 +54,6 @@ import static javax.tools.StandardLocation.CLASS_OUTPUT; import com.sun.tools.javac.code.Lint; import com.sun.tools.javac.code.Symbol.ClassSymbol; import com.sun.tools.javac.code.Symbol.ModuleSymbol; -import com.sun.tools.javac.code.Symbol.TypeSymbol; import com.sun.tools.javac.code.Symtab; import com.sun.tools.javac.comp.Modules; import com.sun.tools.javac.model.JavacElements; @@ -63,10 +62,8 @@ import com.sun.tools.javac.util.*; import com.sun.tools.javac.util.DefinedBy.Api; import static com.sun.tools.javac.code.Lint.LintCategory.PROCESSING; -import com.sun.tools.javac.code.Symbol; import com.sun.tools.javac.code.Symbol.PackageSymbol; import com.sun.tools.javac.main.Option; -import java.util.stream.Collectors; /** * The FilerImplementation class must maintain a number of @@ -547,12 +544,11 @@ public class JavacFiler implements Filer, Closeable { locationCheck(location); - String strPkg = pkg.toString(); - if (strPkg.length() > 0) - checkName(strPkg); + if (pkg.length() > 0) + checkName(pkg); FileObject fileObject = - fileManager.getFileForOutputForOriginatingFiles(location, strPkg, + fileManager.getFileForOutputForOriginatingFiles(location, pkg, relativeName.toString(), originatingFiles(originatingElements)); checkFileReopening(fileObject, true); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java index 9dd94f742528edcd9fa68eef4c0d149eb65bf4b4..9174f0b7385dc098fd7c3cfb51d53d53040be025 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -300,10 +300,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea try { processorIterator = List.of(new PrintingProcessor()).iterator(); } catch (Throwable t) { - AssertionError assertError = - new AssertionError("Problem instantiating PrintingProcessor."); - assertError.initCause(t); - throw assertError; + throw new AssertionError("Problem instantiating PrintingProcessor.", t); } } else if (processors != null) { processorIterator = processors.iterator(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties index fddd3e935e1d24ca0fe321be4827dc47eb1040cd..0308f6a647e0b0dd0cbfb012fb4d5716da76882c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties @@ -1565,9 +1565,6 @@ compiler.misc.diamond.anonymous.methods.implicitly.override=\ compiler.misc.source.unavailable=\ (source unavailable) -compiler.misc.base.membership=\ - all your base class are belong to us - # 0: string, 1: string, 2: boolean compiler.misc.x.print.processor.info=\ Processor {0} matches {1} and returns {2}. diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties new file mode 100644 index 0000000000000000000000000000000000000000..023f83aea3260583e7cac02d02a82e8f1891d5c4 --- /dev/null +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties @@ -0,0 +1,2785 @@ +# +# Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute 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. +# + +# Messages in this file which use "placeholders" for values (e.g. {0}, {1}) +# are preceded by a stylized comment describing the type of the corresponding +# values. +# The simple types currently in use are: +# +# annotation annotation compound +# boolean true or false +# diagnostic a sub-message; see compiler.misc.* +# fragment similar to 'message segment', but with more specific type +# modifier a Java modifier; e.g. public, private, protected +# file a file URL +# file object a file URL - similar to 'file' but typically used for source/class files, hence more specific +# flag a Flags.Flag instance +# name a name, typically a Java identifier +# number an integer +# option name the name of a command line option +# path a path +# profile a profile name +# source a source version number, such as 1.5, 1.6, 1.7, taken from a com.sun.tools.javac.code.Source +# source version a source version number, such as 1.5, 1.6, 1.7, taken from a javax.lang.model.SourceVersion +# string a general string +# symbol the name of a declared type +# symbol kind the kind of a symbol (i.e. method, variable) +# kind name an informative description of the kind of a declaration; see compiler.misc.kindname.* +# target a target version number, such as 1.5, 1.6, 1.7, taken from a com.sun.tools.javac.jvm.Target +# token the name of a non-terminal in source code; see compiler.misc.token.* +# tree tag the name of a non-terminal in source code; see compiler.misc.token.* +# type a Java type; e.g. int, X, X +# url a URL +# object a Java object (unspecified) +# unused the value is not used in this message +# +# The following compound types are also used: +# +# collection of X a comma-separated collection of items; e.g. collection of type +# list of X a comma-separated list of items; e.g. list of type +# set of X a comma-separated set of items; e.g. set of modifier +# +# These may be composed: +# +# list of type or message segment +# +# The following type aliases are supported: +# +# message segment --> diagnostic or fragment +# file name --> file, path or file object +# +# Custom comments are supported in parenthesis i.e. +# +# number (classfile major version) +# +# These comments are used internally in order to generate an enum-like class declaration containing +# a method/field for each of the diagnostic keys listed here. Those methods/fields can then be used +# by javac code to build diagnostics in a type-safe fashion. +# +# In addition, these comments are verified by the jtreg test test/tools/javac/diags/MessageInfo, +# using info derived from the collected set of examples in test/tools/javac/diags/examples. +# MessageInfo can also be run as a standalone utility providing more facilities +# for manipulating this file. For more details, see MessageInfo.java. + +## +## errors +## + +# 0: symbol +compiler.err.abstract.cant.be.instantiated={0} ist abstrakt, kann nicht instanziiert werden + +compiler.err.abstract.meth.cant.have.body=Abstrakte Methoden k\u00F6nnen keinen Body enthalten + +# 0: kind name, 1: symbol +compiler.err.already.annotated={0} {1} wurde bereits mit Annotation versehen + +# 0: kind name, 1: symbol, 2: kind name, 3: symbol +compiler.err.already.defined={0} {1} ist bereits in {2} {3} definiert + +# 0: kind name, 1: symbol, 2: kind name, 3: kind name, 4: symbol +compiler.err.already.defined.in.clinit={0} {1} ist bereits in {2} von {3} {4} definiert + +# 0: symbol +compiler.err.already.defined.single.import=Es wurde bereits ein Typ mit demselben einfachen Namen durch den Einzeltypimport von {0} definiert + +# 0: symbol +compiler.err.already.defined.static.single.import=Es wurde bereits ein Typ mit demselben einfachen Namen durch den statischen Einzeltypimport von {0} definiert + +# 0: symbol +compiler.err.already.defined.this.unit={0} ist in dieser Kompilierungseinheit bereits definiert + +# 0: type, 1: list of name +compiler.err.annotation.missing.default.value=In Annotation @{0} fehlt ein Standardwert f\u00FCr das Element "{1}" + +# 0: type, 1: list of name +compiler.err.annotation.missing.default.value.1=In Annotation @{0} fehlen Standardwerte f\u00FCr Elemente {1} + +# 0: type +compiler.err.annotation.not.valid.for.type=Annotation ist f\u00FCr Element des Typs {0} nicht g\u00FCltig + +compiler.err.annotation.type.not.applicable=Annotationsschnittstelle ist f\u00FCr diese Art Deklaration nicht anwendbar + +# 0: type +compiler.err.annotation.type.not.applicable.to.type=Annotation @{0} ist in diesem Typkontext nicht anwendbar + +compiler.err.annotation.value.must.be.annotation=Annotationswert muss eine Annotation sein + +compiler.err.annotation.value.must.be.class.literal=Annotationswert muss ein Klassenliteral sein + +compiler.err.annotation.value.must.be.name.value=Annotationswerte m\u00FCssen das Format "Name=Wert" aufweisen + +compiler.err.annotation.value.not.allowable.type=Annotationswert hat keinen zul\u00E4ssigen Typ + +compiler.err.expression.not.allowable.as.annotation.value=Ausdruck ist als Annotationswert nicht zul\u00E4ssig + +compiler.err.anon.class.impl.intf.no.args=Anonyme Klasse implementiert Schnittstelle. Argumente sind nicht m\u00F6glich + +compiler.err.anon.class.impl.intf.no.typeargs=Anonyme Klasse implementiert Schnittstelle. Typargumente sind nicht m\u00F6glich + +compiler.err.anon.class.impl.intf.no.qual.for.new=Anonyme Klasse implementiert Schnittstelle. Qualifier f\u00FCr "Neu" ist nicht m\u00F6glich + +compiler.err.cant.inherit.from.anon=Erben aus anonymer Klasse nicht m\u00F6glich + +# 0: symbol, 1: symbol, 2: symbol +compiler.err.array.and.varargs={0} und {1} k\u00F6nnen nicht beide in {2} deklariert werden + +compiler.err.array.dimension.missing=Arraydimension fehlt + +compiler.err.illegal.array.creation.both.dimension.and.initialization=Arrayerstellung mit Dimensionsausdruck und Initialisierung ist unzul\u00E4ssig + +# 0: type +compiler.err.array.req.but.found=Array erforderlich, aber {0} gefunden + +compiler.err.attribute.value.must.be.constant=Elementwert muss ein Konstantenausdruck sein + +# 0: string (statement type) +compiler.err.bad.initializer=Ung\u00FCltiger Initializer f\u00FCr {0} + +compiler.err.break.outside.switch.loop=Unterbrechung au\u00DFerhalb Switch oder Schleife + +compiler.err.break.outside.switch.expression=Versuch, Vorgang aus einem Switch-Ausdruck zu unterbrechen + +compiler.err.continue.outside.switch.expression=Versuch, Vorgang aus einem Switch-Ausdruck fortzusetzen + +compiler.err.return.outside.switch.expression=Versuch, aus einem Switch-Ausdruck zur\u00FCckzukehren + +compiler.err.rule.completes.normally=Switch-Regel wird ohne Angabe eines Wertes abgeschlossen\n(Switch-Regeln in Switch-Ausdr\u00FCcken m\u00FCssen einen Wert oder Throw angeben) + +compiler.err.switch.expression.completes.normally=Switch-Ausdruck wird ohne Angabe eines Wertes abgeschlossen\n(Switch-Ausdr\u00FCcke m\u00FCssen einen Wert angeben oder einen Throw f\u00FCr alle m\u00F6glichen Eingabewerte ausgeben) + +compiler.err.no.switch.expression ="yield" au\u00DFerhalb von Switch-Ausdruck + +compiler.err.no.switch.expression.qualify="yield" au\u00DFerhalb von Switch-Ausdruck\n(um eine Methode namens "yield" aufzurufen, qualifizieren Sie den yield-Aufruf mit einem Empf\u00E4nger oder Typnamen) + +compiler.err.invalid.yield=Ung\u00FCltige Verwendung der eingeschr\u00E4nkten ID "yield"\n(um eine Methode namens "yield" aufzurufen, qualifizieren Sie den yield-Aufruf mit einem Empf\u00E4nger oder Typnamen) + +compiler.warn.invalid.yield="yield" kann in einem zuk\u00FCnftigen Release zu einer eingeschr\u00E4nkten ID werden\n(um eine Methode namens "yield" aufzurufen, qualifizieren Sie den yield-Aufruf mit einem Empf\u00E4nger oder Typnamen) + +compiler.err.switch.expression.empty=Switch-Ausdruck enth\u00E4lt keine CASE-Klauseln + +compiler.err.switch.expression.no.result.expressions=Switch-Ausdruck enth\u00E4lt keine Ergebnisausdr\u00FCcke + +# 0: name +compiler.err.call.must.be.first.stmt.in.ctor=Aufruf von {0} muss die erste Anweisung im Konstruktor sein + +# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment +compiler.err.cant.apply.symbol={0} {1} in {4} {5} kann nicht auf die angegebenen Typen angewendet werden.\nErforderlich: {2}\nErmittelt: {3}\nGrund: {6} + +# 0: symbol kind, 1: name, 2: list of type +compiler.err.cant.apply.symbols={0} f\u00FCr {1}({2}) nicht geeignet + +# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment +compiler.misc.cant.apply.symbol={0} {1} in {4} {5} kann nicht auf die angegebenen Typen angewendet werden\nErforderlich: {2}\nErmittelt: {3}\nGrund: {6} + +# 0: symbol kind, 1: name, 2: list of type +compiler.misc.cant.apply.symbols={0} f\u00FCr {1}({2}) nicht geeignet + +# 0: kind name, 1: symbol +compiler.misc.no.abstracts=Keine abstrakte Methode in {0} {1} gefunden + +# 0: kind name, 1: symbol +compiler.misc.incompatible.abstracts=Mehrere nicht \u00FCberschreibende abstrakte Methoden in {0} {1} gefunden + +compiler.err.bad.functional.intf.anno=Unerwartete @FunctionalInterface-Annotation + +# 0: message segment +compiler.err.bad.functional.intf.anno.1=Unerwartete @FunctionalInterface-Annotation\n{0} + +# 0: message segment +compiler.err.anonymous.diamond.method.does.not.override.superclass=Methode \u00FCberschreibt oder implementiert keine Methode aus einem Supertyp\n{0} + +# 0: symbol +compiler.misc.not.a.functional.intf={0} ist keine Funktionsschnittstelle + +# 0: symbol, 1: message segment +compiler.misc.not.a.functional.intf.1={0} ist keine Funktionsschnittstelle\n{1} + +# 0: type, 1: kind name, 2: symbol +compiler.misc.invalid.generic.lambda.target=Ung\u00FCltiger Funktionsdeskriptor f\u00FCr Lambda-Ausdruck\nMethode {0} in {1} {2} ist generisch + +# 0: kind name, 1: symbol +compiler.misc.incompatible.descs.in.functional.intf=Inkompatible Funktionsdeskriptoren in {0} {1} gefunden + +# 0: name, 1: list of type, 2: type, 3: list of type +compiler.misc.descriptor=Deskriptor: {2} {0}({1}) + +# 0: name, 1: list of type, 2: type, 3: list of type +compiler.misc.descriptor.throws=Deskriptor: {2} {0}({1}) l\u00F6st {3} aus + +# 0: type +compiler.misc.no.suitable.functional.intf.inst=Funktionsschnittstellendeskriptor f\u00FCr {0} kann nicht abgeleitet werden + +# 0: message segment +compiler.misc.bad.intersection.target.for.functional.expr=Ung\u00FCltiges Schnittmengentypziel f\u00FCr Lambda oder Methodenreferenz\n{0} + +# 0: symbol or type +compiler.misc.not.an.intf.component=Komponententyp {0} ist keine Schnittstelle + +# 0: kind name, 1: message segment +compiler.err.invalid.mref=Ung\u00FCltige {0}-Referenz\n{1} + +# 0: kind name, 1: message segment +compiler.misc.invalid.mref=Ung\u00FCltige {0}-Referenz\n{1} + +compiler.misc.static.mref.with.targs=Parametrisierter Qualifier f\u00FCr statische Methodenreferenz + +# 0: symbol +compiler.err.cant.assign.val.to.final.var=Der finalen Variable {0} kann kein Wert zugewiesen werden + +compiler.err.cant.assign.val.to.this=Zuweisen zu "this" nicht m\u00F6glich + +# 0: symbol, 1: message segment +compiler.err.cant.ref.non.effectively.final.var=Von {1} referenzierte lokale Variablen m\u00FCssen final oder effektiv final sein + +compiler.err.try.with.resources.expr.needs.var=Die try-with-resources-Ressource muss eine Variablendeklaration oder ein Ausdruck mit einer Referenz zu einer finalen oder effektiv finalen Variable sein + +# 0: symbol +compiler.err.try.with.resources.expr.effectively.final.var=Variable {0}, die als try-with-resources-Ressource verwendet wurde, ist weder final noch effektiv final + + +compiler.misc.lambda=Lambda-Ausdruck + +compiler.misc.inner.cls=Innere Klasse + +compiler.misc.guard=Guard + +# 0: type +compiler.err.cant.deref={0} kann nicht dereferenziert werden + +compiler.err.cant.extend.intf.annotation="extends" f\u00FCr @interfaces nicht zul\u00E4ssig + +compiler.err.annotation.decl.not.allowed.here=Annotationsschnittstellendeklaration hier nicht zul\u00E4ssig + +# 0: symbol +compiler.err.cant.inherit.from.final=Erben aus finalem {0}-Element nicht m\u00F6glich + +# 0: symbol or string +compiler.err.cant.ref.before.ctor.called={0} kann nicht referenziert werden, bevor der Supertypkonstruktor aufgerufen wurde + +compiler.err.cant.select.static.class.from.param.type=Statische Klasse kann nicht aus einem parametrisierten Typ ausgew\u00E4hlt werden + +# 0: symbol, 1: string, 2: string +compiler.err.cant.inherit.diff.arg={0} kann nicht mit verschiedenen Argumenten geerbt werden: <{1}> und <{2}> + +compiler.err.catch.without.try="catch" ohne "try" + +# 0: kind name, 1: symbol +compiler.err.clash.with.pkg.of.same.name={0} {1} steht in Konflikt mit Package desselben Namens + +compiler.err.class.not.allowed=Klassen-, Schnittstellen- oder Enum-Deklaration hier nicht zul\u00E4ssig + +compiler.err.const.expr.req=Konstantenausdruck erforderlich + +compiler.err.cont.outside.loop=Fortsetzung au\u00DFerhalb Schleife + +# 0: symbol or type +compiler.err.cyclic.inheritance=Zyklische Vererbung mit {0} + +# 0: symbol +compiler.err.cyclic.annotation.element=Typ von Element {0} ist zyklisch + +# 0: symbol +compiler.err.call.to.super.not.allowed.in.enum.ctor=Aufruf von Super in Enum-Konstruktor nicht zul\u00E4ssig + +# 0: type +compiler.err.no.superclass={0} weist keine Superklasse auf. + +# 0: symbol, 1: type, 2: symbol, 3: type, 4: type +compiler.err.concrete.inheritance.conflict=Methoden {0} von {1} und {2} von {3} werden mit derselben Signatur geerbt + +compiler.err.default.allowed.in.intf.annotation.member=Standardwert nur in einer Annotationsschnittstellendeklaration zul\u00E4ssig + +# 0: symbol +compiler.err.doesnt.exist=Package {0} ist nicht vorhanden + +# 0: type +compiler.err.duplicate.annotation.invalid.repeated=Annotation {0} ist keine g\u00FCltige wiederholbare Annotation + +# 0: name, 1: type +compiler.err.duplicate.annotation.member.value=Doppeltes Element "{0}" in Annotation @{1}. + +# 0: type +compiler.err.duplicate.annotation.missing.container={0} ist keine wiederholbare Annotationsschnittstelle + +# 0: symbol +compiler.err.invalid.repeatable.annotation=Doppelte Annotation: {0} ist mit einer ung\u00FCltigen @Repeatable-Annotation versehen + +# 0: symbol or type +compiler.err.invalid.repeatable.annotation.no.value={0} ist keine g\u00FCltige @Repeatable-Annotation. Keine Wertelementmethode deklariert + +# 0: type, 1: number +compiler.err.invalid.repeatable.annotation.multiple.values={0} ist keine g\u00FCltige @Repeatable-Annotation. {1} Elementmethoden namens "value" deklariert + +# 0: type +compiler.err.invalid.repeatable.annotation.invalid.value={0} ist keine g\u00FCltige @Repeatable-Annotation. Ung\u00FCltiges Wertelement + +# 0: symbol or type, 1: type, 2: type +compiler.err.invalid.repeatable.annotation.value.return=\u00DCbergeordnete Annotationsschnittstelle ({0}) muss ein Element namens "value" mit dem Typ {2} deklarieren + +# 0: symbol or type, 1: symbol +compiler.err.invalid.repeatable.annotation.elem.nondefault=\u00DCbergeordnete Annotationsschnittstelle ({0}) enth\u00E4lt keinen Standardwert f\u00FCr Element {1} + +# 0: symbol, 1: string, 2: symbol, 3: string +compiler.err.invalid.repeatable.annotation.retention=Aufbewahrung der \u00FCbergeordneten Annotationsschnittstelle ({0}) ist k\u00FCrzer als die Aufbewahrung der wiederholbaren Annotationsschnittstelle ({2}) + +# 0: symbol, 1: symbol +compiler.err.invalid.repeatable.annotation.not.documented=Wiederholbare Annotationsschnittstelle ({1}) ist @Documented, die \u00FCbergeordnete Annotationsschnittstelle ({0}) aber nicht + +# 0: symbol, 1: symbol +compiler.err.invalid.repeatable.annotation.not.inherited=Wiederholbare Annotationsschnittstelle ({1}) ist @Inherited, die \u00FCbergeordnete Annotationsschnittstelle ({0}) aber nicht + +# 0: symbol, 1: symbol +compiler.err.invalid.repeatable.annotation.incompatible.target=\u00DCbergeordnete Annotationsschnittstelle ({0}) gilt f\u00FCr mehr Ziele als die wiederholbare Annotationsschnittstelle ({1}) + +# 0: symbol +compiler.err.invalid.repeatable.annotation.repeated.and.container.present=Container {0} darf nicht gleichzeitig mit dem darin enthaltenen Element vorhanden sein + +# 0: type, 1: symbol +compiler.err.invalid.repeatable.annotation.not.applicable=Container {0} ist nicht anwendbar f\u00FCr Element {1} + +# 0: type +compiler.err.invalid.repeatable.annotation.not.applicable.in.context=Container {0} ist in diesem Typkontext nicht anwendbar + +# 0: name +compiler.err.duplicate.class=Doppelte Klasse: {0} + +# 0: name, 1: name +compiler.err.same.binary.name=Klassen {0} und {1} haben denselben bin\u00E4ren Namen + +compiler.err.duplicate.case.label=Doppeltes CASE-Label + +compiler.err.pattern.dominated=Dieses CASE-Label wird von einem vorherigen CASE-Label dominiert + +compiler.err.duplicate.default.label=Doppeltes Standardlabel + +compiler.err.duplicate.total.pattern=Doppeltes Gesamtmuster + +compiler.err.total.pattern.and.default=Switch umfasst sowohl Gesamtmuster als auch Standardlabel + +# 0: type, 1: type +compiler.err.constant.label.not.compatible=Konstantes Label des Typs {0} ist nicht mit Switch-Selektortyp {1} kompatibel + +compiler.err.flows.through.to.pattern=Ung\u00FCltiger Fallthrough zu einem Muster + +compiler.err.flows.through.from.pattern=Ung\u00FCltiger Fallthrough von einem Muster + +compiler.err.else.without.if="else" ohne "if" + +compiler.err.empty.char.lit=Leeres Zeichenliteral + +# 0: symbol +compiler.err.encl.class.required=Eine einschlie\u00DFende Instanz mit {0} ist erforderlich + +compiler.err.enum.annotation.must.be.enum.constant=Ein Enum-Annotationswert muss eine Enum-Konstante sein + +compiler.err.enum.cant.be.instantiated=Enum-Klassen d\u00FCrfen nicht instanziiert werden + +compiler.err.enum.label.must.be.unqualified.enum=Das CASE-Label eines Enum-Switches muss der unqualifizierte Name einer Enumerationskonstante sein + +compiler.err.enum.no.subclassing=Klassen k\u00F6nnen java.lang.Enum nicht direkt erweitern + +compiler.err.enum.types.not.extensible=Enum-Klassen sind nicht erweiterbar + +compiler.err.enum.no.finalize=Enums k\u00F6nnen keine Finalisierungsmethoden aufweisen + +# 0: file name, 1: string +compiler.err.error.reading.file=Fehler beim Lesen von {0}. {1} + +# 0: type +compiler.err.except.already.caught=Ausnahme {0} wurde bereits abgefangen + +# 0: type +compiler.err.except.never.thrown.in.try=Ausnahme {0} wird nie im Body der entsprechenden try-Anweisung ausgel\u00F6st + +# 0: symbol +compiler.err.final.parameter.may.not.be.assigned=final-Parameter {0} darf nicht zugewiesen werden + +# 0: symbol +compiler.err.try.resource.may.not.be.assigned=auto-closeable-Ressource {0} darf nicht zugewiesen werden + +# 0: symbol +compiler.err.multicatch.parameter.may.not.be.assigned=multi-catch-Parameter {0} darf nicht zugewiesen werden + +# 0: type, 1: type +compiler.err.multicatch.types.must.be.disjoint=Alternativen in einer multi-catch-Anweisung d\u00FCrfen nicht durch Unterklassen verkn\u00FCpft sein\nAlternative {0} ist eine Unterklasse der Alternative {1} + +compiler.err.finally.without.try="finally" ohne "try" + +# 0: type, 1: message segment +compiler.err.foreach.not.applicable.to.type=for-each nicht auf Ausdruckstyp anwendbar\nErforderlich: {1}\nErmittelt: {0} + +compiler.err.fp.number.too.large=Gleitkommazahl zu gro\u00DF + +compiler.err.fp.number.too.small=Gleitkommazahl zu klein + +compiler.err.generic.array.creation=Erstellung von generischem Array + +compiler.err.generic.throwable=Eine generische Klasse darf java.lang.Throwable nicht erweitern + +# 0: symbol +compiler.err.icls.cant.have.static.decl=Unzul\u00E4ssige static-Deklaration in innerer Klasse {0}\nModifikator "static" ist nur in Konstantenvariablendeklarationen zul\u00E4ssig + +# 0: string +compiler.err.illegal.char=Unzul\u00E4ssiges Zeichen: "{0}" + +# 0: string, 1: string +compiler.err.illegal.char.for.encoding=Nicht zuordenbares Zeichen (0x{0}) f\u00FCr Codierung {1} + +# 0: set of flag, 1: set of flag +compiler.err.illegal.combination.of.modifiers=Unzul\u00E4ssige Kombination aus Modifikatoren: {0} und {1} + +compiler.err.illegal.enum.static.ref=Unzul\u00E4ssige Referenz zu statischem Feld aus Initializer + +compiler.err.illegal.esc.char=Unzul\u00E4ssiges Escapezeichen + +compiler.err.illegal.forward.ref=Unzul\u00E4ssige Vorw\u00E4rtsreferenz + +# 0: symbol, 1: object +compiler.err.not.in.profile={0} ist in Profil "{1}" nicht verf\u00FCgbar + +# 0: symbol +compiler.warn.forward.ref=Referenz zu Variable "{0}", bevor sie initialisiert wurde + +compiler.err.illegal.self.ref=Selbstreferenz in Initializer + +# 0: symbol +compiler.warn.self.ref=Selbstreferenz in Initializer von Variable "{0}" + +# 0: type +compiler.err.illegal.initializer.for.type=Unzul\u00E4ssiger Initializer f\u00FCr {0} + +compiler.err.illegal.line.end.in.char.lit=Unzul\u00E4ssiges Zeilenende in Zeichenliteral + +compiler.err.illegal.text.block.open=Unzul\u00E4ssige Sequenz f\u00FCr \u00D6ffnungstrennzeichen von Textblock. Zeilenabschlusszeichen fehlt + +compiler.warn.inconsistent.white.space.indentation=Inkonsistenter Leerzeicheneinzug + +compiler.warn.trailing.white.space.will.be.removed=Nachgestelltes Leerzeichen wird entfernt + +compiler.err.illegal.nonascii.digit=Unzul\u00E4ssige Nicht-ASCII-Ziffer + +compiler.err.illegal.underscore=Unzul\u00E4ssiger Unterstrich + +compiler.err.illegal.dot="." unzul\u00E4ssig + +# 0: symbol +compiler.err.illegal.qual.not.icls=Unzul\u00E4ssiger Qualifier. {0} ist keine innere Klasse + +compiler.err.illegal.start.of.expr=Unzul\u00E4ssiger Ausdrucksbeginn + +compiler.err.illegal.start.of.stmt=Unzul\u00E4ssiger Anweisungsbeginn + +compiler.err.illegal.start.of.type=Unzul\u00E4ssiger Typbeginn + +compiler.err.illegal.parenthesized.expression=Unzul\u00E4ssiger Ausdruck in Klammern + +compiler.err.illegal.unicode.esc=Unzul\u00E4ssiges Unicode-Escapezeichen + +# 0: symbol +compiler.err.import.requires.canonical=Import erfordert kanonischen Namen f\u00FCr {0} + +compiler.err.improperly.formed.type.param.missing=Falsch formatierter Typ. Einige Parameter fehlen + +compiler.err.improperly.formed.type.inner.raw.param=Falsch formatierter Typ. Typargumente f\u00FCr Raw-Typ angegeben + +# 0: type, 1: type +compiler.err.incomparable.types=Nicht vergleichbare Typen: {0} und {1} + +# 0: string +compiler.err.int.number.too.large=Ganzzahl zu gro\u00DF + +compiler.err.intf.annotation.members.cant.have.params=Elemente in Annotationsschnittstellendeklarationen k\u00F6nnen keine formalen Parameter deklarieren + +# 0: symbol +compiler.err.intf.annotation.cant.have.type.params=Annotationsschnittstelle {0} darf nicht generisch sein + +compiler.err.intf.annotation.members.cant.have.type.params=Elemente in Annotationsschnittstellendeklarationen k\u00F6nnen keine generischen Methoden sein + +# 0: symbol, 1: type +compiler.err.intf.annotation.member.clash=Annotationsschnittstelle {1} deklariert ein Element mit demselben Namen wie Methode {0} + +compiler.err.intf.expected.here=Hier wird eine Schnittstelle erwartet + +compiler.err.intf.meth.cant.have.body=Abstrakte Schnittstellenmethoden k\u00F6nnen keinen Body enthalten + +compiler.err.invalid.annotation.member.type=Ung\u00FCltiger Typ f\u00FCr Annotationsschnittstellenelement + +compiler.err.invalid.binary.number=Bin\u00E4rzahlen m\u00FCssen mindestens eine Bin\u00E4rziffer enthalten + +compiler.err.invalid.hex.number=Hexadezimalzahlen m\u00FCssen mindestens eine Hexadezimalziffer enthalten + +compiler.err.invalid.meth.decl.ret.type.req=Ung\u00FCltige Methodendeklaration. R\u00FCckgabetyp erforderlich + +compiler.err.varargs.and.old.array.syntax=Legacy-Arraynotation f\u00FCr Parameter mit variabler Argumentanzahl nicht zul\u00E4ssig + +compiler.err.varargs.and.receiver =varargs-Notation f\u00FCr receiver-Parameter nicht zul\u00E4ssig + +compiler.err.varargs.must.be.last =varargs-Parameter muss der letzte Parameter sein + +compiler.err.array.and.receiver =Legacy-Arraynotation f\u00FCr receiver-Parameter nicht zul\u00E4ssig + +compiler.err.wrong.receiver =Falscher receiver-Parametername + +compiler.err.variable.not.allowed=Variablendeklaration hier nicht zul\u00E4ssig + +# 0: name +compiler.err.label.already.in.use=Label {0} wird bereits verwendet + +# 0: symbol +compiler.err.local.var.accessed.from.icls.needs.final=Auf lokale Variable {0} wird von innerer Klasse zugegriffen. Sie muss als final deklariert werden + +compiler.err.local.enum=Enum-Klassen d\u00FCrfen nicht lokal sein + +compiler.err.cannot.create.array.with.type.arguments=Array kann nicht mit Typargumenten erstellt werden + +compiler.err.cannot.create.array.with.diamond=Array kann nicht mit "<>" erstellt werden + +compiler.err.invalid.module.directive=Moduldirektiven-Schl\u00FCsselwort oder "}" erwartet + +# +# limits. We don't give the limits in the diagnostic because we expect +# them to change, yet we want to use the same diagnostic. These are all +# detected during code generation. +# +compiler.err.limit.code=Code zu gro\u00DF + +compiler.err.limit.code.too.large.for.try.stmt=Code f\u00FCr try-Anweisung zu gro\u00DF + +compiler.err.limit.dimensions=Arraytyp hat zu viele Dimensionen + +compiler.err.limit.locals=Zu viele lokale Variablen + +compiler.err.limit.parameters=Zu viele Parameter + +compiler.err.limit.pool=Zu viele Konstanten + +compiler.err.limit.pool.in.class=Zu viele Konstanten in Klasse {0} + +compiler.err.limit.stack=Code erfordert zu viel Stack + +compiler.err.limit.string=Konstantenzeichenfolge zu lang + +# 0: string +compiler.err.limit.string.overflow=UTF8-Darstellung f\u00FCr Zeichenfolge "{0}..." ist zu lang f\u00FCr den Konstantenpool + +compiler.err.malformed.fp.lit=Nicht wohlgeformtes Gleitkommaliteral + +compiler.err.method.does.not.override.superclass=Methode \u00FCberschreibt oder implementiert keine Methode aus einem Supertyp + +compiler.err.static.methods.cannot.be.annotated.with.override=Statische Methoden k\u00F6nnen nicht mit @Override-Annotation versehen werden + +compiler.err.missing.meth.body.or.decl.abstract=Methodenbody fehlt oder als abstrakt deklarieren + +compiler.err.missing.ret.stmt=R\u00FCckgabeanweisung fehlt + +# 0: type +compiler.misc.missing.ret.val=R\u00FCckgabewert fehlt + +compiler.misc.unexpected.ret.val=Unerwarteter R\u00FCckgabewert + +# 0: set of flag +compiler.err.mod.not.allowed.here=Modifikator {0} hier nicht zul\u00E4ssig + +# 0: name +compiler.err.modifier.not.allowed.here=Modifikator {0} hier nicht zul\u00E4ssig + +compiler.err.intf.not.allowed.here=Schnittstelle hier nicht zul\u00E4ssig + +# 0: symbol, 1: symbol +compiler.err.name.clash.same.erasure=Namenskonflikt: {0} und {1} haben dieselbe Erasure + +# 0: name, 1: list of type, 2: symbol, 3: name, 4: list of type, 5: symbol +compiler.err.name.clash.same.erasure.no.override=Namenskonflikt: {0}({1}) in {2} und {3}({4}) in {5} haben dieselbe Erasure, aber keine setzt die andere au\u00DFer Kraft + +# 0: string, 1: name, 2: name, 3: list of type, 4: symbol, 5: name, 6: list of type, 7: symbol +compiler.err.name.clash.same.erasure.no.override.1=Namenskonflikt: {0} {1} hat zwei Methoden mit derselben Erasure, aber keine setzt die andere au\u00DFer Kraft\nErste Methode: {2}({3}) in {4}\nZweite Methode: {5}({6}) in {7} + +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.err.name.clash.same.erasure.no.hide=Namenskonflikt: {0} in {1} und {2} in {3} haben dieselbe Erasure, aber keine blendet die andere aus + +compiler.err.name.reserved.for.internal.use={0} ist f\u00FCr den internen Gebrauch reserviert + +compiler.err.native.meth.cant.have.body=Native Methoden k\u00F6nnen keinen Body enthalten + + +# 0: message segment +compiler.misc.incompatible.type.in.conditional=Ung\u00FCltiger Typ in Bedingungsausdruck\n{0} + +compiler.misc.conditional.target.cant.be.void=target-type f\u00FCr Bedingungsausdruck darf nicht "void" sein + +compiler.misc.switch.expression.target.cant.be.void=target-type f\u00FCr Switch-Ausdruck darf nicht "void" sein + +# 0: message segment +compiler.misc.incompatible.type.in.switch.expression=Ung\u00FCltiger Typ in Switch-Ausdruck\n{0} + +# 0: message segment +compiler.misc.incompatible.ret.type.in.lambda=Ung\u00FCltiger R\u00FCckgabetyp in Lambda-Ausdruck\n{0} + +compiler.misc.stat.expr.expected=Lambda-Body ist nicht mit einer void-Funktionsschnittstelle kompatibel\n(verwenden Sie stattdessen einen Block-Lambda-Body oder einen Anweisungsausdruck) + +# 0: message segment +compiler.misc.incompatible.ret.type.in.mref=Ung\u00FCltiger R\u00FCckgabetyp in Methodenreferenz\n{0} + +compiler.err.lambda.body.neither.value.nor.void.compatible=Lambda-Body ist weder mit Wert noch mit "void "kompatibel + +# 0: list of type +compiler.err.incompatible.thrown.types.in.mref=Inkompatible ausgel\u00F6ste Typen {0} in Funktionsausdruck + +compiler.misc.incompatible.arg.types.in.lambda=Inkompatible Parametertypen in Lambda-Ausdruck + +compiler.misc.incompatible.arg.types.in.mref=Inkompatible Parametertypen in Methodenreferenz + +compiler.err.new.not.allowed.in.annotation="new" in einer Annotation nicht zul\u00E4ssig + +# 0: name, 1: type +compiler.err.no.annotation.member=Kein Annotationsmitglied {0} in {1} + +# 0: symbol +compiler.err.no.encl.instance.of.type.in.scope=Keine einschlie\u00DFende Instanz vom Typ {0} im Geltungsbereich + +compiler.err.no.intf.expected.here=Hier wird keine Schnittstelle erwartet + +compiler.err.no.match.entry={0} hat keine \u00DCbereinstimmung im Eintrag in {1}. {2} erforderlich + +# 0: type +compiler.err.not.annotation.type={0} ist keine Annotationsschnittstelle + +# 0: symbol, 1: symbol, 2: message segment +compiler.err.not.def.access.package.cant.access={0} ist nicht sichtbar\n({2}) + +# 0: symbol, 1: symbol, 2: message segment +compiler.misc.not.def.access.package.cant.access={0} ist nicht sichtbar\n({2}) + +# 0: symbol, 1: message segment +compiler.err.package.not.visible=Package {0} ist nicht sichtbar\n({1}) + +# 0: symbol, 1: message segment +compiler.misc.package.not.visible=Package {0} ist nicht sichtbar\n({1}) + +# {0} - current module +# {1} - package in which the invisible class is declared +# {2} - module in which {1} is declared +# 0: symbol, 1: symbol, 2: symbol +compiler.misc.not.def.access.does.not.read=Package {1} wird in Modul {2} deklariert, aber nicht von Modul {0} gelesen + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# 0: symbol, 1: symbol +compiler.misc.not.def.access.does.not.read.from.unnamed=Package {0} wird in Modul {1} deklariert, das nicht im Moduldiagramm enthalten ist + +# {0} - package in which the invisible class is declared +# {1} - current module +# 0: symbol, 1: symbol +compiler.misc.not.def.access.does.not.read.unnamed=Package {0} wird im unbenannten Modul deklariert, aber nicht von Modul {1} gelesen + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# 0: symbol, 1: symbol +compiler.misc.not.def.access.not.exported=Package {0} wird in Modul {1} deklariert, aber nicht exportiert + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# 0: symbol, 1: symbol +compiler.misc.not.def.access.not.exported.from.unnamed=Package {0} wird in Modul {1} deklariert, aber nicht exportiert + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# {2} - current module +# 0: symbol, 1: symbol, 2: symbol +compiler.misc.not.def.access.not.exported.to.module=Package {0} wird in Modul {1} deklariert, aber nicht in Modul {2} exportiert + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# 0: symbol, 1: symbol +compiler.misc.not.def.access.not.exported.to.module.from.unnamed=Package {0} wird in Modul {1} deklariert, aber nicht in das unbenannte Modul exportiert + +# 0: symbol, 1: symbol +compiler.err.not.def.access.class.intf.cant.access={1}.{0} ist in einer nicht zug\u00E4nglichen Klasse oder Schnittstelle definiert + +# 0: symbol, 1: symbol +compiler.misc.not.def.access.class.intf.cant.access={1}.{0} ist in einer nicht zug\u00E4nglichen Klasse oder Schnittstelle definiert + +# 0: symbol, 1: symbol, 2: symbol, 3: message segment +compiler.err.not.def.access.class.intf.cant.access.reason={1}.{0} in Package {2} ist nicht zug\u00E4nglich\n({3}) + +# 0: symbol, 1: symbol, 2: symbol, 3: message segment +compiler.misc.not.def.access.class.intf.cant.access.reason={1}.{0} in Package {2} ist nicht zug\u00E4nglich\n({3}) + +# 0: symbol, 1: list of type, 2: type +compiler.misc.cant.access.inner.cls.constr=Zugriff auf Konstruktor {0}({1}) nicht m\u00F6glich\nEinschlie\u00DFende Instanz vom Typ {2} ist nicht im Geltungsbereich + +# 0: symbol, 1: symbol +compiler.err.not.def.public.cant.access={0} ist nicht \u00F6ffentlich in {1}. Zugriff von externem Package nicht m\u00F6glich + +# 0: symbol, 1: symbol +compiler.err.not.def.public={0} ist nicht \u00F6ffentlich in {1} + +# 0: symbol, 1: symbol +compiler.misc.not.def.public.cant.access={0} ist nicht \u00F6ffentlich in {1}. Zugriff von externem Package nicht m\u00F6glich + +# 0: name +compiler.err.not.loop.label=Kein Schleifenlabel: {0} + +compiler.err.not.stmt=Keine Anweisung + +# 0: symbol +compiler.err.not.encl.class=Keine einschlie\u00DFende Klasse: {0} + +# 0: name, 1: type +compiler.err.operator.cant.be.applied=Ung\u00FCltiger Operandentyp {1} f\u00FCr un\u00E4ren Operator "{0}" + +# 0: name, 1: type, 2: type +compiler.err.operator.cant.be.applied.1=Ung\u00FCltige Operandentypen f\u00FCr un\u00E4ren Operator "{0}"\nErster Typ: {1}\nZweiter Typ: {2} + +compiler.err.pkg.annotations.sb.in.package-info.java=Packageannotationen m\u00FCssen in der Datei package-info.java vorhanden sein + +compiler.err.no.pkg.in.module-info.java=Packagedeklarationen in Datei module-info.java nicht zul\u00E4ssig + +# 0: symbol +compiler.err.pkg.clashes.with.class.of.same.name=Es besteht ein Konflikt zwischen dem Package {0} und einer gleichnamigen Klasse + +compiler.err.warnings.and.werror=Warnungen gefunden und -Werror angegeben + +# Errors related to annotation processing + +# 0: symbol, 1: message segment, 2: string (stack-trace) +compiler.err.proc.cant.access=Kein Zugriff auf {0}\n{1}\nDetails finden Sie im folgenden Stacktrace.\n{2} + +# 0: symbol, 1: message segment +compiler.err.proc.cant.access.1=Kein Zugriff auf {0}\n{1} + +# 0: string +compiler.err.proc.cant.find.class=Klassendatei f\u00FCr "{0}" konnte nicht gefunden werden. + +# 0: string +compiler.err.proc.cant.load.class=Prozessorklassendatei konnte nicht geladen werden. Grund: "{0}". + +# Print a client-generated error message; assumed to be localized, no translation required +# 0: string +compiler.err.proc.messager={0} + +# 0: string +compiler.misc.exception.message={0} + +compiler.misc.user.selected.completion.failure=Von Benutzer ausgew\u00E4hlter Abschlussfehler nach Klassenname + +# 0: collection of string +compiler.err.proc.no.explicit.annotation.processing.requested=Klassennamen "{0}" werden nur akzeptiert, wenn die Annotationsverarbeitung explizit angefordert wird + +compiler.err.proc.no.service=ServiceLoader konnte nicht verwendet werden und ist f\u00FCr Annotationsverarbeitung erforderlich. + +# 0: string, 1: string +compiler.err.proc.processor.bad.option.name=Ung\u00FCltiger Optionsname "{0}" von Prozessor "{1}" angegeben + +# 0: string +compiler.err.proc.processor.cant.instantiate=Instanz von Prozessor "{0}" konnte nicht instanziiert werden + +# 0: string +compiler.err.proc.processor.not.found=Annotationsprozessor "{0}" nicht gefunden + +# 0: string +compiler.err.proc.processor.wrong.type=Annotationsprozessor "{0}" implementiert nicht javax.annotation.processing.Processor + +compiler.err.proc.service.problem=Fehler beim Erstellen eines Service-Loaders zum Laden von Prozessoren. + +# 0: string +compiler.err.proc.bad.config.file=Ung\u00FCltige Servicekonfigurationsdatei, oder Ausnahme beim Erstellen des Prozessorobjekts ausgel\u00F6st: {0} + +compiler.err.proc.cant.create.loader=Class Loader konnte nicht f\u00FCr Annotationsprozessoren erstellt werden: {0} + +# 0: symbol +compiler.err.qualified.new.of.static.class="new" von statischer Klasse qualifiziert + +compiler.err.recursive.ctor.invocation=Rekursiver Konstruktoraufruf + +# 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol +compiler.err.ref.ambiguous=Referenz zu {0} ist mehrdeutig\nSowohl {1} {2} in {3} als auch {4} {5} in {6} stimmen \u00FCberein + +# 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol +compiler.misc.ref.ambiguous=Referenz zu {0} ist mehrdeutig\nSowohl {1} {2} in {3} als auch {4} {5} in {6} stimmen \u00FCberein + +compiler.err.repeated.annotation.target=Wiederholtes Annotationsziel + +compiler.err.repeated.interface=Wiederholte Schnittstelle + +compiler.err.repeated.modifier=Wiederholter Modifikator + +# 0: symbol, 1: set of modifier, 2: symbol +compiler.err.report.access={0} hat {1}-Zugriff in {2} + +# 0: symbol, 1: set of modifier, 2: symbol +compiler.misc.report.access={0} hat {1}-Zugriff in {2} + +compiler.err.ret.outside.meth=R\u00FCckgabe au\u00DFerhalb von Methode + +compiler.err.signature.doesnt.match.supertype=Signatur stimmt nicht mit {0} \u00FCberein. Inkompatibler Supertyp + +compiler.err.signature.doesnt.match.intf=Signatur stimmt nicht mit {0} \u00FCberein. Inkompatible Schnittstellen + +# 0: symbol, 1: symbol, 2: symbol +compiler.err.does.not.override.abstract={0} ist nicht abstrakt und setzt die abstrakte Methode {1} in {2} nicht au\u00DFer Kraft + +# 0: file object +compiler.err.source.cant.overwrite.input.file=Fehler beim Schreiben von Quelle. Eingabedatei {0} kann nicht \u00FCberschrieben werden + +# 0: symbol +compiler.err.stack.sim.error=Interner Fehler: Stacksimulationsfehler in {0} + +compiler.err.static.imp.only.classes.and.interfaces=Statischer Import nur aus Klassen und Schnittstellen + +compiler.err.string.const.req=Konstanten-Zeichenfolgenausdruck erforderlich + +compiler.err.pattern.expected=Typmuster erwartet + +# 0: symbol, 1: fragment +compiler.err.cannot.generate.class=Fehler beim Generieren der Klasse {0}\n({1}) + +# 0: symbol, 1: symbol +compiler.misc.synthetic.name.conflict=Das Symbol {0} steht mit einem vom Compiler synthetisierten Symbol in {1} in Konflikt + +# 0: symbol, 1: type +compiler.misc.illegal.signature=Unzul\u00E4ssiges Signaturattribut f\u00FCr Typ {1} + +compiler.err.throws.not.allowed.in.intf.annotation=Throws-Klausel in @interface-Mitgliedern nicht zul\u00E4ssig + +compiler.err.try.without.catch.finally.or.resource.decls="try" ohne "catch", "finally" oder Ressourcendeklarationen + +# 0: symbol +compiler.err.type.doesnt.take.params=Typ {0} akzeptiert keine Parameter + +compiler.err.type.var.cant.be.deref=Auswahl aus Typvariable nicht m\u00F6glich + +compiler.err.type.var.may.not.be.followed.by.other.bounds=Auf eine Typvariable d\u00FCrfen keine anderen Begrenzungen folgen + +compiler.err.type.var.more.than.once=Typvariable {0} tritt mehrmals im Ergebnistyp von {1} auf. Sie muss instanziiert werden + +compiler.err.type.var.more.than.once.in.result=Typvariable {0} tritt mehrmals im Typ von {1} auf. Sie muss instanziiert werden + +# 0: type, 1: type, 2: fragment +compiler.err.types.incompatible=Die Typen {0} und {1} sind inkompatibel.\n{2} + +# 0: name, 1: list of type +compiler.misc.incompatible.diff.ret=Beide definieren {0}({1}), aber mit nicht verwandten R\u00FCckgabetypen + +# 0: kind name, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol +compiler.misc.incompatible.unrelated.defaults={0} {1} erbt nicht verwandte Standardwerte f\u00FCr {2}({3}) von Typen {4} und {5} + +# 0: kind name, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol +compiler.misc.incompatible.abstract.default={0} {1} erbt abstrakte und Standardmethode f\u00FCr {2}({3}) von Typen {4} und {5} + +# 0: name, 1: kind name, 2: symbol +compiler.err.default.overrides.object.member=Standardmethode {0} in {1} {2} setzt ein Mitglied von java.lang.Object au\u00DFer Kraft + +# 0: type +compiler.err.illegal.static.intf.meth.call=Unzul\u00E4ssiger statischer Schnittstellenmethodenaufruf\nDer Empf\u00E4ngerausdruck muss durch den Typ-Qualifier "{0}" ersetzt werden + +# 0: symbol or type, 1: message segment +compiler.err.illegal.default.super.call=Ung\u00FCltiger Typ-Qualifier {0} in Standardsuperaufruf\n{1} + +# 0: symbol, 1: type +compiler.misc.overridden.default=Methode {0} wird in {1} au\u00DFer Kraft gesetzt + +# 0: symbol, 1: type or symbol +compiler.misc.redundant.supertype=Redundante Schnittstelle {0} wird durch {1} erweitert + +compiler.err.unclosed.char.lit=Nicht geschlossenes Zeichenliteral + +compiler.err.unclosed.comment=Nicht geschlossener Kommentar + +compiler.err.unclosed.str.lit=Nicht geschlossenes Zeichenfolgenliteral + +compiler.err.unclosed.text.block=Nicht geschlossener Textblock + +# 0: string +compiler.err.unsupported.encoding=Nicht unterst\u00FCtzte Codierung: {0} + +compiler.err.io.exception=Fehler beim Lesen der Quelldatei: {0} + +# 0: name +compiler.err.undef.label=Nicht definiertes Label: {0} + +# 0: name +compiler.err.illegal.ref.to.restricted.type=Unzul\u00E4ssige Referenz zu eingeschr\u00E4nktem Typ "{0}" + +# 0: name +compiler.warn.illegal.ref.to.restricted.type=Unzul\u00E4ssige Referenz zu eingeschr\u00E4nktem Typ "{0}" + +# 0: name, 1: source +compiler.err.restricted.type.not.allowed="{0}" ist hier nicht zul\u00E4ssig\nAb Release {1} ist "{0}" ein eingeschr\u00E4nkter Typname, der nicht f\u00FCr Typdeklarationen verwendet werden kann + +# 0: name, 1: source +compiler.warn.restricted.type.not.allowed=Ab Release {1} ist "{0}" ein eingeschr\u00E4nkter Typname, der nicht f\u00FCr Typdeklarationen oder als Elementtyp eines Arrays verwendet werden kann + +# 0: name, 1: source +compiler.warn.restricted.type.not.allowed.preview="{0}" kann in einem zuk\u00FCnftigen Release ein eingeschr\u00E4nkter Typname werden, der nicht f\u00FCr Typdeklarationen oder als Elementtyp eines Arrays verwendet werden kann + +# 0: name (variable), 1: message segment +compiler.err.cant.infer.local.var.type=Typ f\u00FCr lokale Variable {0} kann nicht abgeleitet werden\n({1}) + +# 0: name +compiler.err.restricted.type.not.allowed.here="{0}" ist hier nicht zul\u00E4ssig + +# 0: name +compiler.err.restricted.type.not.allowed.array="{0}" ist nicht als Elementtyp eines Arrays zul\u00E4ssig + +# 0: name +compiler.err.restricted.type.not.allowed.compound="{0}" ist nicht in einer zusammengesetzten Deklaration zul\u00E4ssig + +# 0: fragment +compiler.err.invalid.lambda.parameter.declaration=Ung\u00FCltige Lambda-Parameterdeklaration\n({0}) + +compiler.misc.implicit.and.explicit.not.allowed=Implizit typisierte Parameter k\u00F6nnen nicht mit explizit typisierten Parametern gemischt werden + +compiler.misc.var.and.explicit.not.allowed="var" kann nicht mit explizit typisierten Parametern gemischt werden + +compiler.misc.var.and.implicit.not.allowed="var" kann nicht mit implizit typisierten Parametern gemischt werden + +compiler.misc.local.cant.infer.null=Variablen-Initializer ist "null" + +compiler.misc.local.cant.infer.void=Variablen-Initializer ist "void" + +compiler.misc.local.missing.init="var" kann nicht f\u00FCr Variable ohne Initializer verwendet werden + +compiler.misc.local.lambda.missing.target=Lambda-Ausdruck erfordert einen expliziten Zieltyp + +compiler.misc.local.mref.missing.target=Methodenreferenz erfordert einen expliziten Zieltyp + +compiler.misc.local.array.missing.target=Array-Initializer erfordert einen expliziten Zieltyp + +compiler.misc.local.self.ref="var" kann nicht f\u00FCr selbstreferenzierende Variable verwendet werden + +# 0: message segment, 1: unused +compiler.err.cant.apply.diamond=Typargumente f\u00FCr {0} k\u00F6nnen nicht abgeleitet werden + +# 0: message segment or type, 1: message segment +compiler.err.cant.apply.diamond.1=Typargumente f\u00FCr {0} k\u00F6nnen nicht abgeleitet werden\nGrund: {1} + +# 0: message segment or type, 1: message segment +compiler.misc.cant.apply.diamond.1=Typargumente f\u00FCr {0} k\u00F6nnen nicht abgeleitet werden\nGrund: {1} + +compiler.err.unreachable.stmt=Nicht erreichbare Anweisung + +compiler.err.not.exhaustive=Der Switch-Ausdruck deckt nicht alle m\u00F6glichen Eingabewerte ab + +compiler.err.not.exhaustive.statement=Die Switch-Anweisung deckt nicht alle m\u00F6glichen Eingabewerte ab + +compiler.err.initializer.must.be.able.to.complete.normally=Initializer muss normal abgeschlossen werden k\u00F6nnen + +compiler.err.initializer.not.allowed=Initializer in Schnittstellen nicht zul\u00E4ssig + +# 0: type +compiler.err.unreported.exception.need.to.catch.or.throw=Nicht gemeldete Ausnahme {0}. Muss abgefangen oder deklariert werden, um ausgel\u00F6st zu werden + +# 0: type +compiler.err.unreported.exception.default.constructor=Nicht gemeldete Ausnahme {0} in Standardkonstruktor + +# 0: type, 1: name +compiler.err.unreported.exception.implicit.close=Nicht gemeldete Ausnahme {0}. Muss abgefangen oder deklariert werden, um ausgel\u00F6st zu werden\nAusnahme bei implizitem Aufruf von close() f\u00FCr Ressourcenvariable "{1}" ausgel\u00F6st + +compiler.err.void.not.allowed.here="void"-Typ hier nicht zul\u00E4ssig + +# 0: string +compiler.err.wrong.number.type.args=Falsche Anzahl Typargumente. {0} erforderlich + +# 0: symbol +compiler.err.var.might.already.be.assigned=Variable {0} wurde m\u00F6glicherweise bereits zugewiesen + +# 0: symbol +compiler.err.var.might.not.have.been.initialized=Variable {0} wurde m\u00F6glicherweise nicht initialisiert + +# 0: symbol +compiler.err.var.not.initialized.in.default.constructor=Variable {0} nicht im Standardkonstruktor initialisiert + +# 0: symbol +compiler.err.var.might.be.assigned.in.loop=Variable {0} wurde m\u00F6glicherweise in Schleife zugewiesen + +# 0: symbol, 1: message segment +compiler.err.varargs.invalid.trustme.anno=Ung\u00FCltige {0}-Annotation. {1} + +# 0: type +compiler.misc.varargs.trustme.on.reifiable.varargs=Varargs-Elementtyp {0} ist reifizierbar. + +# 0: type, 1: type +compiler.err.instanceof.reifiable.not.safe={0} kann nicht sicher in {1} konvertiert werden + +# 0: type, 1: type +compiler.err.instanceof.pattern.no.subtype=Ausdruckstyp {0} ist ein Subtyp des Mustertyps {1} + +# 0: symbol +compiler.misc.varargs.trustme.on.non.varargs.meth=Methode {0} ist keine varargs-Methode. + +# 0: symbol +compiler.misc.varargs.trustme.on.non.varargs.accessor=Accessor {0} ist keine varargs-Methode. + +# 0: symbol +compiler.misc.varargs.trustme.on.virtual.varargs=Instanzmethode {0} ist weder final noch privat. + +# 0: symbol +compiler.misc.varargs.trustme.on.virtual.varargs.final.only=Instanzmethode {0} ist nicht final. + +# 0: type, 1: symbol kind, 2: symbol +compiler.misc.inaccessible.varargs.type=Auf den formalen varargs-Elementtyp {0} kann nicht von {1} {2} zugegriffen werden + +# In the following string, {1} will always be the detail message from +# java.io.IOException. +# 0: symbol, 1: string +compiler.err.class.cant.write=Fehler beim Schreiben von {0}: {1} + +# In the following string, {0} is the name of the class in the Java source. +# It really should be used two times.. +# 0: kind name, 1: name +compiler.err.class.public.should.be.in.file={0} {1} ist \u00F6ffentlich und muss in einer Datei namens {1}.java deklariert werden + +## All errors which do not refer to a particular line in the source code are +## preceded by this string. +compiler.err.error=Fehler: + +# The following error messages do not refer to a line in the source code. +compiler.err.cant.read.file=Lesen nicht m\u00F6glich: {0} + +# 0: string +compiler.err.plugin.not.found=Plug-in nicht gefunden: {0} + +# 0: path +compiler.warn.locn.unknown.file.on.module.path=Unbekannte Datei in Modulpfad: {0} + + +# 0: path +compiler.err.locn.bad.module-info=Problem beim Lesen von module-info.class in {0} + +# 0: path +compiler.err.locn.cant.read.directory=Verzeichnis {0} kann nicht gelesen werden + +# 0: path +compiler.err.locn.cant.read.file=Datei {0} kann nicht gelesen werden + +# 0: path +compiler.err.locn.cant.get.module.name.for.jar=Modulname f\u00FCr {0} kann nicht bestimmt werden + +# 0: path +compiler.err.multi-module.outdir.cannot.be.exploded.module=Im Modus f\u00FCr mehrere Module kann das Ausgabeverzeichnis kein entpacktes Modul sein: {0} + +# 0: path +compiler.warn.outdir.is.in.exploded.module=Das Ausgabeverzeichnis befindet sich in einem entpackten Modul: {0} + +# 0: file object +compiler.err.locn.module-info.not.allowed.on.patch.path=module-info.class nicht in Patchpfad zul\u00E4ssig: {0} + +# 0: string +compiler.err.locn.invalid.arg.for.xpatch=Ung\u00FCltiges Argument f\u00FCr --patch-module-Option: {0} + +compiler.err.file.sb.on.source.or.patch.path.for.module=Datei muss sich im Quellpfad oder im Patchpfad f\u00FCr das Modul befinden + +compiler.err.no.java.lang=Package java.lang kann in Plattformklassen nicht gefunden werden + +##### + +# Fatal Errors + +# 0: name +compiler.misc.fatal.err.cant.locate.meth=Schwerwiegender Fehler: Methode {0} kann nicht gefunden werden + +# 0: name +compiler.misc.fatal.err.cant.locate.field=Schwerwiegender Fehler: Feld {0} kann nicht gefunden werden + +# 0: type +compiler.misc.fatal.err.cant.locate.ctor=Schwerwiegender Fehler: Konstruktor f\u00FCr {0} kann nicht gefunden werden + +compiler.misc.fatal.err.cant.close=Schwerwiegender Fehler: Compiler-Ressourcen k\u00F6nnen nicht geschlossen werden + +##### + +## +## miscellaneous strings +## + +compiler.misc.diamond.anonymous.methods.implicitly.override=(aufgrund von <> muss jede nicht private Methode, die in dieser anonymen Klasse deklariert ist, eine Methode aus einem Supertyp au\u00DFer Kraft setzen oder implementieren) + +compiler.misc.source.unavailable=(Quelle nicht verf\u00FCgbar) + +compiler.misc.base.membership=Alle Basisklassen geh\u00F6ren zu dieser Gruppe + +# 0: string, 1: string, 2: boolean +compiler.misc.x.print.processor.info=Prozessor {0} entspricht {1} und gibt {2} zur\u00FCck. + +# 0: number, 1: string, 2: set of symbol, 3: boolean +compiler.misc.x.print.rounds=Runde {0}:\n\tEingabedateien: {1}\n\tAnnotationen: {2}\n\tLetzte Runde: {3} + +# 0: file name +compiler.warn.file.from.future=\u00C4nderungsdatum liegt in der Zukunft f\u00FCr Datei {0} + +##### + +## The following string will appear before all messages keyed as: +## "compiler.note". + +compiler.note.compressed.diags=Einige Meldungen wurden vereinfacht. Wiederholen Sie die Kompilierung mit -Xdiags:verbose, um die vollst\u00E4ndige Ausgabe abzurufen + +# 0: boolean, 1: symbol +compiler.note.lambda.stat=Lambda-Ausdruck wird \u00FCbersetzt\nAlternative Metafactory = {0}\nSynthetische Methode = {1} + +# 0: boolean, 1: unused +compiler.note.mref.stat=Methodenreferenz wird \u00FCbersetzt\nAlternative Metafactory = {0}\n +# 0: boolean, 1: symbol +compiler.note.mref.stat.1=Methodenreferenz wird \u00FCbersetzt\nAlternative Metafactory = {0}\nBridgemethode = {1} + +compiler.note.note=Hinweis: + +# 0: file name +compiler.note.deprecated.filename={0} verwendet oder \u00FCberschreibt eine veraltete API. + +compiler.note.deprecated.plural=Einige Eingabedateien verwenden oder \u00FCberschreiben eine veraltete API. + +# The following string may appear after one of the above deprecation +# messages. +compiler.note.deprecated.recompile=Wiederholen Sie die Kompilierung mit -Xlint:deprecation, um Details zu erhalten. + +# 0: file name +compiler.note.deprecated.filename.additional={0} hat weitere Verwendungen oder Overrides einer veralteten API. + +compiler.note.deprecated.plural.additional=Einige Eingabedateien verwenden oder \u00FCberschreiben zus\u00E4tzlich eine veraltete API. + +# 0: file name +compiler.note.removal.filename={0} verwendet oder \u00FCberschreibt eine veraltete API, die zum Entfernen markiert ist. + +compiler.note.removal.plural=Einige Eingabedateien verwenden oder \u00FCberschreiben eine veraltete API, die zum Entfernen markiert ist. + +# The following string may appear after one of the above removal messages. +compiler.note.removal.recompile=Wiederholen Sie die Kompilierung mit -Xlint:removal, um Details zu erhalten. + +# 0: file name +compiler.note.removal.filename.additional={0} hat weitere Verwendungen oder Overrides einer veralteten API, die zum Entfernen markiert ist. + +compiler.note.removal.plural.additional=Einige Eingabedateien verwenden oder \u00FCberschreiben zus\u00E4tzlich eine veraltete API, die zum Entfernen markiert ist. + +# 0: file name +compiler.note.unchecked.filename={0} verwendet nicht gepr\u00FCfte oder unsichere Vorg\u00E4nge. + +compiler.note.unchecked.plural=Einige Eingabedateien verwenden nicht gepr\u00FCfte oder unsichere Vorg\u00E4nge. + +# The following string may appear after one of the above unchecked messages. +compiler.note.unchecked.recompile=Wiederholen Sie die Kompilierung mit -Xlint:unchecked, um Details zu erhalten. + +# 0: file name +compiler.note.unchecked.filename.additional={0} weist weitere nicht gepr\u00FCfte oder unsichere Vorg\u00E4nge auf. + +compiler.note.unchecked.plural.additional=Einige Eingabedateien verwenden zus\u00E4tzlich nicht gepr\u00FCfte oder unsichere Vorg\u00E4nge. + +# 0: file name, 1: source +compiler.note.preview.filename={0} verwendet Vorschaufeatures von Java SE {1}. + +# 0: source +compiler.note.preview.plural=Einige Eingabedateien verwenden Vorschaufeatures von Java SE {0}. + +# The following string may appear after one of the above deprecation +# messages. +compiler.note.preview.recompile=Wiederholen Sie die Kompilierung mit -Xlint:preview, um Details zu erhalten. + +# 0: file name, 1: source +compiler.note.preview.filename.additional={0} hat weitere Verwendungen von Vorschaufeatures von Java SE {1}. + +# 0: source +compiler.note.preview.plural.additional=Einige Eingabedateien verwenden zus\u00E4tzlich Vorschaufeatures von Java SE {0}. + +# Notes related to annotation processing + +# Print a client-generated note; assumed to be localized, no translation required +# 0: string +compiler.note.proc.messager={0} + +# 0: string, 1: string, 2: string +compiler.note.multiple.elements=Mehrere Elemente namens "{1}" in Modulen "{2}" wurden von javax.lang.model.util.Elements.{0} gefunden. + +##### + +# 0: number +compiler.misc.count.error={0} Fehler + +# 0: number +compiler.misc.count.error.plural={0} Fehler + +# 0: number, 1: number +compiler.misc.count.error.recompile=Nur die ersten {0} Fehler von insgesamt {1} werden angezeigt. Mit -Xmaxerrs k\u00F6nnen Sie mehr Fehler anzeigen + +# 0: number, 1: number +compiler.misc.count.warn.recompile=Nur die ersten {0} Warnungen von insgesamt {1} werden angezeigt. Mit -Xmaxwarns k\u00F6nnen Sie mehr Warnungen anzeigen + +# 0: number +compiler.misc.count.warn={0} Warnung + +# 0: number +compiler.misc.count.warn.plural={0} Warnungen + +compiler.misc.version.not.available=(Versionsinformationen nicht verf\u00FCgbar) + +## extra output when using -verbose (JavaCompiler) + +# 0: symbol +compiler.misc.verbose.checking.attribution=[{0} wird gepr\u00FCft] + +# 0: string +compiler.misc.verbose.parsing.done=[Parsen abgeschlossen: {0} ms] + +# 0: file name +compiler.misc.verbose.parsing.started=[Parsen gestartet: {0}] + +# 0: string +compiler.misc.verbose.total=[{0} ms gesamt] + +# 0: file name +compiler.misc.verbose.wrote.file=[{0} geschrieben] + +## extra output when using -verbose (code/ClassReader) +# 0: string +compiler.misc.verbose.loading=[{0} wird geladen] + +# 0: string +compiler.misc.verbose.sourcepath=[Suchpfad f\u00FCr Quelldateien: {0}] + +# 0: string +compiler.misc.verbose.classpath=[Suchpfad f\u00FCr Klassendateien: {0}] + +## extra output when using -prompt (util/Log) +compiler.misc.resume.abort=F)ortsetzen, A)bbruch> + +##### + +## +## warnings +## + +## All warning messages are preceded by the following string. +compiler.warn.warning=Warnung: + +## Warning messages may also include the following prefix to identify a +## lint option +# 0: option name +compiler.warn.lintOption=[{0}] + +# 0: symbol +compiler.warn.constant.SVUID=serialVersionUID muss Konstante in Klasse {0} sein + +# 0: path +compiler.warn.dir.path.element.not.found=Ung\u00FCltiges Pfadelement "{0}": Verzeichnis nicht vorhanden + +# 0: file name +compiler.warn.dir.path.element.not.directory=Ung\u00FCltiges Pfadelement "{0}": kein Verzeichnis + +# 0: symbol, 1: symbol, 2: symbol +compiler.warn.missing-explicit-ctor=Klasse {0} in exportiertem Package {1} deklariert keine expliziten Konstruktoren und stellt daher einen Standardkonstruktor f\u00FCr Clients des Moduls {2} bereit + +compiler.warn.strictfp=Ab Release 17 werden alle Gleitkommaausdr\u00FCcke streng ausgewertet. Daher ist "strictfp" nicht erforderlich + +compiler.warn.finally.cannot.complete=Finally-Klausel kann nicht normal abgeschlossen werden + +# 0: name +compiler.warn.poor.choice.for.module.name=Modulnamenskomponente {0} darf keine Ziffern am Ende enthalten + +# 0: string +compiler.warn.incubating.modules=Inkubatormodul(e) verwendet: {0} + +# 0: symbol, 1: symbol +compiler.warn.has.been.deprecated={0} in {1} ist veraltet + +# 0: symbol, 1: symbol +compiler.warn.has.been.deprecated.for.removal={0} in {1} ist veraltet und wurde zum Entfernen markiert + +# 0: symbol +compiler.warn.is.preview={0} ist eine Vorschau-API, die in einem zuk\u00FCnftigen Release entfernt werden kann. + +# 0: symbol +compiler.err.is.preview={0} ist eine Vorschau-API, die standardm\u00E4\u00DFig deaktiviert ist.\n(Verwenden Sie --enable-preview, um Vorschau-APIs zu aktivieren) + +# 0: symbol +compiler.warn.is.preview.reflective={0} ist eine reflektive Vorschau-API, die in einem zuk\u00FCnftigen Release entfernt werden kann. + +# 0: symbol +compiler.warn.has.been.deprecated.module=Modul {0} ist veraltet + +# 0: symbol +compiler.warn.has.been.deprecated.for.removal.module=Modul {0} ist veraltet und wurde zum Entfernen markiert + +# 0: symbol +compiler.warn.sun.proprietary={0} ist eine interne propriet\u00E4re API, die in einem zuk\u00FCnftigen Release entfernt werden kann + +compiler.warn.illegal.char.for.encoding=Nicht zuordenbares Zeichen f\u00FCr Codierung {0} + +# 0: symbol +compiler.warn.improper.SVUID=serialVersionUID muss als "static final" in Klasse {0} deklariert sein + +compiler.warn.improper.SPF=serialPersistentFields muss als "private static final" deklariert sein, um in Kraft zu treten + +compiler.warn.SPF.null.init=serialPersistentFields tritt bei Initialisierung als Null nicht in Kraft.\nF\u00FChren Sie die Initialisierung zu einem leeren Array aus, um keine Felder anzugeben + + +# 0: type, 1: type +compiler.warn.inexact.non-varargs.call=Nicht-varargs-Aufruf von varargs-Methode mit ungenauem Argumenttyp f\u00FCr den letzten Parameter.\nF\u00FChren Sie f\u00FCr einen varargs-Aufruf eine Umwandlung mit Cast in {0} aus\nF\u00FChren Sie f\u00FCr einen Nicht-varargs-Aufruf eine Umwandlung mit Cast in {1} aus, um diese Warnung zu unterdr\u00FCcken + +# 0: list of type +compiler.warn.unreachable.catch=Nicht erreichbare Catch-Klausel\nAusgel\u00F6ster Typ {0} wurde bereits abgefangen + +# 0: list of type +compiler.warn.unreachable.catch.1=Nicht erreichbare Catch-Klausel\nAusgel\u00F6ste Typen {0} wurden bereits abgefangen + +# 0: symbol +compiler.warn.long.SVUID=serialVersionUID muss den Typ "long" in Klasse {0} aufweisen + +compiler.warn.OSF.array.SPF=serialPersistentFields muss den Typ "java.io.ObjectStreamField[]" aufweisen, um in Kraft zu treten + +# 0: symbol +compiler.warn.missing.SVUID=Serialisierbare Klasse {0} enth\u00E4lt keine Definition von serialVersionUID + +# 0: name +compiler.warn.serializable.missing.access.no.arg.ctor=Zugriff auf einen no-arg-Konstruktor in der ersten nicht serialisierbaren Superklasse {0} nicht m\u00F6glich + +# 0: name +compiler.warn.serial.method.not.private=Serialisierungsbezogene Methode {0} nicht als privat deklariert + +# 0: name +compiler.warn.serial.concrete.instance.method=Serialisierungsbezogene Methode {0} muss eine konkrete Instanzmethode sein, um in Kraft zu treten. Sie darf nicht abstrakt oder statisch sein + +# 0: name +compiler.warn.serial.method.static=Serialisierungsbezogene Methode {0} ist als statisch deklariert. Sie muss stattdessen eine Instanzmethode sein, um in Kraft zu treten. + +# 0: name +compiler.warn.serial.method.no.args=Serialisierungsbezogene Methode {0} darf keine Parameter aufweisen, um in Kraft zu treten + +# 0: name, 1: number +compiler.warn.serial.method.one.arg=Serialisierungsbezogene Methode {0} muss genau einen Parameter aufweisen, um in Kraft zu treten. Sie darf nicht {1} Parameter enthalten + +# 0: name, 1: type, 2: type +compiler.warn.serial.method.parameter.type=Der einzige Parameter der serialisierungsbezogenen Methode {0} muss den Typ {1} haben, um in Kraft zu treten. Er darf nicht den Typ {2} aufweisen + +# 0: name, 1: type, 2: type +compiler.warn.serial.method.unexpected.return.type=Serialisierungsbezogene Methode {0} wurde mit dem R\u00FCckgabetyp {1} und nicht dem erwarteten Typ {2} deklariert.\nMit dieser Deklaration ist die Methode ung\u00FCltig f\u00FCr die Serialisierung + +# 0: name, 1: type +compiler.warn.serial.method.unexpected.exception=Serialisierungsbezogene Methode {0} wurde zum Ausl\u00F6sen eines unerwarteten Typs {1} deklariert + +compiler.warn.ineffectual.serial.field.interface=serialPersistentFields ist in einer Schnittstelle nicht effektiv + +# 0: string +compiler.warn.ineffectual.serial.field.enum=Serialisierungsbezogenes Feld {0} ist in einer Enum-Klasse nicht effektiv + +# 0: string +compiler.warn.ineffectual.serial.method.enum=Serialisierungsbezogene Methode {0} ist in einer Enum-Klasse nicht effektiv + +compiler.warn.ineffectual.serial.field.record=serialPersistentFields ist in einer Datensatzklasse nicht effektiv + +# 0: string +compiler.warn.ineffectual.serial.method.record=Serialisierungsbezogene Methode {0} ist in einer Datensatzklasse nicht effektiv + +# 0: name +compiler.warn.ineffectual.serial.method.externalizable=Serialisierungsbezogene Methode {0} ist in einer externalisierbaren Klasse nicht effektiv + +compiler.warn.ineffectual.serial.field.externalizable=serialPersistentFields ist in einer externalisierbaren Klasse nicht effektiv + +compiler.warn.externalizable.missing.public.no.arg.ctor=Eine externalisierbare Klasse erfordert einen \u00F6ffentlichen no-arg-Konstruktor + +compiler.warn.non.serializable.instance.field=Nicht transientes Instanzfeld einer serialisierbaren Klasse mit einem nicht serialisierbaren Typ deklariert + +# 0: type +compiler.warn.non.serializable.instance.field.array=Nicht transientes Instanzfeld einer serialisierbaren Klasse wurde mit einem Array mit einem nicht serialisierbaren Basiskomponententyp {0} deklariert + +compiler.warn.non.private.method.weaker.access=Serialisierungsbezogene Methode, die in einer Schnittstelle als nicht privat deklariert ist, verhindert,\ndass Klassen, die die Schnittstelle implementieren, die Methode als privat deklarieren + +compiler.warn.default.ineffective=Serialisierungsbezogene Standardmethode aus einer Schnittstelle wird nicht von der Serialisierung f\u00FCr eine implementierende Klasse ausgef\u00FChrt + +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.warn.potentially.ambiguous.overload={0} in {1} ist m\u00F6glicherweise mehrdeutig mit {2} in {3} + +# 0: message segment +compiler.warn.override.varargs.missing={0}. Au\u00DFer Kraft gesetzte Methode umfasst kein "..." + +# 0: message segment +compiler.warn.override.varargs.extra={0}. In au\u00DFer Kraft setzender Methode fehlt "..." + +# 0: message segment +compiler.warn.override.bridge={0}. Au\u00DFer Kraft setzende Methode ist eine Bridgemethode + +# 0: symbol +compiler.warn.pkg-info.already.seen=Die Datei package-info.java wurde bereits f\u00FCr Package {0} gefunden + +# 0: path +compiler.warn.path.element.not.found=Ung\u00FCltiges Pfadelement "{0}": Datei oder Verzeichnis nicht vorhanden + +compiler.warn.possible.fall-through.into.case=M\u00F6glicher Fallthrough in Case + +# 0: type +compiler.warn.redundant.cast=Redundantes Casting in {0} + +# 0: number +compiler.warn.position.overflow=Positionscodierungs\u00FCberlauf bei Zeile {0} + +# 0: file name, 1: number, 2: number +compiler.warn.big.major.version={0}: Hauptversion {1} ist neuer als {2}, die h\u00F6chste Hauptversion, die von diesem Compiler unterst\u00FCtzt wird.\nEs wird empfohlen, dass Sie den Compiler upgraden. + +# 0: kind name, 1: symbol +compiler.warn.static.not.qualified.by.type=Statische {0} muss mit Typname {1} anstelle eines Ausdrucks qualifiziert werden + +# 0: string +compiler.warn.source.no.bootclasspath=Bootstrap Classpath nicht zusammen mit -source {0} festgelegt + +# 0: string +compiler.warn.source.no.system.modules.path=Systemmodulpfad nicht zusammen mit -source {0} festgelegt + +# 0: string +compiler.warn.option.obsolete.source=Quellwert {0} ist veraltet und wird in einem zuk\u00FCnftigen Release entfernt + +# 0: target +compiler.warn.option.obsolete.target=Zielwert {0} ist veraltet und wird in einem zuk\u00FCnftigen Release entfernt + +# 0: string, 1: string +compiler.err.option.removed.source=Quelloption {0} wird nicht mehr unterst\u00FCtzt. Verwenden Sie {1} oder h\u00F6her. + +# 0: target, 1: target +compiler.err.option.removed.target=Zieloption {0} wird nicht mehr unterst\u00FCtzt. Verwenden Sie {1} oder h\u00F6her. + + +# 0: target, 1: target +compiler.warn.option.parameters.unsupported=-parameters wird f\u00FCr Zielwert {0} nicht unterst\u00FCtzt. Verwenden Sie {1} oder h\u00F6her. + +compiler.warn.option.obsolete.suppression=Verwenden Sie -Xlint:-options, um Warnungen zu veralteten Optionen zu unterdr\u00FCcken. + +# 0: name, 1: number, 2: number, 3: number, 4: number +compiler.warn.future.attr={0}-Attribut, das in Klassendateien der Version {1}.{2} eingef\u00FChrt wurde, wird in Klassendateien der Version {3}.{4} ignoriert + +compiler.warn.requires.automatic=Erfordert Direktive f\u00FCr ein automatisches Modul + +compiler.warn.requires.transitive.automatic=Erfordert transitive-Direktive f\u00FCr ein automatisches Modul + +# Warnings related to annotation processing +# 0: string +compiler.warn.proc.package.does.not.exist=Package {0} ist nicht vorhanden + +# 0: string +compiler.warn.proc.file.reopening=Versuch, mehrmals eine Datei f\u00FCr "{0}" zu erstellen + +# 0: string +compiler.warn.proc.type.already.exists=Es ist bereits eine Datei f\u00FCr Typ "{0}" im Quellpfad oder Classpath vorhanden + +# 0: string +compiler.warn.proc.type.recreate=Versuch, mehrmals eine Datei f\u00FCr Typ "{0}" zu erstellen + +# 0: string +compiler.warn.proc.illegal.file.name=Datei kann nicht f\u00FCr unzul\u00E4ssigen Namen "{0}" erstellt werden. + +# 0: string, 1: string +compiler.warn.proc.suspicious.class.name=Datei f\u00FCr einen Typ, dessen Name mit {1} endet, wird erstellt: "{0}" + +# 0: string +compiler.warn.proc.file.create.last.round=Datei f\u00FCr Typ "{0}", die in der letzten Runde erstellt wurde, wird keiner Annotationsverarbeitung unterzogen. + +# 0: string, 1: string +compiler.warn.proc.malformed.supported.string=Nicht wohlgeformte Zeichenfolge "{0}" f\u00FCr eine unterst\u00FCtzte Annotationsschnittstelle von Prozessor "{1}" zur\u00FCckgegeben + +# 0: set of string +compiler.warn.proc.annotations.without.processors=Diese Annotationen wurden von keinem Prozessor beansprucht: {0} + +# 0: source version, 1: string, 2: string +compiler.warn.proc.processor.incompatible.source.version=Unterst\u00FCtzte Quellversion "{0}" von Annotationsprozessor "{1}" kleiner als -source "{2}" + +# 0: string, 1: string +compiler.warn.proc.duplicate.option.name=Doppelte unterst\u00FCtzte Option "{0}" von Annotationsprozessor "{1}" zur\u00FCckgegeben + +# 0: string, 1: string +compiler.warn.proc.duplicate.supported.annotation=Doppelte unterst\u00FCtzte Annotationsschnittstelle "{0}" von Annotationsprozessor "{1}" zur\u00FCckgegeben + +# 0: string +compiler.warn.proc.redundant.types.with.wildcard=Annotationsprozessor "{0}" unterst\u00FCtzt redundant sowohl "*" als auch andere Annotationsschnittstellen + +compiler.warn.proc.proc-only.requested.no.procs=Annotationsverarbeitung ohne Kompilierung angefordert, aber keine Prozessoren gefunden. + +compiler.warn.proc.use.implicit=Implizit kompilierte Dateien wurden keiner Annotationsverarbeitung unterzogen.\nVerwenden Sie -implicit, um eine Policy f\u00FCr die implizite Kompilierung anzugeben. + +compiler.warn.proc.use.proc.or.implicit=Implizit kompilierte Dateien wurden keiner Annotationsverarbeitung unterzogen.\nVerwenden Sie -proc:none, um die Annotationsverarbeitung zu deaktivieren, oder -implicit, um eine Policy f\u00FCr die implizite Kompilierung anzugeben. + +# Print a client-generated warning; assumed to be localized, no translation required +# 0: string +compiler.warn.proc.messager={0} + +# 0: set of string +compiler.warn.proc.unclosed.type.files=Nicht geschlossene Dateien f\u00FCr die Typen "{0}". Diese Typen werden keiner Annotationsverarbeitung unterzogen + +# 0: string +compiler.warn.proc.unmatched.processor.options=Die folgenden Optionen wurden von keinem Prozessor erkannt: "{0}" + +compiler.warn.try.explicit.close.call=Expliziter Aufruf von close() f\u00FCr eine automatisch schlie\u00DFbare Ressource + +# 0: symbol +compiler.warn.try.resource.not.referenced=Automatisch schlie\u00DFbare Ressource {0} wird nie im Body der entsprechenden try-Anweisung referenziert + +# 0: type +compiler.warn.try.resource.throws.interrupted.exc=Automatisch schlie\u00DFbare Ressource {0} umfasst die Mitgliedsmethode close(), die InterruptedException ausl\u00F6sen k\u00F6nnte + +compiler.warn.unchecked.assign=Nicht gepr\u00FCfte Zuweisung: {0} zu {1} + +# 0: symbol, 1: type +compiler.warn.unchecked.assign.to.var=Nicht gepr\u00FCfte Zuweisung zu Variable {0} als Mitglied des Raw-Typs {1} + +# 0: symbol, 1: type +compiler.warn.unchecked.call.mbr.of.raw.type=Nicht gepr\u00FCfter Aufruf von {0} als Mitglied des Raw-Typs {1} + +compiler.warn.unchecked.cast.to.type=Nicht gepr\u00FCftes Casting zu Typ {0} + +# 0: kind name, 1: name, 2: object, 3: object, 4: kind name, 5: symbol +compiler.warn.unchecked.meth.invocation.applied=Nicht gepr\u00FCfter Methodenaufruf: {0} {1} in {4} {5} wird auf die angegebenen Typen angewendet\nErforderlich: {2}\nErmittelt: {3} + +# 0: type +compiler.warn.unchecked.generic.array.creation=Nicht gepr\u00FCfte Erstellung eines generischen Arrays f\u00FCr varargs-Parameter des Typs {0} + +# 0: type +compiler.warn.unchecked.varargs.non.reifiable.type=M\u00F6glich Heap-Besch\u00E4digung aus parametrisiertem vararg-Typ {0} + +# 0: symbol +compiler.warn.varargs.unsafe.use.varargs.param=Varargs-Methode k\u00F6nnte Heap-Besch\u00E4digung aus nicht reifizierbarem varargs-Parameter {0} verursachen + +compiler.warn.missing.deprecated.annotation=Veraltetes Element ist nicht mit @Deprecated-Annotation versehen + +# 0: kind name +compiler.warn.deprecated.annotation.has.no.effect=@Deprecated-Annotation hat keine Auswirkung auf diese {0}-Deklaration + +# 0: string +compiler.warn.invalid.path=Ung\u00FCltiger Dateiname: {0} + +compiler.warn.doclint.not.available=Kein Serviceprovider f\u00FCr doclint verf\u00FCgbar + +# 0: string +compiler.err.invalid.path=Ung\u00FCltiger Dateiname: {0} + + +# 0: path +compiler.warn.invalid.archive.file=Unerwartete Datei in Pfad: {0} + +# 0: path +compiler.warn.unexpected.archive.file=Unerwartete Erweiterung f\u00FCr Archivdatei: {0} + +# 0: path +compiler.err.no.zipfs.for.archive=Kein Dateisystemprovider zur Verarbeitung dieser Datei verf\u00FCgbar: {0} + +compiler.warn.div.zero=Division durch Null + +compiler.warn.empty.if=Leere Anweisung nach "if" + +# 0: type, 1: name +compiler.warn.annotation.method.not.found=Annotationsmethode "{1}()" kann nicht in Typ "{0}" gefunden werden + +# 0: type, 1: name, 2: message segment +compiler.warn.annotation.method.not.found.reason=Annotationsmethode "{1}()" kann nicht in Typ "{0}" gefunden werden: {2} + +# 0: file object, 1: symbol, 2: name +compiler.warn.unknown.enum.constant=Unbekannte Enum-Konstante {1}.{2} + +# 0: file object, 1: symbol, 2: name, 3: message segment +compiler.warn.unknown.enum.constant.reason=Unbekannte Enum-Konstante {1}.{2}\nGrund: {3} + +# 0: type, 1: type +compiler.warn.raw.class.use=Raw-Typ gefunden: {0}\nTypargumente f\u00FCr generische Klasse {1} fehlen + +compiler.warn.diamond.redundant.args=Redundante Typargumente in neuem Ausdruck (verwenden Sie stattdessen den Rautenoperator). + +compiler.warn.local.redundant.type=Redundanter Typ f\u00FCr lokale Variable (ersetzen Sie den expliziten Typ durch "var"). + +compiler.warn.potential.lambda.found=Die Erstellung dieser anonymen inneren Klasse kann in einen Lambda-Ausdruck umgewandelt werden. + +compiler.warn.method.redundant.typeargs=Redundante Typargumente in Methodenaufruf. + +# 0: symbol, 1: message segment +compiler.warn.varargs.redundant.trustme.anno=Redundante {0}-Annotation. {1} + +# 0: symbol +compiler.warn.access.to.member.from.serializable.element=Zugriff auf Mitglied {0} aus serialisierbarem Element kann \u00F6ffentlich f\u00FCr nicht vertrauensw\u00FCrdigen Code zug\u00E4nglich sein + +# 0: symbol +compiler.warn.access.to.member.from.serializable.lambda=Zugriff auf Mitglied {0} aus serialisierbarem Lambda kann \u00F6ffentlich f\u00FCr nicht vertrauensw\u00FCrdigen Code zug\u00E4nglich sein + +##### + +## The following are tokens which are non-terminals in the language. They should +## be named as JLS3 calls them when translated to the appropriate language. +compiler.misc.token.identifier= + +compiler.misc.token.character= + +compiler.misc.token.string= + +compiler.misc.token.integer= + +compiler.misc.token.long-integer= + +compiler.misc.token.float= + +compiler.misc.token.double= + +compiler.misc.token.bad-symbol= + +compiler.misc.token.end-of-input= + +## The argument to the following string will always be one of the following: +## 1. one of the above non-terminals +## 2. a keyword (JLS1.8) +## 3. a boolean literal (JLS3.10.3) +## 4. the null literal (JLS3.10.7) +## 5. a Java separator (JLS3.11) +## 6. an operator (JLS3.12) +## +## This is the only place these tokens will be used. +# 0: token +compiler.err.expected={0} erwartet + +# 0: string +compiler.err.expected.str={0} erwartet + +# 0: token, 1: token +compiler.err.expected2={0} oder {1} erwartet + +# 0: token, 1: token, 2: token +compiler.err.expected3={0}, {1} oder {2} erwartet + +# 0: token, 1: token, 2: token, 3: string +compiler.err.expected4={0}, {1}, {2} oder {3} erwartet + +compiler.err.premature.eof=Dateiende beim Parsen erreicht + +compiler.err.enum.constant.expected=Hier wird eine Enum-Konstante erwartet + +compiler.err.enum.constant.not.expected=Hier wird keine Enum-Konstante erwartet + +## The following are related in form, but do not easily fit the above paradigm. +compiler.err.expected.module.or.open="module" oder "open" erwartet + +compiler.err.dot.class.expected=".class" erwartet + +## The argument to this string will always be either 'case' or 'default'. +# 0: token +compiler.err.orphaned={0} verwaist + +# 0: name +compiler.misc.anonymous.class= + +# 0: name, 1: type +compiler.misc.type.captureof=capture#{0} von {1} + +compiler.misc.type.captureof.1=capture#{0} + +compiler.misc.type.none= + +compiler.misc.unnamed.package=Unbenanntes Package + +compiler.misc.unnamed.module=Unbenanntes Modul + +##### + +# 0: symbol, 1: message segment +compiler.err.cant.access=Kein Zugriff auf {0}\n{1} + +# 0: name +compiler.misc.bad.class.file=Klassendatei ist ung\u00FCltig f\u00FCr Klasse {0} + +# 0: file name, 1: string (expected constant pool entry type), 2: number (constant pool index) +compiler.misc.bad.const.pool.entry=Ung\u00FCltiger Konstantenpooleintrag in {0}\n{1} bei Index {2} erwartet + +# 0: file name, 1: number (constant pool index), 2: number (constant pool size) +compiler.misc.bad.const.pool.index=Ung\u00FCltiger Konstantenpoolindex in {0}\nIndex {1} liegt nicht innerhalb der Poolgr\u00F6\u00DFe {2}. + +# 0: file name, 1: message segment +compiler.misc.bad.class.file.header=Ung\u00FCltige Klassendatei: {0}\n{1}\nEntfernen Sie die Datei, oder stellen Sie sicher, dass sie im richtigen Unterverzeichnis des Classpath vorhanden ist. + +# 0: file name, 1: message segment +compiler.misc.bad.source.file.header=Ung\u00FCltige Quelldatei: {0}\n{1}\nEntfernen Sie die Datei, oder stellen Sie sicher, dass sie im richtigen Unterverzeichnis des Quellpfades vorhanden ist. + +## The following are all possible strings for the second argument ({1}) of the +## above strings. +compiler.misc.bad.class.signature=Ung\u00FCltige Klassensignatur: {0} + +#0: symbol, 1: symbol +compiler.misc.bad.enclosing.class=Ung\u00FCltige einschlie\u00DFende Klasse f\u00FCr {0}: {1} + +# 0: symbol +compiler.misc.bad.enclosing.method=Ung\u00FCltiges einschlie\u00DFendes Methodenattribut f\u00FCr Klasse {0} + +compiler.misc.bad.runtime.invisible.param.annotations=Ung\u00FCltiges RuntimeInvisibleParameterAnnotations-Attribut: {0} + +compiler.misc.bad.const.pool.tag=Ung\u00FCltiges Konstantenpooltag: {0} + +compiler.misc.bad.const.pool.tag.at=Ung\u00FCltiges Konstantenpooltag {0} bei {1} + +compiler.misc.unexpected.const.pool.tag.at=Unerwartetes Konstantenpooltag {0} bei {1} + +compiler.misc.bad.signature=Ung\u00FCltige Signatur: {0} + +compiler.misc.bad.type.annotation.value=Ung\u00FCltiger Typ f\u00FCr Annotationszielwert: {0} + +compiler.misc.bad.module-info.name=Ung\u00FCltiger Klassenname + +compiler.misc.class.file.wrong.class=Klassendatei enth\u00E4lt falsche Klasse: {0} + +compiler.misc.module.info.invalid.super.class=module-info mit ung\u00FCltiger Superklasse + +# 0: name +compiler.misc.class.file.not.found=Klassendatei f\u00FCr {0} nicht gefunden + +# 0: string (constant value), 1: symbol (constant field), 2: type (field type) +compiler.misc.bad.constant.range=Konstantenwert "{0}" f\u00FCr {1} liegt au\u00DFerhalb des erwarteten Bereichs f\u00FCr {2} + +# 0: string (constant value), 1: symbol (constant field), 2: string (expected class) +compiler.misc.bad.constant.value=Ung\u00FCltiger Konstantenwert "{0}" f\u00FCr {1}. {2} erwartet + +# 0: type (field type) +compiler.misc.bad.constant.value.type=Variable des Typs "{0}" darf keinen Konstantenwert aufweisen, aber es wurde einer f\u00FCr sie angegeben + +# 0: string (classfile major version), 1: string (classfile minor version) +compiler.misc.invalid.default.interface=Standardmethode in Klassendatei der Version {0}.{1} gefunden + +# 0: string (classfile major version), 1: string (classfile minor version) +compiler.misc.invalid.static.interface=Statische Methode in Klassendatei der Version {0}.{1} gefunden + +# 0: string (classfile major version), 1: string (classfile minor version) +compiler.misc.anachronistic.module.info=Moduldeklaration in Klassendatei der Version {0}.{1} gefunden + +compiler.misc.module.info.definition.expected=module-info-Definition erwartet + +# 0: name +compiler.misc.file.doesnt.contain.class=Datei enth\u00E4lt nicht Klasse {0} + +# 0: symbol +compiler.misc.file.does.not.contain.package=Datei enth\u00E4lt nicht Package {0} + +compiler.misc.file.does.not.contain.module=Datei enth\u00E4lt keine Moduldeklaration + +compiler.misc.illegal.start.of.class.file=Unzul\u00E4ssiger Klassendateibeginn + +# 0: name +compiler.misc.method.descriptor.invalid=Methodendeskriptor ung\u00FCltig f\u00FCr {0} + +compiler.misc.unable.to.access.file=Zugriff auf Datei nicht m\u00F6glich: {0} + +compiler.misc.unicode.str.not.supported=Unicode-Zeichenfolge wird in Klassendatei nicht unterst\u00FCtzt + +compiler.misc.undecl.type.var=Nicht deklarierte Typvariable: {0} + +compiler.misc.malformed.vararg.method=Klassendatei enth\u00E4lt nicht wohlgeformte Methode mit variabler Argumentanzahl: {0} + +compiler.misc.wrong.version=Klassendatei hat die falsche Version {0}.{1}. Sie muss {2}.{3} lauten + +##### + +# 0: type, 1: type or symbol +compiler.err.not.within.bounds=Typargument {0} liegt nicht innerhalb des g\u00FCltigen Bereichs von Typvariable {1} + +## The following are all possible strings for the second argument ({1}) of the +## above string. + +## none yet... + +##### + +# 0: message segment +compiler.err.prob.found.req=Inkompatible Typen: {0} + +# 0: message segment +compiler.misc.prob.found.req=Inkompatible Typen: {0} + +# 0: message segment, 1: type, 2: type +compiler.warn.prob.found.req={0}\nErforderlich: {2}\nErmittelt: {1} + +# 0: type, 1: type +compiler.misc.inconvertible.types={0} kann nicht in {1} konvertiert werden + +# 0: type, 1: type +compiler.misc.possible.loss.of.precision=M\u00F6glicher Verlust bei Konvertierung von {0} in {1} + +compiler.misc.unchecked.assign=Nicht gepr\u00FCfte Konvertierung + +# compiler.misc.storecheck=\ +# assignment might cause later store checks to fail +# compiler.misc.unchecked=\ +# assigned array cannot dynamically check its stores +compiler.misc.unchecked.cast.to.type=Nicht gepr\u00FCftes Casting + +# compiler.err.star.expected=\ +# ''*'' expected +# compiler.err.no.elem.type=\ +# \[\*\] cannot have a type + +# 0: message segment +compiler.misc.try.not.applicable.to.type=try-with-resources nicht auf Variablentyp anwendbar\n({0}) + +##### + +# 0: object, 1: message segment +compiler.err.type.found.req=Unerwarteter Typ\nErforderlich: {1}\nErmittelt: {0} + +## The following are all possible strings for the first argument ({0}) of the +## above string. +compiler.misc.type.req.class=Klasse + +compiler.misc.type.req.class.array=Klasse oder Array + +compiler.misc.type.req.array.or.iterable=Array oder java.lang.Iterable + +compiler.misc.type.req.ref=Referenz + +compiler.misc.type.req.exact=Klasse oder Schnittstelle ohne Grenzwerte + +# 0: type +compiler.misc.type.parameter=Typparameter {0} + +##### + +## The following are all possible strings for the last argument of all those +## diagnostics whose key ends in ".1" + +# 0: type, 1: list of type +compiler.misc.no.unique.maximal.instance.exists=Keine eindeutige maximale Instanz f\u00FCr Typvariable {0} mit oberen Grenzwerten {1} vorhanden + +# 0: type, 1: list of type +compiler.misc.no.unique.minimal.instance.exists=Keine eindeutige minimale Instanz f\u00FCr Typvariable {0} mit unteren Grenzwerten {1} vorhanden + +# 0: type, 1: list of type +compiler.misc.incompatible.upper.bounds=Inferenzvariable {0} hat inkompatible obere Grenzwerte {1} + +# 0: type, 1: list of type +compiler.misc.incompatible.eq.bounds=Inferenzvariable {0} hat inkompatible Gleichheits-Constraints {1} + +# 0: type, 1: fragment, 2: fragment +compiler.misc.incompatible.bounds=Inferenzvariable {0} hat inkompatible Grenzwerte\n{1}\n{2} + +# 0: list of type +compiler.misc.lower.bounds=Untere Grenzwerte: {0} + +# 0: list of type +compiler.misc.eq.bounds=Gleichheits-Constraints: {0} + +# 0: list of type +compiler.misc.upper.bounds=Untere Grenzwerte: {0} + +# 0: list of type, 1: type, 2: type +compiler.misc.infer.no.conforming.instance.exists=Keine Instanzen von Typvariablen {0} vorhanden, sodass {1} {2} entspricht + +# 0: list of type, 1: message segment +compiler.misc.infer.no.conforming.assignment.exists=Typvariable(n) {0} nicht ableitbar\n(nicht \u00FCbereinstimmende Argumente; {1}) + +# 0: list of type +compiler.misc.infer.arg.length.mismatch=Typvariable(n) {0} nicht ableitbar\n(Liste der tats\u00E4chlichen Argumente hat eine andere L\u00E4nge als die der formalen Argumente) + +# 0: list of type, 1: message segment +compiler.misc.infer.varargs.argument.mismatch=Typvariable(n) {0} nicht ableitbar\n(nicht \u00FCbereinstimmende varargs, {1}) + +# 0: type, 1: list of type +compiler.misc.inferred.do.not.conform.to.upper.bounds=Abgeleiteter Typ entspricht nicht den oberen Grenzwerten\nAbgeleitet: {0}\nObere Grenzwerte: {1} + +# 0: type, 1: list of type +compiler.misc.inferred.do.not.conform.to.lower.bounds=Abgeleiteter Typ entspricht nicht den unteren Grenzwerten\nAbgeleitet: {0}\nUntere Grenzwerte: {1} + +# 0: type, 1: list of type +compiler.misc.inferred.do.not.conform.to.eq.bounds=Abgeleiteter Typ entspricht nicht den Gleichheits-Constraints\nAbgeleitet: {0}\nGleichheits-Constraint(s): {1} + +# 0: symbol +compiler.misc.diamond={0}<> + +# 0: type +compiler.misc.diamond.non.generic="<>" kann nicht mit der nicht generischen Klasse {0} verwendet werden + +# 0: list of type, 1: message segment +compiler.misc.diamond.invalid.arg=Typargument {0}, das f\u00FCr {1} abgeleitet wurde, ist in diesem Kontext nicht zul\u00E4ssig\nDas abgeleitete Argument kann nicht im Signaturattribut ausgedr\u00FCckt werden + +# 0: list of type, 1: message segment +compiler.misc.diamond.invalid.args=Typargumente {0}, die f\u00FCr {1} abgeleitet wurden, sind in diesem Kontext nicht zul\u00E4ssig\nAbgeleitete Argumente k\u00F6nnen nicht im Signaturattribut ausgedr\u00FCckt werden + +# 0: type +compiler.misc.diamond.and.explicit.params="<>" kann nicht mit expliziten Typparametern f\u00FCr Konstruktor verwendet werden + +compiler.misc.mref.infer.and.explicit.params=Raw-Konstruktorreferenz kann nicht mit expliziten Typparametern f\u00FCr Konstruktor verwendet werden + +# 0: type, 1: list of type +compiler.misc.explicit.param.do.not.conform.to.bounds=Explizites Typargument {0} entspricht nicht den deklarierten Grenzwerten {1} + +compiler.misc.arg.length.mismatch=Liste der tats\u00E4chlichen Argumente hat eine andere L\u00E4nge als die der formalen Argumente + +# 0: string +compiler.misc.wrong.number.type.args=Falsche Anzahl Typargumente. {0} erforderlich + +# 0: message segment +compiler.misc.no.conforming.assignment.exists=Keine \u00FCbereinstimmenden Argumente, {0} + +# 0: message segment +compiler.misc.varargs.argument.mismatch=Keine \u00FCbereinstimmenden varargs; {0} + +##### + +# 0: symbol or type, 1: file name +compiler.warn.auxiliary.class.accessed.from.outside.of.its.source.file=Auf Auxiliary-Klasse {0} in {1} darf nicht von au\u00DFerhalb der eigenen Quelldatei zugegriffen werden + +## The first argument ({0}) is a "kindname". +# 0: kind name, 1: symbol, 2: symbol +compiler.err.abstract.cant.be.accessed.directly={0} {1} in {2} ist abstrakt und kann nicht direkt aufgerufen werden + +## The first argument ({0}) is a "kindname". +# 0: symbol kind, 1: symbol +compiler.err.non-static.cant.be.ref={0} {1} ist nicht statisch und kann nicht aus einem statischen Kontext referenziert werden + +# 0: symbol kind, 1: symbol +compiler.misc.bad.static.method.in.unbound.lookup=Unerwartete statische {0} {1} in ungebundenem Lookup gefunden + +# 0: symbol kind, 1: symbol +compiler.misc.bad.instance.method.in.unbound.lookup=Unerwartete Instanz {0} {1} in ungebundenem Lookup gefunden + +# 0: symbol kind, 1: symbol +compiler.misc.bad.static.method.in.bound.lookup=Unerwartete statische {0} {1} in gebundenem Lookup gefunden + +## Both arguments ({0}, {1}) are "kindname"s. {0} is a comma-separated list +## of kindnames (the list should be identical to that provided in source. +# 0: set of kind name, 1: set of kind name +compiler.err.unexpected.type=Unerwarteter Typ\nErforderlich: {0}\nErmittelt: {1} + +compiler.err.unexpected.lambda=Hier wird kein Lambda-Ausdruck erwartet + +compiler.err.unexpected.mref=Hier wird keine Methodenreferenz erwartet + +## The first argument {0} is a "kindname" (e.g. 'constructor', 'field', etc.) +## The second argument {1} is the non-resolved symbol +## The third argument {2} is a list of type parameters (non-empty if {1} is a method) +## The fourth argument {3} is a list of argument types (non-empty if {1} is a method) +# 0: kind name, 1: name, 2: unused, 3: unused +compiler.err.cant.resolve=Symbol nicht gefunden\nSymbol: {0} {1} + +# 0: kind name, 1: name, 2: unused, 3: list of type +compiler.err.cant.resolve.args=Symbol nicht gefunden\nSymbol: {0} {1}({3}) + +# 0: kind name, 1: name, 2: unused, 3: list of type +compiler.misc.cant.resolve.args=Symbol nicht gefunden\nSymbol: {0} {1}({3}) + +# 0: kind name, 1: name, 2: list of type, 3: list of type +compiler.err.cant.resolve.args.params=Symbol nicht gefunden\nSymbol: {0} <{2}>{1}({3}) + +## arguments from {0} to {3} have the same meaning as above +## The fifth argument {4} is a location subdiagnostic (see below) +# 0: kind name, 1: name, 2: unused, 3: unused, 4: message segment +compiler.err.cant.resolve.location=Symbol nicht gefunden\nSymbol: {0} {1}\nOrt: {4} + +# 0: kind name, 1: name, 2: unused, 3: list of type, 4: message segment +compiler.err.cant.resolve.location.args=Symbol nicht gefunden\nSymbol: {0} {1}({3})\nOrt: {4} + +# 0: kind name, 1: name, 2: list of type, 3: list, 4: message segment +compiler.err.cant.resolve.location.args.params=Symbol nicht gefunden\nSymbol: {0} <{2}>{1}({3})\nOrt: {4} + +### Following are replicated/used for method reference diagnostics + +# 0: kind name, 1: name, 2: unused, 3: list of type, 4: message segment +compiler.misc.cant.resolve.location.args=Symbol nicht gefunden\nSymbol: {0} {1}({3})\nOrt: {4} + +# 0: kind name, 1: name, 2: list of type, 3: list, 4: message segment +compiler.misc.cant.resolve.location.args.params=Symbol nicht gefunden\nSymbol: {0} <{2}>{1}({3})\nOrt: {4} + +##a location subdiagnostic is composed as follows: +## The first argument {0} is the location "kindname" (e.g. 'constructor', 'field', etc.) +## The second argument {1} is the location name +## The third argument {2} is the location type (only when {1} is a variable name) + +# 0: kind name, 1: type or symbol, 2: unused +compiler.misc.location={0} {1} + +# 0: kind name, 1: symbol, 2: type +compiler.misc.location.1={0} {1} von Typ {2} + +## The following are all possible string for "kindname". +## They should be called whatever the JLS calls them after it been translated +## to the appropriate language. +# compiler.misc.kindname.constructor=\ +# static member +compiler.misc.kindname.annotation=@interface + +compiler.misc.kindname.constructor=Konstruktor + +compiler.misc.kindname.enum=Enumeration + +compiler.misc.kindname.interface=Schnittstelle + +compiler.misc.kindname.static=statisch + +compiler.misc.kindname.type.variable=Typvariable + +compiler.misc.kindname.type.variable.bound=Grenzwert von Typvariable + +compiler.misc.kindname.variable=Variable + +compiler.misc.kindname.value=Wert + +compiler.misc.kindname.method=Methode + +compiler.misc.kindname.class=Klasse + +compiler.misc.kindname.package=Package + +compiler.misc.kindname.module=Modul + +compiler.misc.kindname.static.init=statischer Initializer + +compiler.misc.kindname.instance.init=Instanz-Initializer + +compiler.misc.kindname.record.component=Datensatzkomponente + +compiler.misc.kindname.record=Datensatz + +##### + +compiler.misc.no.args=keine Argumente + +# 0: message segment +compiler.err.override.static={0}\nAu\u00DFer Kraft setzende Methode ist statisch + +# 0: message segment, 1: set of flag +compiler.err.override.meth={0}\nAu\u00DFer Kraft gesetzte Methode ist {1} + +# 0: message segment, 1: type +compiler.err.override.meth.doesnt.throw={0}\nAu\u00DFer Kraft gesetzte Methode l\u00F6st nicht {1} aus + +# In the following string {1} is a space separated list of Java Keywords, as +# they would have been declared in the source code +# 0: message segment, 1: set of flag or string +compiler.err.override.weaker.access={0}\nVersuch, niedrigere Zugriffsberechtigungen zuzuweisen. War {1} + +# 0: message segment, 1: type, 2: type +compiler.err.override.incompatible.ret={0}\nR\u00FCckgabetyp {1} ist nicht mit {2} kompatibel + +# 0: message segment, 1: type, 2: type +compiler.warn.override.unchecked.ret={0}\nR\u00FCckgabetyp erfordert eine nicht gepr\u00FCfte Konvertierung von {1} in {2} + +# 0: message segment, 1: type +compiler.warn.override.unchecked.thrown={0}\nAu\u00DFer Kraft gesetzte Methode l\u00F6st nicht {1} aus + +# 0: symbol +compiler.warn.override.equals.but.not.hashcode=Klasse {0} setzt Gleichwertige au\u00DFer Kraft. hashCode-Methode wird aber weder von der Klasse noch einer Superklasse au\u00DFer Kraft gesetzt + +## The following are all possible strings for the first argument ({0}) of the +## above strings. +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.misc.cant.override={0} in {1} kann nicht {2} in {3} au\u00DFer Kraft setzen + +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.misc.cant.hide={0} in {1} kann nicht {2} in {3} ausblenden + +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.misc.cant.implement={0} in {1} kann nicht {2} in {3} implementieren + +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.misc.clashes.with={0} in {1} steht mit {2} in {3} in Konflikt + +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.misc.unchecked.override={0} in {1} setzt {2} in {3} au\u00DFer Kraft + +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.misc.unchecked.implement={0} in {1} implementiert {2} in {3} + +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.misc.unchecked.clash.with={0} in {1} setzt {2} in {3} au\u00DFer Kraft + +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.misc.varargs.override={0} in {1} setzt {2} in {3} au\u00DFer Kraft + +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.misc.varargs.implement={0} in {1} implementiert {2} in {3} + +# 0: symbol, 1: symbol, 2: symbol, 3: symbol +compiler.misc.varargs.clash.with={0} in {1} setzt {2} in {3} au\u00DFer Kraft + +# 0: kind name, 1: symbol, 2: symbol, 3: message segment +compiler.misc.inapplicable.method={0} {1}.{2} ist nicht anwendbar\n({3}) + +######################################## +# Diagnostics for language feature changes. +# Such diagnostics have a common template which can be customized by using a feature +# diagnostic fragment (one of those given below). +######################################## + +# 0: message segment (feature), 1: string (found version), 2: string (expected version) +compiler.err.feature.not.supported.in.source={0} wird in -source {1} nicht unterst\u00FCtzt\n(Verwenden Sie -source {2} oder h\u00F6her, um {0} zu aktivieren) + +# 0: message segment (feature), 1: string (found version), 2: string (expected version) +compiler.err.feature.not.supported.in.source.plural={0} werden in -source {1} nicht unterst\u00FCtzt\n(Verwenden Sie -source {2} oder h\u00F6her, um {0} zu aktivieren) + +# 0: message segment (feature), 1: string (found version), 2: string (expected version) +compiler.misc.feature.not.supported.in.source={0} wird in -source {1} nicht unterst\u00FCtzt\n(Verwenden Sie -source {2} oder h\u00F6her, um {0} zu aktivieren) + +# 0: message segment (feature), 1: string (found version), 2: string (expected version) +compiler.misc.feature.not.supported.in.source.plural={0} werden in -source {1} nicht unterst\u00FCtzt\n(Verwenden Sie -source {2} oder h\u00F6her, um {0} zu aktivieren) + +# 0: message segment (feature) +compiler.err.preview.feature.disabled={0} ist ein Vorschaufeature, das standardm\u00E4\u00DFig deaktiviert ist.\n(Verwenden Sie --enable-preview, um {0} zu aktivieren) + +# 0: message segment (feature) +compiler.err.preview.feature.disabled.plural={0} sind ein Vorschaufeature, das standardm\u00E4\u00DFig deaktiviert ist.\n(Verwenden Sie --enable-preview, um {0} zu aktivieren) + +# 0: file object (classfile), 1: string (expected version) +compiler.err.preview.feature.disabled.classfile=Klassendatei f\u00FCr {0} verwendet Vorschaufeatures von Java SE {1}.\n(Verwenden Sie --enable-preview, um das Laden von Klassendateien mit Vorschaufeatures zu erm\u00F6glichen) + +# 0: message segment (feature) +compiler.warn.preview.feature.use={0} ist ein Vorschaufeature, das in einem zuk\u00FCnftigen Release entfernt werden kann. + +# 0: message segment (feature) +compiler.warn.preview.feature.use.plural={0} sind ein Vorschaufeature, das in einem zuk\u00FCnftigen Release entfernt werden kann. + +# 0: file object (classfile), 1: string (expected version) +compiler.warn.preview.feature.use.classfile=Klassendatei f\u00FCr {0} verwendet Vorschaufeatures von Java SE {1}. + + +compiler.misc.feature.modules=Module + +compiler.misc.feature.diamond.and.anon.class="<>" mit anonymen inneren Klassen + +compiler.misc.feature.var.in.try.with.resources=Variablen in try-with-resources + +compiler.misc.feature.type.annotations=Typannotationen + +compiler.misc.feature.annotations.after.type.params=Annotationen nach Methodentypparametern + +compiler.misc.feature.repeatable.annotations=Wiederholte Annotationen + +compiler.misc.feature.diamond=Rautenoperator + +compiler.misc.feature.lambda=Lambda-Ausdr\u00FCcke + +compiler.misc.feature.method.references=Methodenreferenzen + +compiler.misc.feature.default.methods=Standardmethoden + +compiler.misc.feature.intersection.types.in.cast=Schnittmengentypen + +compiler.misc.feature.static.intf.methods=Statische Schnittstellenmethoden + +compiler.misc.feature.static.intf.method.invoke=Aufrufe statischer Schnittstellenmethoden + +compiler.misc.feature.private.intf.methods=Private Schnittstellenmethoden + +compiler.misc.feature.text.blocks=Textbl\u00F6cke + +compiler.misc.feature.multiple.case.labels=Mehrere CASE-Labels + +compiler.misc.feature.switch.rules=Switch-Regeln + +compiler.misc.feature.switch.expressions=Switch-Ausdr\u00FCcke + +compiler.misc.feature.var.syntax.in.implicit.lambda=var-Syntax in impliziten Lambdas + +compiler.misc.feature.pattern.matching.instanceof=Musterabgleich in instanceof + +compiler.misc.feature.reifiable.types.instanceof=Reifizierbare Typen in instanceof + +compiler.misc.feature.records=Datens\u00E4tze + +compiler.misc.feature.sealed.classes=Verschl\u00FCsselte Klassen + +compiler.misc.feature.case.null=Null in Switch Cases + +compiler.misc.feature.pattern.switch=Muster in Switch-Anweisungen + +compiler.warn.underscore.as.identifier=Ab Release 9 ist "_" ein Schl\u00FCsselwort und kann nicht als ID verwendet werden + +compiler.err.underscore.as.identifier=Ab Release 9 ist "_" ein Schl\u00FCsselwort und kann nicht als ID verwendet werden + +compiler.err.underscore.as.identifier.in.lambda="_" als ID verwendet\n("_" darf nicht als ID f\u00FCr Lambda-Parameter verwendet werden) + +compiler.err.enum.as.identifier=Ab Release 5 ist "enum" ein Schl\u00FCsselwort und kann nicht als ID verwendet werden + +compiler.err.assert.as.identifier=Ab Release 1.4 ist "assert" ein Schl\u00FCsselwort und kann nicht als ID verwendet werden + +# TODO 308: make a better error message +compiler.err.this.as.identifier=Ab Release 8 ist "this" nur als Parametername f\u00FCr den Empf\u00E4ngertyp zul\u00E4ssig.\nDas muss der erste Parameter sein und darf kein Lambda-Parameter sein + +compiler.err.receiver.parameter.not.applicable.constructor.toplevel.class=receiver-Parameter nicht f\u00FCr Konstruktor der obersten Klasse anwendbar + +# TODO 308: make a better error message +# 0: annotation +compiler.err.cant.type.annotate.scoping.1=Scoping-Konstrukt kann nicht mit type-use-Annotation versehen werden: {0} + +# TODO 308: make a better error message +# 0: list of annotation +compiler.err.cant.type.annotate.scoping=Scoping-Konstrukt kann nicht mit type-use-Annotationen versehen werden: {0} + +# 0: type, 1: type +compiler.err.incorrect.receiver.name=Der Empf\u00E4ngername stimmt nicht mit dem einschlie\u00DFenden Klassentyp \u00FCberein\nErforderlich: {0}\nErmittelt: {1} + +# 0: type, 1: type +compiler.err.incorrect.receiver.type=Der Empf\u00E4ngertyp stimmt nicht mit dem einschlie\u00DFenden Klassentyp \u00FCberein\nErforderlich: {0}\nErmittelt: {1} + +# 0: type, 1: type +compiler.err.incorrect.constructor.receiver.type=Der Empf\u00E4ngertyp stimmt nicht mit dem einschlie\u00DFenden \u00E4u\u00DFeren Klassentyp \u00FCberein\nErforderlich: {0}\nErmittelt: {1} + +# 0: type, 1: type +compiler.err.incorrect.constructor.receiver.name=Der Empf\u00E4ngername stimmt nicht mit dem einschlie\u00DFenden \u00E4u\u00DFeren Klassentyp \u00FCberein\nErforderlich: {0}\nErmittelt: {1} + +compiler.err.no.annotations.on.dot.class=Keine Annotationen im Typ eines Klassenliterals zul\u00E4ssig + +######################################## +# Diagnostics for verbose resolution +# used by Resolve (debug only) +######################################## + +# 0: number, 1: symbol, 2: unused +compiler.misc.applicable.method.found=#{0} anwendbare Methode gefunden: {1} + +# 0: number, 1: symbol, 2: message segment +compiler.misc.applicable.method.found.1=#{0} anwendbare Methode gefunden: {1}\n({2}) + +# 0: number, 1: symbol, 2: message segment +compiler.misc.not.applicable.method.found=#{0} nicht anwendbare Methode gefunden: {1}\n({2}) + +# 0: type +compiler.misc.partial.inst.sig=Teilweise instanziiert in: {0} + +# 0: name, 1: symbol, 2: number, 3: string (method resolution phase), 4: list of type or message segment, 5: list of type or message segment +compiler.note.verbose.resolve.multi=Methode {0} wird in Typ {1} als Kandidat {2} aufgel\u00F6st\nPhase: {3}\nMit Istwerten: {4}\nMit type-args: {5}\nKandidaten: + +# 0: name, 1: symbol, 2: unused, 3: string (method resolution phase), 4: list of type or message segment, 5: list of type or message segment +compiler.note.verbose.resolve.multi.1=Fehlerhafte Aufl\u00F6sung f\u00FCr Methode {0} in Typ {1}\nPhase: {3}\nMit Istwerten: {4}\nMit type-args: {5}\nKandidaten: + +# 0: symbol, 1: type, 2: type +compiler.note.deferred.method.inst=Instanziierung von Methode {0} verz\u00F6gert\nInstanziierte Signatur: {1}\ntarget-type: {2} + +######################################## +# Diagnostics for lambda deduplication +# used by LambdaToMethod (debug only) +######################################## + +# 0: symbol +compiler.note.verbose.l2m.deduplicate=Lambda-Implementierungsmethode {0} wird dedupliziert + +######################################## +# Diagnostics for method reference search +# results used by Resolve (debug only) +######################################## + +# 0: fragment, 1: string, 2: number +compiler.note.method.ref.search.results.multi={0} Suchergebnisse f\u00FCr {1}, mit spezifischsten {2}\nAnwendbare Kandidaten: + +# 0: number, 1: fragment, 2: symbol +compiler.misc.applicable.method.found.2=#{0} anwendbare Methode gefunden: {1} {2} + +# 0: number, 1: fragment, 2: symbol, 3: message segment +compiler.misc.applicable.method.found.3=#{0} anwendbare Methode gefunden: {1} {2}\n({3}) + +compiler.misc.static=statisch + +compiler.misc.non.static=nicht statisch + +compiler.misc.bound=gebunden + +compiler.misc.unbound=ungebunden + +######################################## +# Diagnostics for where clause implementation +# used by the RichDiagnosticFormatter. +######################################## + +compiler.misc.type.null= + +# X#n (where n is an int id) is disambiguated tvar name +# 0: name, 1: number +compiler.misc.type.var={0}#{1} + +# CAP#n (where n is an int id) is an abbreviation for 'captured type' +# 0: number +compiler.misc.captured.type=CAP#{0} + +# (where n is an int id) is an abbreviation for 'intersection type' +# 0: number +compiler.misc.intersection.type=INT#{0} + +# where clause for captured type: contains upper ('extends {1}') and lower +# ('super {2}') bound along with the wildcard that generated this captured type ({3}) +# 0: type, 1: type, 2: type, 3: type +compiler.misc.where.captured={0} erweitert {1} Super: {2} aus Erfassung von {3} + +# compact where clause for captured type: contains upper ('extends {1}') along +# with the wildcard that generated this captured type ({3}) +# 0: type, 1: type, 2: unused, 3: type +compiler.misc.where.captured.1={0} erweitert {1} aus Erfassung von {3} + +# where clause for type variable: contains upper bound(s) ('extends {1}') along with +# the kindname ({2}) and location ({3}) in which the typevar has been declared +# 0: type, 1: list of type, 2: symbol kind, 3: symbol +compiler.misc.where.typevar={0} erweitert {1}, deklariert in {2} {3} + +# compact where clause for type variable: contains the kindname ({2}) and location ({3}) +# in which the typevar has been declared +# 0: type, 1: list of type, 2: symbol kind, 3: symbol +compiler.misc.where.typevar.1={0} deklariert in {2} {3} + +# where clause for fresh type variable: contains upper bound(s) ('extends {1}'). +# Since a fresh type-variable is synthetic - there's no location/kindname here. +# 0: type, 1: list of type +compiler.misc.where.fresh.typevar={0} erweitert {1} + +# where clause for type variable: contains all the upper bound(s) ('extends {1}') +# of this intersection type +# 0: type, 1: list of type +compiler.misc.where.intersection={0} erweitert {1} + +### Where clause headers ### +compiler.misc.where.description.captured=Dabei ist {0} eine neue Typvariable: + +# 0: set of type +compiler.misc.where.description.typevar=Dabei ist {0} eine Typvariable: + +# 0: set of type +compiler.misc.where.description.intersection=Dabei ist {0} ein Schnittmengentyp: + +# 0: set of type +compiler.misc.where.description.captured.1=Dabei sind {0} neue Typvariablen: + +# 0: set of type +compiler.misc.where.description.typevar.1=Dabei sind {0} Typvariablen: + +# 0: set of type +compiler.misc.where.description.intersection.1=Dabei sind {0} Schnittmengentypen: + +### +# errors related to doc comments + +compiler.err.dc.bad.entity=Ung\u00FCltige HTML-Entity + +compiler.err.dc.bad.inline.tag=Falsche Verwendung von Inlinetag + +compiler.err.dc.identifier.expected=ID erwartet + +compiler.err.dc.malformed.html=Nicht wohlgeformte HTML + +compiler.err.dc.missing.semicolon=Semikolon fehlt + +compiler.err.dc.no.content=kein Inhalt + +compiler.err.dc.no.tag.name=Kein Tagname nach "@" + +compiler.err.dc.gt.expected=">" erwartet + +compiler.err.dc.ref.bad.parens=Unerwarteter Text nach Klammer + +compiler.err.dc.ref.syntax.error=Syntaxfehler in Referenz + +compiler.err.dc.ref.unexpected.input=Unerwarteter Text + +compiler.err.dc.unexpected.content=Unerwarteter Inhalt + +compiler.err.dc.unterminated.inline.tag=Nicht abgeschlossenes Inlinetag + +compiler.err.dc.unterminated.signature=Nicht abgeschlossene Signatur + +compiler.err.dc.unterminated.string=Nicht abgeschlossene Zeichenfolge + +compiler.err.dc.ref.annotations.not.allowed=Annotationen nicht zul\u00E4ssig + +### +# errors related to modules + +compiler.err.expected.module="module" erwartet + +# 0: symbol +compiler.err.module.not.found=Modul nicht gefunden: {0} + +# 0: symbol +compiler.warn.module.not.found=Modul nicht gefunden: {0} + +compiler.err.too.many.modules=Zu viele Moduldeklarationen gefunden + +compiler.err.module.not.found.on.module.source.path=Modul nicht in Modulquellpfad gefunden + +compiler.err.not.in.module.on.module.source.path=Nicht in einem Modul im Modulquellpfad + +# 0: symbol +compiler.err.duplicate.module=Doppeltes Modul: {0} + +# 0: symbol +compiler.err.duplicate.requires=Doppelte "requires": {0} + +# 0: symbol +compiler.err.conflicting.exports=Doppelte oder unvereinbare Exporte: {0} + +# 0: symbol +compiler.err.conflicting.opens=Doppelte oder unvereinbare "opens": {0} + +# 0: symbol +compiler.err.conflicting.exports.to.module=Doppelte oder unvereinbare Exporte in Modul: {0} + +# 0: symbol +compiler.err.conflicting.opens.to.module=Doppelte oder unvereinbare "opens" in Modul: {0} + +compiler.err.no.opens.unless.strong="opens" nur in starken Modulen zul\u00E4ssig + +# 0: symbol +compiler.err.repeated.provides.for.service=Mehrere "provides" f\u00FCr Service {0} + +# 0: symbol, 1: symbol +compiler.err.duplicate.provides=Doppelte "provides": Service {0}, Implementierung {1} + +# 0: symbol +compiler.err.duplicate.uses=Doppelte Verwendungen: {0} + +# 0: symbol +compiler.err.service.implementation.is.abstract=Die Serviceimplementierung ist eine abstrakte Klasse: {0} + +compiler.err.service.implementation.must.be.subtype.of.service.interface=Der Serviceimplementierungstyp muss ein Subtyp des Serviceschnittstellentyps sein oder eine \u00F6ffentliche statische no-args-Methode namens "provider" aufweisen, die die Serviceimplementierung zur\u00FCckgibt + +compiler.err.service.implementation.provider.return.must.be.subtype.of.service.interface=Der R\u00FCckgabetyp der "provider"-Methode muss ein Subtyp des Serviceschnittstellentyps sein + +# 0: symbol +compiler.err.service.implementation.is.inner=Die Serviceimplementierung ist eine innere Klasse: {0} + +# 0: symbol +compiler.err.service.definition.is.enum=Die Servicedefinition ist eine Enumeration: {0} + +# 0: symbol +compiler.err.service.implementation.doesnt.have.a.no.args.constructor=Die Serviceimplementierung hat keinen Standardkonstruktor: {0} + +# 0: symbol +compiler.err.service.implementation.no.args.constructor.not.public=Der "no arguments"-Konstruktor der Serviceimplementierung ist nicht \u00F6ffentlich: {0} + +# 0: symbol +compiler.err.package.empty.or.not.found=Package ist leer oder nicht vorhanden: {0} + +# 0: symbol +compiler.warn.package.empty.or.not.found=Package ist leer oder nicht vorhanden: {0} + +compiler.err.no.output.dir=Kein Klassenausgabeverzeichnis angegeben + +compiler.err.unnamed.pkg.not.allowed.named.modules=Unbenanntes Package ist in benannten Modulen nicht zul\u00E4ssig + +# 0: name, 1: name +compiler.err.module.name.mismatch=Modulname {0} stimmt nicht mit dem erwarteten Namen {1} \u00FCberein + +# 0: name, 1: name +compiler.misc.module.name.mismatch=Modulname {0} stimmt nicht mit dem erwarteten Namen {1} \u00FCberein + +# 0: name +compiler.err.module.non.zero.opens=Bei ge\u00F6ffnetem Modul {0} ist opens_count ungleich Null + +# 0: name +compiler.misc.module.non.zero.opens=Bei ge\u00F6ffnetem Modul {0} ist opens_count ungleich Null + +compiler.err.module.decl.sb.in.module-info.java=Moduldeklarationen m\u00FCssen in einer Datei namens module-info.java vorhanden sein + +# 0: set of string +compiler.err.too.many.patched.modules=Zu viele gepatchte Module ({0}). Verwenden Sie --module-source-path + +# 0: name, 1: name +compiler.err.file.patched.and.msp=Datei sowohl von --patch-module als auch von --module-source-path zug\u00E4nglich, geh\u00F6rt aber in jedem Pfad zu einem anderen Modul: {0}, {1} + +compiler.err.processorpath.no.processormodulepath=Unzul\u00E4ssige Kombination aus -processorpath und --processor-module-path + +# 0: symbol +compiler.err.package.in.other.module=Package ist in einem anderen Modul vorhanden: {0} + +# 0: symbol, 1: name, 2: symbol, 3: symbol +compiler.err.package.clash.from.requires=Modul {0} liest Package {1} sowohl aus {2} als auch aus {3} + +# 0: name, 1: symbol, 2: symbol +compiler.err.package.clash.from.requires.in.unnamed=Das unbenannte Modul liest Package {0} sowohl aus {1} als auch aus {2} + +# 0: string +compiler.err.module.not.found.in.module.source.path=Modul {0} nicht in Modulquellpfad gefunden + +compiler.err.output.dir.must.be.specified.with.dash.m.option=Klassenausgabeverzeichnis muss angegeben werden, wenn die Option -m verwendet wird + +compiler.err.modulesourcepath.must.be.specified.with.dash.m.option=Modulquellpfad muss angegeben werden, wenn die Option -m verwendet wird + +# 0: symbol +compiler.err.service.implementation.not.in.right.module=Serviceimplementierung muss in demselben Modul wie die provides-Direktive definiert werden + +# 0: symbol +compiler.err.cyclic.requires=Zyklische Abh\u00E4ngigkeit mit {0} + +# 0: fragment, 1: name +compiler.err.duplicate.module.on.path=Doppeltes Modul in {0}\nModul in {1} + +# 0: option name, 1: string +compiler.warn.bad.name.for.option=Ung\u00FCltiger Name im Wert f\u00FCr {0}-Option: "{1}" + +# 0: option name, 1: string +compiler.err.bad.name.for.option=Ung\u00FCltiger Name im Wert f\u00FCr {0}-Option: "{1}" + +# 0: option name, 1: symbol +compiler.warn.module.for.option.not.found=Modulname in {0}-Option nicht gefunden: {1} + +compiler.err.addmods.all.module.path.invalid=--add-modules ALL-MODULE-PATH kann nur beim Kompilieren des unbenannten Moduls oder beim Kompilieren im Kontext eines automatischen Moduls verwendet werden + +# 0: symbol +compiler.err.add.exports.with.release=Export eines Packages aus Systemmodul {0} ist mit --release nicht zul\u00E4ssig + +# 0: symbol +compiler.err.add.reads.with.release=Hinzuf\u00FCgen von Lese-Edges f\u00FCr Systemmodul {0} ist mit --release nicht zul\u00E4ssig + +compiler.warn.addopens.ignored=--add-opens hat zur Kompilierungszeit keine Auswirkungen + +compiler.misc.locn.module_source_path=Modulquellpfad + +compiler.misc.locn.upgrade_module_path=Upgrademodulpfad + +compiler.misc.locn.system_modules=Systemmodule + +compiler.misc.locn.module_path=Anwendungsmodulpfad + +compiler.misc.cant.resolve.modules=Module k\u00F6nnen nicht aufgel\u00F6st werden + +compiler.misc.bad.requires.flag=Ung\u00FCltiges requires-Kennzeichen: {0} + +# 0: string +compiler.err.invalid.module.specifier=Modulbezeichner nicht zul\u00E4ssig: {0} + +# 0: symbol +compiler.warn.service.provided.but.not.exported.or.used=Serviceschnittstelle angegeben, aber nicht exportiert oder verwendet + +# 0: kind name, 1: symbol, 2: symbol +compiler.warn.leaks.not.accessible={0} {1} in Modul {2} ist nicht zug\u00E4nglich f\u00FCr Clients, die dieses Modul ben\u00F6tigen +# 0: kind name, 1: symbol, 2: symbol +compiler.warn.leaks.not.accessible.unexported={0} {1} in Modul {2} wird nicht exportiert +# 0: kind name, 1: symbol, 2: symbol +compiler.warn.leaks.not.accessible.not.required.transitive={0} {1} in Modul {2} wird nicht indirekt mit "requires transitive" exportiert +# 0: kind name, 1: symbol, 2: symbol +compiler.warn.leaks.not.accessible.unexported.qualified={0} {1} in Modul {2} ist m\u00F6glichweise nicht f\u00FCr alle Clients, die dieses Modul ben\u00F6tigen, sichtbar + +### +# errors related to options + +# 0: string, 1: string +compiler.err.illegal.argument.for.option=Unzul\u00E4ssiges Argument f\u00FCr {0}: {1} + +compiler.err.match.binding.exists=Unzul\u00E4ssiger Versuch, ein vorhandenes \u00DCbereinstimmungs-Binding neu zu definieren + +compiler.err.switch.case.unexpected.statement=Unerwartete Anweisung in Case. Ausdruck, Block oder throw-Anweisung erwartet + +compiler.err.switch.mixing.case.types=Unterschiedliche Case-Typen im Switch verwendet + +### +# errors related to sealed classes + +# permits clause +# 0: fragment +compiler.err.invalid.permits.clause=Ung\u00FCltige PERMITS-Klausel\n({0}) + +# 0: string +compiler.misc.class.is.not.sealed={0} muss verschl\u00FCsselt sein + +# 0: type +compiler.misc.is.a.type.variable=Darf keine Typvariablen enthalten: {0} + +# 0: type +compiler.misc.is.duplicated=Darf keine Duplikate enthalten: {0} + +# 0: type +compiler.misc.doesnt.extend.sealed=Unterklasse {0} muss verschl\u00FCsselte Klasse erweitern + +compiler.misc.must.not.be.same.class=Unzul\u00E4ssige Selbstreferenz in PERMITS-Klausel + +# 0: type +compiler.misc.must.not.be.supertype=Unzul\u00E4ssige Referenz zu Supertyp {0} + +# other sealed types related errors + +compiler.err.sealed.class.must.have.subclasses=Verschl\u00FCsselte Klasse muss Unterklassen aufweisen + +# errors in subclasses of sealed classes +# 0: symbol +compiler.err.cant.inherit.from.sealed=Klasse darf nicht verschl\u00FCsselte Klasse erweitern: {0} (da diese nicht in der "permits"-Klausel enthalten ist) + +# 0: symbol +compiler.err.class.in.unnamed.module.cant.extend.sealed.in.diff.package=Klasse {0} in unbenanntem Modul darf keine verschl\u00FCsselte Klasse in einem anderen Package erweitern + +# 0: symbol, 1: symbol +compiler.err.class.in.module.cant.extend.sealed.in.diff.module=Klasse {0} in Modul {1} darf keine verschl\u00FCsselte Klasse in einem anderen Modul erweitern + +# 0: symbol +compiler.err.non.sealed.with.no.sealed.supertype=Modifikator "non-sealed" ist hier nicht zul\u00E4ssig\n(Klasse {0} hat keine verschl\u00FCsselten Supertypen) + +compiler.err.non.sealed.sealed.or.final.expected=Modifikator "sealed", "non-sealed" oder "final" erwartet + +compiler.err.non.sealed.or.sealed.expected=Modifikator "sealed" oder "non-sealed" erwartet + +compiler.err.sealed.or.non.sealed.local.classes.not.allowed=Lokale Klassen mit "sealed" oder "non-sealed" nicht zul\u00E4ssig + +# 0: fragment +compiler.err.local.classes.cant.extend.sealed=Klassen vom Typ "{0}" d\u00FCrfen keine verschl\u00FCsselten Klassen erweitern +compiler.misc.anonymous=Anonym + +compiler.misc.local=Lokal + +### +# errors related to records + +# record components +compiler.err.record.cant.declare.field.modifiers=Datensatzkomponenten k\u00F6nnen keine Modifikatoren aufweisen + +# 0: symbol +compiler.err.illegal.record.component.name=Unzul\u00E4ssiger Datensatzkomponentenname {0} + +compiler.err.record.component.and.old.array.syntax=Legacy-Arraynotation f\u00FCr Datensatzkomponenten nicht zul\u00E4ssig + +# accessor methods +# 0: symbol, 1: fragment +compiler.err.invalid.accessor.method.in.record=Ung\u00FCltige Accessor-Methode in Datensatz {0}\n({1}) + +compiler.misc.method.must.be.public=Accessor-Methode muss \u00F6ffentlich sein + +# 0: symbol, 1: symbol +compiler.misc.accessor.return.type.doesnt.match=R\u00FCckgabetyp von Accessor-Methode {0} muss mit dem Typ der Datensatzkomponente {1} \u00FCbereinstimmen + +compiler.misc.accessor.method.cant.throw.exception=Throws-Klausel f\u00FCr Accessor-Methode nicht zul\u00E4ssig + +compiler.misc.accessor.method.must.not.be.generic=Accessor-Methode darf nicht generisch sein + +compiler.misc.accessor.method.must.not.be.static=Accessor-Methode darf nicht statisch sein + +# canonical constructors +# 0: fragment, 1: name, 2: fragment +compiler.err.invalid.canonical.constructor.in.record=Ung\u00FCltiger Konstruktor vom Typ {0} in Datensatz {1}\n({2}) + +compiler.misc.canonical=Kanonisch + +compiler.misc.compact=Kompakt + +# 0: fragment +compiler.misc.throws.clause.not.allowed.for.canonical.constructor=Throws-Klausel f\u00FCr Konstruktor des Typs {0} nicht zul\u00E4ssig + +compiler.misc.canonical.with.name.mismatch=Ung\u00FCltige Parameternamen in kanonischem Konstruktor + +compiler.misc.canonical.cant.have.return.statement=Kompakter Konstruktor darf keine return-Anweisungen verwenden + +compiler.misc.canonical.must.not.declare.type.variables=Kanonischer Konstruktor darf keine Typvariablen deklarieren + +compiler.misc.type.must.be.identical.to.corresponding.record.component.type=Typ und Argumentanzahl m\u00FCssen mit den Werten der entsprechenden Datensatzkomponente \u00FCbereinstimmen +compiler.misc.canonical.must.not.contain.explicit.constructor.invocation=Kanonischer Konstruktor darf keinen expliziten Konstruktoraufruf enthalten + +# 0: set of flag or string +compiler.misc.canonical.must.not.have.stronger.access=Versuch, h\u00F6here Zugriffsberechtigungen zuzuweisen. War {0} + +# other +compiler.err.record.cannot.declare.instance.fields=Felddeklaration muss statisch sein\n(ersetzen Sie unter Umst\u00E4nden das Feld durch eine Datensatzkomponente) + +# 0: symbol +compiler.err.invalid.supertype.record=Klassen k\u00F6nnen {0} nicht direkt erweitern + +# 0: symbol +compiler.err.first.statement.must.be.call.to.another.constructor=Konstruktor ist nicht kanonisch. Daher muss die erste Anweisung einen anderen Konstruktor der Klasse {0} aufrufen + +compiler.err.instance.initializer.not.allowed.in.records=Instanz-Initializer in Datens\u00E4tzen nicht zul\u00E4ssig + +compiler.err.static.declaration.not.allowed.in.inner.classes=Statische Deklarationen in inneren Klassen nicht zul\u00E4ssig + +compiler.err.record.header.expected=Datensatzheader erwartet + +############################################ +# messages previously at javac.properties + +compiler.err.empty.A.argument=-A erfordert ein Argument. Verwenden Sie "-Akey" oder "-Akey=value" + +# 0: string +compiler.err.invalid.A.key=Schl\u00FCssel in Annotationsprozessoroption "{0}" ist keine durch Punkt getrennte ID-Sequenz + +# 0: string +compiler.err.invalid.flag=Ung\u00FCltiges Kennzeichen: {0} + +compiler.err.profile.bootclasspath.conflict=Optionen "profile" und "bootclasspath" k\u00F6nnen nicht zusammen verwendet werden + +# 0: string +compiler.err.invalid.profile=Ung\u00FCltiges Profil: {0} + +# 0: string +compiler.err.invalid.target=Ung\u00FCltiges Zielrelease: {0} + +# 0: option name, 1: target +compiler.err.option.not.allowed.with.target=Option {0} mit Ziel {1} nicht zul\u00E4ssig + +# 0: string +compiler.err.option.too.many=Option {0} kann nur einmal angegeben werden + +compiler.err.no.source.files=Keine Quelldateien + +compiler.err.no.source.files.classes=Keine Quelldateien oder Klassennamen + +# 0: string +compiler.err.req.arg={0} erfordert ein Argument + +# 0: string +compiler.err.invalid.source=Ung\u00FCltiges Quellrelease: {0} + +# 0: string, 1: string +compiler.err.error.writing.file=Fehler beim Schreiben von {0}. {1} + +compiler.err.sourcepath.modulesourcepath.conflict=--source-path und --module-source-path k\u00F6nnen nicht beide angegeben werden + +# 0: string, 1: target +compiler.warn.source.target.conflict=Quellrelease {0} erfordert Zielrelease {1} + +# 0: string, 1: target +compiler.warn.target.default.source.conflict=Zielrelease {0} steht mit Standardquellrelease {1} in Konflikt + +# 0: profile, 1: target +compiler.warn.profile.target.conflict=Profil {0} ist f\u00FCr Zielrelease {1} nicht g\u00FCltig + +# 0: string +compiler.err.file.not.directory=Kein Verzeichnis: {0} + +# 0: object +compiler.err.file.not.file=Keine Datei: {0} + +compiler.err.two.class.loaders.1=javac ist auf mehrere Class Loader aufgeteilt: Pr\u00FCfen Sie die Konfiguration + +# 0: url, 1: url +compiler.err.two.class.loaders.2=javac ist auf mehrere Class Loader aufgeteilt:\nEine Klasse stammt aus Datei {0},\nw\u00E4hrend javac aus {1} stammt + +# 0: string, 1: string +compiler.err.bad.value.for.option=Ung\u00FCltiger Wert f\u00FCr {0}-Option: "{1}" + +# 0: string +compiler.err.no.value.for.option=Kein Wert f\u00FCr {0}-Option + +# 0: string +compiler.err.repeated.value.for.patch.module=--patch-module mehrmals f\u00FCr Modul {0} angegeben + +# 0: string +compiler.err.repeated.value.for.module.source.path=--module-source-path mehrmals f\u00FCr Modul {0} angegeben + +compiler.err.multiple.values.for.module.source.path=--module-source-path mehrmals mit Musterargument angegeben + +# 0: string +compiler.err.unmatched.quote=Alleinstehendes Anf\u00FChrungszeichen in Umgebungsvariable {0} + +# 0: option name +compiler.err.release.bootclasspath.conflict=Option {0} kann nicht zusammen mit --release verwendet werden + +# 0: string +compiler.err.unsupported.release.version=Releaseversion {0} nicht unterst\u00FCtzt + +# 0: string +compiler.err.file.not.found=Datei nicht gefunden: {0} + +# 0: string, 1: source +compiler.err.preview.not.latest=Ung\u00FCltiges Quellrelease {0} mit --enable-preview\n(Vorschausprachfeatures werden nur f\u00FCr Release {1} unterst\u00FCtzt) + +compiler.err.preview.without.source.or.release=--enable-preview muss mit -source oder --release verwendet werden + +# 0: kind name, 1: symbol +compiler.warn.declared.using.preview={0} {1} ist mit einem Vorschaufeature deklariert, das in einem zuk\u00FCnftigen Release entfernt werden kann. + +compiler.warn.attempt.to.synchronize.on.instance.of.value.based.class=Versuch der Synchronisierung f\u00FCr eine Instanz einer wertbasierten Klasse diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties index 2e071a4059a77fa6a86c6c9c0fd357cebe630292..86c65650c5917a0f6eb6e1edad5a92479b802d2d 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties @@ -119,7 +119,7 @@ compiler.err.annotation.missing.default.value.1=\u6CE8\u91C8@{0}\u306B\u306F\u89 # 0: type compiler.err.annotation.not.valid.for.type=\u6CE8\u91C8\u306F\u578B{0}\u306E\u8981\u7D20\u306B\u5BFE\u3057\u3066\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 -compiler.err.annotation.type.not.applicable=\u6CE8\u91C8\u578B\u306F\u3053\u306E\u7A2E\u985E\u306E\u5BA3\u8A00\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 +compiler.err.annotation.type.not.applicable=\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306F\u3053\u306E\u7A2E\u985E\u306E\u5BA3\u8A00\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 # 0: type compiler.err.annotation.type.not.applicable.to.type=\u6CE8\u91C8@{0}\u306F\u3053\u306E\u578B\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 @@ -263,12 +263,14 @@ compiler.misc.lambda=\u30E9\u30E0\u30C0\u5F0F compiler.misc.inner.cls=\u5185\u90E8\u30AF\u30E9\u30B9 +compiler.misc.guard=\u30AC\u30FC\u30C9 + # 0: type compiler.err.cant.deref={0}\u306F\u9593\u63A5\u53C2\u7167\u3067\u304D\u307E\u305B\u3093 compiler.err.cant.extend.intf.annotation=@interfaces\u3067\u306F''extends''\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 -compiler.err.annotation.decl.not.allowed.here=\u3053\u3053\u3067\u306F\u6CE8\u91C8\u578B\u306E\u5BA3\u8A00\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 +compiler.err.annotation.decl.not.allowed.here=\u3053\u3053\u3067\u306F\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u5BA3\u8A00\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 # 0: symbol compiler.err.cant.inherit.from.final=final {0}\u304B\u3089\u306F\u7D99\u627F\u3067\u304D\u307E\u305B\u3093 @@ -307,7 +309,7 @@ compiler.err.no.superclass={0}\u306B\u306F\u30B9\u30FC\u30D1\u30FC\u30AF\u30E9\u # 0: symbol, 1: type, 2: symbol, 3: type, 4: type compiler.err.concrete.inheritance.conflict={1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u3068{3}\u306E{2}\u306F\u540C\u3058\u30B7\u30B0\u30CB\u30C1\u30E3\u304B\u3089\u7D99\u627F\u3055\u308C\u3066\u3044\u307E\u3059 -compiler.err.default.allowed.in.intf.annotation.member=\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u306F\u6CE8\u91C8\u578B\u306E\u5BA3\u8A00\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059 +compiler.err.default.allowed.in.intf.annotation.member=\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u306F\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u5BA3\u8A00\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059 # 0: symbol compiler.err.doesnt.exist=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u5B58\u5728\u3057\u307E\u305B\u3093 @@ -319,7 +321,7 @@ compiler.err.duplicate.annotation.invalid.repeated=\u6CE8\u91C8{0}\u306F\u6709\u compiler.err.duplicate.annotation.member.value=\u6CE8\u91C8@{1}\u306B\u91CD\u8907\u3057\u305F\u8981\u7D20''{0}''\u304C\u3042\u308A\u307E\u3059\u3002 # 0: type -compiler.err.duplicate.annotation.missing.container={0}\u306F\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u578B\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +compiler.err.duplicate.annotation.missing.container={0}\u306F\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 # 0: symbol compiler.err.invalid.repeatable.annotation=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059: {0}\u306F\u7121\u52B9\u306A@Repeatable\u6CE8\u91C8\u3067\u6CE8\u91C8\u4ED8\u3051\u3055\u308C\u3066\u3044\u307E\u3059 @@ -334,22 +336,22 @@ compiler.err.invalid.repeatable.annotation.multiple.values={0}\u306F\u6709\u52B9 compiler.err.invalid.repeatable.annotation.invalid.value={0}\u306F\u6709\u52B9\u306A@Repeatable\u3067\u306F\u3042\u308A\u307E\u305B\u3093: \u5024\u8981\u7D20\u304C\u7121\u52B9\u3067\u3059 # 0: symbol or type, 1: type, 2: type -compiler.err.invalid.repeatable.annotation.value.return=\u5305\u542B\u3059\u308B\u6CE8\u91C8\u578B({0})\u306F\u578B{2}\u306E\u8981\u7D20''value''\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +compiler.err.invalid.repeatable.annotation.value.return=\u5305\u542B\u3059\u308B\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9({0})\u306F\u578B{2}\u306E\u8981\u7D20''value''\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 # 0: symbol or type, 1: symbol -compiler.err.invalid.repeatable.annotation.elem.nondefault=\u5305\u542B\u3059\u308B\u6CE8\u91C8\u578B{0}\u306B\u306F\u8981\u7D20{1}\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +compiler.err.invalid.repeatable.annotation.elem.nondefault=\u5305\u542B\u3059\u308B\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{0}\u306B\u306F\u8981\u7D20{1}\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 # 0: symbol, 1: string, 2: symbol, 3: string -compiler.err.invalid.repeatable.annotation.retention=\u5305\u542B\u3059\u308B\u6CE8\u91C8\u578B({0})\u306E\u4FDD\u6709\u304C\u3001\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u578B({2})\u306E\u4FDD\u6709\u3088\u308A\u77ED\u304F\u306A\u3063\u3066\u3044\u307E\u3059 +compiler.err.invalid.repeatable.annotation.retention=\u5305\u542B\u3059\u308B\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9({0})\u306E\u4FDD\u6709\u304C\u3001\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9({2})\u306E\u4FDD\u6709\u3088\u308A\u77ED\u304F\u306A\u3063\u3066\u3044\u307E\u3059 # 0: symbol, 1: symbol -compiler.err.invalid.repeatable.annotation.not.documented=\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u578B({1})\u306F@Documented\u3067\u3059\u304C\u3001\u5305\u542B\u3059\u308B\u6CE8\u91C8\u578B({0})\u306F\u9055\u3044\u307E\u3059 +compiler.err.invalid.repeatable.annotation.not.documented=\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9({1})\u306F@Documented\u3067\u3059\u304C\u3001\u5305\u542B\u3059\u308B\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9({0})\u306F\u9055\u3044\u307E\u3059 # 0: symbol, 1: symbol -compiler.err.invalid.repeatable.annotation.not.inherited=\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u578B({1})\u306F@Inherited\u3067\u3059\u304C\u3001\u5305\u542B\u3059\u308B\u6CE8\u91C8\u578B({0})\u306F\u9055\u3044\u307E\u3059 +compiler.err.invalid.repeatable.annotation.not.inherited=\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9({1})\u306F@Inherited\u3067\u3059\u304C\u3001\u5305\u542B\u3059\u308B\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9({0})\u306F\u9055\u3044\u307E\u3059 # 0: symbol, 1: symbol -compiler.err.invalid.repeatable.annotation.incompatible.target=\u5305\u542B\u3059\u308B\u6CE8\u91C8\u578B({0})\u306F\u3001\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u578B({1})\u3088\u308A\u591A\u304F\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u306B\u9069\u7528\u3055\u308C\u307E\u3059 +compiler.err.invalid.repeatable.annotation.incompatible.target=\u5305\u542B\u3059\u308B\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9({0})\u306F\u3001\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9({1})\u3088\u308A\u591A\u304F\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u306B\u9069\u7528\u3055\u308C\u307E\u3059 # 0: symbol compiler.err.invalid.repeatable.annotation.repeated.and.container.present=\u30B3\u30F3\u30C6\u30CA{0}\u306F\u542B\u307E\u308C\u3066\u3044\u308B\u8981\u7D20\u3068\u540C\u6642\u306B\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093 @@ -368,8 +370,21 @@ compiler.err.same.binary.name=\u30AF\u30E9\u30B9: {0}\u3068{1}\u306E\u30D0\u30A4 compiler.err.duplicate.case.label=case\u30E9\u30D9\u30EB\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059 +compiler.err.pattern.dominated=\u5148\u884C\u3059\u308Bcase\u30E9\u30D9\u30EB\u304C\u3001\u3053\u306Ecase\u30E9\u30D9\u30EB\u3088\u308A\u3082\u512A\u4F4D\u3067\u3059 + compiler.err.duplicate.default.label=default\u30E9\u30D9\u30EB\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059 +compiler.err.duplicate.total.pattern=\u5408\u8A08\u30D1\u30BF\u30FC\u30F3\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059 + +compiler.err.total.pattern.and.default=switch\u306B\u5408\u8A08\u30D1\u30BF\u30FC\u30F3\u3068default\u30E9\u30D9\u30EB\u306E\u4E21\u65B9\u304C\u3042\u308A\u307E\u3059 + +# 0: type, 1: type +compiler.err.constant.label.not.compatible=\u30BF\u30A4\u30D7{0}\u306E\u5B9A\u6570\u30E9\u30D9\u30EB\u304Cswitch\u30BB\u30EC\u30AF\u30BF\u30FB\u30BF\u30A4\u30D7{1}\u3068\u4E92\u63DB\u6027\u304C\u3042\u308A\u307E\u305B\u3093 + +compiler.err.flows.through.to.pattern=\u30D1\u30BF\u30FC\u30F3\u306B\u5BFE\u3057\u3066\u4E0D\u6B63\u306Afall-through + +compiler.err.flows.through.from.pattern=\u30D1\u30BF\u30FC\u30F3\u304B\u3089\u306E\u4E0D\u6B63\u306Afall-through + compiler.err.else.without.if=''else''\u3078\u306E''if''\u304C\u3042\u308A\u307E\u305B\u3093 compiler.err.empty.char.lit=\u7A7A\u306E\u6587\u5B57\u30EA\u30C6\u30E9\u30EB\u3067\u3059 @@ -379,13 +394,13 @@ compiler.err.encl.class.required={0}\u3092\u542B\u3080\u56F2\u3046\u30A4\u30F3\u compiler.err.enum.annotation.must.be.enum.constant=\u5217\u6319\u578B\u6CE8\u91C8\u5024\u306F\u3001\u5217\u6319\u578B\u5B9A\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 -compiler.err.enum.cant.be.instantiated=\u5217\u6319\u578B\u306F\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3067\u304D\u307E\u305B\u3093 +compiler.err.enum.cant.be.instantiated=\u5217\u6319\u30AF\u30E9\u30B9\u306F\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3067\u304D\u307E\u305B\u3093 compiler.err.enum.label.must.be.unqualified.enum=\u5217\u6319\u578B\u306Eswitch case\u30E9\u30D9\u30EB\u306F\u5217\u6319\u578B\u5B9A\u6570\u306E\u975E\u4FEE\u98FE\u540D\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 compiler.err.enum.no.subclassing=\u30AF\u30E9\u30B9\u306F\u76F4\u63A5java.lang.Enum\u3092\u62E1\u5F35\u3067\u304D\u307E\u305B\u3093 -compiler.err.enum.types.not.extensible=\u5217\u6319\u578B\u306F\u62E1\u5F35\u53EF\u80FD\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +compiler.err.enum.types.not.extensible=\u5217\u6319\u30AF\u30E9\u30B9\u306F\u62E1\u5F35\u53EF\u80FD\u3067\u306F\u3042\u308A\u307E\u305B\u3093 compiler.err.enum.no.finalize=\u5217\u6319\u578B\u306Ffinalize\u30E1\u30BD\u30C3\u30C9\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 @@ -495,21 +510,21 @@ compiler.err.incomparable.types=\u578B{0}\u3068{1}\u306F\u6BD4\u8F03\u3067\u304D # 0: string compiler.err.int.number.too.large=\u6574\u6570\u304C\u5927\u304D\u3059\u304E\u307E\u3059\u3002 -compiler.err.intf.annotation.members.cant.have.params=\u6CE8\u91C8\u578B\u5BA3\u8A00\u5185\u306E\u8981\u7D20\u304C\u4EEE\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u5BA3\u8A00\u3067\u304D\u307E\u305B\u3093 +compiler.err.intf.annotation.members.cant.have.params=\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u5BA3\u8A00\u5185\u306E\u8981\u7D20\u304C\u4EEE\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u5BA3\u8A00\u3067\u304D\u307E\u305B\u3093 # 0: symbol -compiler.err.intf.annotation.cant.have.type.params=\u6CE8\u91C8\u578B{0}\u306F\u6C4E\u7528\u306B\u3067\u304D\u307E\u305B\u3093 +compiler.err.intf.annotation.cant.have.type.params=\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{0}\u306F\u6C4E\u7528\u306B\u3067\u304D\u307E\u305B\u3093 -compiler.err.intf.annotation.members.cant.have.type.params=\u6CE8\u91C8\u578B\u5BA3\u8A00\u5185\u306E\u8981\u7D20\u306F\u6C4E\u7528\u30E1\u30BD\u30C3\u30C9\u306B\u3067\u304D\u307E\u305B\u3093 +compiler.err.intf.annotation.members.cant.have.type.params=\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u5BA3\u8A00\u5185\u306E\u8981\u7D20\u306F\u6C4E\u7528\u30E1\u30BD\u30C3\u30C9\u306B\u3067\u304D\u307E\u305B\u3093 # 0: symbol, 1: type -compiler.err.intf.annotation.member.clash=\u6CE8\u91C8\u578B{1}\u3067\u30E1\u30BD\u30C3\u30C9{0}\u3068\u540C\u3058\u540D\u524D\u306E\u8981\u7D20\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059 +compiler.err.intf.annotation.member.clash=\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{1}\u3067\u30E1\u30BD\u30C3\u30C9{0}\u3068\u540C\u3058\u540D\u524D\u306E\u8981\u7D20\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059 compiler.err.intf.expected.here=\u3053\u3053\u306B\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304C\u5FC5\u8981\u3067\u3059 compiler.err.intf.meth.cant.have.body=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u62BD\u8C61\u30E1\u30BD\u30C3\u30C9\u304C\u672C\u4F53\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 -compiler.err.invalid.annotation.member.type=\u6CE8\u91C8\u578B\u8981\u7D20\u306E\u578B\u304C\u7121\u52B9\u3067\u3059 +compiler.err.invalid.annotation.member.type=\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u8981\u7D20\u306E\u578B\u304C\u7121\u52B9\u3067\u3059 compiler.err.invalid.binary.number=2\u9032\u6570\u5B57\u306F\u5C11\u306A\u304F\u3068\u30821\u6841\u306E2\u9032\u6570\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 @@ -535,7 +550,7 @@ compiler.err.label.already.in.use=\u30E9\u30D9\u30EB{0}\u306F\u3059\u3067\u306B\ # 0: symbol compiler.err.local.var.accessed.from.icls.needs.final=\u30ED\u30FC\u30AB\u30EB\u5909\u6570{0}\u306F\u5185\u90E8\u30AF\u30E9\u30B9\u304B\u3089\u30A2\u30AF\u30BB\u30B9\u3055\u308C\u307E\u3059\u3002final\u3067\u5BA3\u8A00\u3055\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 -compiler.err.local.enum=\u5217\u6319\u578B\u306F\u30ED\u30FC\u30AB\u30EB\u306B\u3067\u304D\u307E\u305B\u3093 +compiler.err.local.enum=\u5217\u6319\u30AF\u30E9\u30B9\u306F\u30ED\u30FC\u30AB\u30EB\u306B\u3067\u304D\u307E\u305B\u3093 compiler.err.cannot.create.array.with.type.arguments=\u578B\u5F15\u6570\u3092\u6301\u3064\u914D\u5217\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 @@ -649,7 +664,7 @@ compiler.err.no.intf.expected.here=\u3053\u3053\u306B\u30A4\u30F3\u30BF\u30D5\u3 compiler.err.no.match.entry={0}\u306F{1}\u306E\u30A8\u30F3\u30C8\u30EA\u306B\u9069\u5408\u3057\u307E\u305B\u3093\u3002{2}\u304C\u5FC5\u8981\u3067\u3059 # 0: type -compiler.err.not.annotation.type={0}\u306F\u6CE8\u91C8\u578B\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +compiler.err.not.annotation.type={0}\u306F\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 # 0: symbol, 1: symbol, 2: message segment compiler.err.not.def.access.package.cant.access={0} \u306F\u8868\u793A\u4E0D\u53EF\u3067\u3059\n({2}) @@ -836,6 +851,8 @@ compiler.err.static.imp.only.classes.and.interfaces=static import\u306F\u30AF\u3 compiler.err.string.const.req=\u5B9A\u6570\u306E\u6587\u5B57\u5217\u5F0F\u304C\u5FC5\u8981\u3067\u3059 +compiler.err.pattern.expected=\u30BF\u30A4\u30D7\u306E\u30D1\u30BF\u30FC\u30F3\u304C\u5FC5\u8981\u3067\u3059 + # 0: symbol, 1: fragment compiler.err.cannot.generate.class=\u30AF\u30E9\u30B9{0}\u306E\u751F\u6210\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\n({1}) @@ -966,6 +983,8 @@ compiler.err.unreachable.stmt=\u3053\u306E\u6587\u306B\u5236\u5FA1\u304C\u79FB\u compiler.err.not.exhaustive=switch\u5F0F\u304C\u3059\u3079\u3066\u306E\u53EF\u80FD\u306A\u5165\u529B\u5024\u3092\u30AB\u30D0\u30FC\u3057\u3066\u3044\u307E\u305B\u3093 +compiler.err.not.exhaustive.statement=switch\u6587\u304C\u3059\u3079\u3066\u306E\u53EF\u80FD\u306A\u5165\u529B\u5024\u3092\u30AB\u30D0\u30FC\u3057\u3066\u3044\u307E\u305B\u3093 + compiler.err.initializer.must.be.able.to.complete.normally=\u521D\u671F\u5316\u5B50\u306F\u6B63\u5E38\u306B\u5B8C\u4E86\u3067\u304D\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 compiler.err.initializer.not.allowed=\u30A4\u30CB\u30B7\u30E3\u30E9\u30A4\u30B6\u306Finterfaces\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 @@ -1006,7 +1025,7 @@ compiler.misc.varargs.trustme.on.reifiable.varargs=\u53EF\u5909\u5F15\u6570\u898 compiler.err.instanceof.reifiable.not.safe={0}\u3092{1}\u306B\u5B89\u5168\u306B\u30AD\u30E3\u30B9\u30C8\u3067\u304D\u307E\u305B\u3093 # 0: type, 1: type -compiler.err.instanceof.pattern.no.subtype=\u30D1\u30BF\u30FC\u30F3\u30FB\u30BF\u30A4\u30D7{0}\u306F\u5F0F\u30BF\u30A4\u30D7{1}\u306E\u30B5\u30D6\u30BF\u30A4\u30D7\u3067\u3059 +compiler.err.instanceof.pattern.no.subtype=\u5F0F\u30BF\u30A4\u30D7{0}\u306F\u30D1\u30BF\u30FC\u30F3\u30FB\u30BF\u30A4\u30D7{1}\u306E\u30B5\u30D6\u30BF\u30A4\u30D7\u3067\u3059 # 0: symbol compiler.misc.varargs.trustme.on.non.varargs.meth=\u30E1\u30BD\u30C3\u30C9{0}\u306F\u53EF\u5909\u5F15\u6570\u30E1\u30BD\u30C3\u30C9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 @@ -1073,12 +1092,12 @@ compiler.err.locn.invalid.arg.for.xpatch=--patch-module\u30AA\u30D7\u30B7\u30E7\ compiler.err.file.sb.on.source.or.patch.path.for.module=\u30D5\u30A1\u30A4\u30EB\u306F\u3001\u30BD\u30FC\u30B9\u30FB\u30D1\u30B9\u3001\u307E\u305F\u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30D1\u30C3\u30C1\u30FB\u30D1\u30B9\u306B\u5B58\u5728\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +compiler.err.no.java.lang=\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u30FB\u30AF\u30E9\u30B9\u3067\u30D1\u30C3\u30B1\u30FC\u30B8java.lang\u3092\u691C\u51FA\u3067\u304D\u307E\u305B\u3093 + ##### # Fatal Errors -compiler.misc.fatal.err.no.java.lang=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: \u30AF\u30E9\u30B9\u30D1\u30B9\u307E\u305F\u306F\u30D6\u30FC\u30C8\u30FB\u30AF\u30E9\u30B9\u30D1\u30B9\u3067\u30D1\u30C3\u30B1\u30FC\u30B8java.lang\u3092\u691C\u51FA\u3067\u304D\u307E\u305B\u3093 - # 0: name compiler.misc.fatal.err.cant.locate.meth=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: \u30E1\u30BD\u30C3\u30C9{0}\u3092\u691C\u51FA\u3067\u304D\u307E\u305B\u3093 @@ -1168,19 +1187,21 @@ compiler.note.unchecked.filename.additional={0}\u306B\u672A\u30C1\u30A7\u30C3\u3 compiler.note.unchecked.plural.additional=\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u64CD\u4F5C\u306E\u3046\u3061\u3001\u672A\u30C1\u30A7\u30C3\u30AF\u307E\u305F\u306F\u5B89\u5168\u3067\u306F\u306A\u3044\u3082\u306E\u304C\u3055\u3089\u306B\u3042\u308A\u307E\u3059\u3002 -# 0: file name -compiler.note.preview.filename={0}\u306F\u30D7\u30EC\u30D3\u30E5\u30FC\u8A00\u8A9E\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 +# 0: file name, 1: source +compiler.note.preview.filename={0}\u306FJava SE {1}\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 -compiler.note.preview.plural=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306F\u30D7\u30EC\u30D3\u30E5\u30FC\u8A00\u8A9E\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 +# 0: source +compiler.note.preview.plural=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306FJava SE {0}\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 # The following string may appear after one of the above deprecation # messages. compiler.note.preview.recompile=\u8A73\u7D30\u306F\u3001-Xlint:preview\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3057\u3066\u518D\u30B3\u30F3\u30D1\u30A4\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002 -# 0: file name -compiler.note.preview.filename.additional={0}\u306F\u8FFD\u52A0\u3067\u30D7\u30EC\u30D3\u30E5\u30FC\u8A00\u8A9E\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 +# 0: file name, 1: source +compiler.note.preview.filename.additional={0}\u306BJava SE {1}\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u6A5F\u80FD\u306E\u8FFD\u52A0\u4F7F\u7528\u304C\u3042\u308A\u307E\u3059\u3002 -compiler.note.preview.plural.additional=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306F\u8FFD\u52A0\u3067\u30D7\u30EC\u30D3\u30E5\u30FC\u8A00\u8A9E\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 +# 0: source +compiler.note.preview.plural.additional=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306FJava SE {0}\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u6A5F\u80FD\u3092\u8FFD\u52A0\u4F7F\u7528\u3057\u307E\u3059\u3002 # Notes related to annotation processing @@ -1269,6 +1290,8 @@ compiler.warn.dir.path.element.not.directory=\u4E0D\u6B63\u306A\u30D1\u30B9\u898 # 0: symbol, 1: symbol, 2: symbol compiler.warn.missing-explicit-ctor=\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u305F\u30D1\u30C3\u30B1\u30FC\u30B8{1}\u306E\u30AF\u30E9\u30B9{0}\u306F\u660E\u793A\u7684\u306A\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3092\u5BA3\u8A00\u3057\u306A\u3044\u305F\u3081\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3092\u30E2\u30B8\u30E5\u30FC\u30EB{2}\u306E\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306B\u516C\u958B\u3057\u307E\u3059 +compiler.warn.strictfp=\u30EA\u30EA\u30FC\u30B917\u4EE5\u964D\u3001\u3059\u3079\u3066\u306E\u6D6E\u52D5\u5C0F\u6570\u70B9\u5F0F\u306F\u53B3\u5BC6\u306B\u8A55\u4FA1\u3055\u308C\u3001''strictfp''\u306F\u5FC5\u8981\u3042\u308A\u307E\u305B\u3093 + compiler.warn.finally.cannot.complete=finally\u7BC0\u304C\u6B63\u5E38\u306B\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093 # 0: name @@ -1284,10 +1307,13 @@ compiler.warn.has.been.deprecated={1}\u306E{0}\u306F\u63A8\u5968\u3055\u308C\u30 compiler.warn.has.been.deprecated.for.removal={1}\u306E{0}\u306F\u63A8\u5968\u3055\u308C\u3066\u304A\u3089\u305A\u3001\u524A\u9664\u7528\u306B\u30DE\u30FC\u30AF\u3055\u308C\u3066\u3044\u307E\u3059 # 0: symbol -compiler.warn.is.preview={0}\u306F\u30D7\u30EC\u30D3\u30E5\u30FC\u6A5F\u80FD\u306E\u4E00\u90E8\u3067\u3042\u308BAPI\u3067\u3059 +compiler.warn.is.preview={0}\u306F\u30D7\u30EC\u30D3\u30E5\u30FCAPI\u3067\u3042\u308A\u3001\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 # 0: symbol -compiler.err.is.preview={0}\u306F\u30D7\u30EC\u30D3\u30E5\u30FC\u6A5F\u80FD\u306E\u4E00\u90E8\u3067\u3042\u308BAPI\u3067\u3059 +compiler.err.is.preview={0}\u306F\u30D7\u30EC\u30D3\u30E5\u30FCAPI\u3067\u3042\u308A\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002\n(\u30D7\u30EC\u30D3\u30E5\u30FCAPI\u3092\u6709\u52B9\u306B\u3059\u308B\u306B\u306F--enable-preview\u3092\u4F7F\u7528\u3057\u307E\u3059) + +# 0: symbol +compiler.warn.is.preview.reflective={0}\u306F\u30EA\u30D5\u30EC\u30AF\u30C6\u30A3\u30D6\u30FB\u30D7\u30EC\u30D3\u30E5\u30FCAPI\u3067\u3042\u308A\u3001\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 # 0: symbol compiler.warn.has.been.deprecated.module=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306F\u63A8\u5968\u3055\u308C\u307E\u305B\u3093 @@ -1303,6 +1329,11 @@ compiler.warn.illegal.char.for.encoding=\u3053\u306E\u6587\u5B57\u306F\u3001\u30 # 0: symbol compiler.warn.improper.SVUID=serialVersionUID\u306F\u3001\u30AF\u30E9\u30B9{0}\u306Bstatic final\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +compiler.warn.improper.SPF=serialPersistentFields\u3092\u6709\u52B9\u306B\u3059\u308B\u306B\u306F\u3001private static final\u3068\u3057\u3066\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +compiler.warn.SPF.null.init=null\u306B\u521D\u671F\u5316\u3059\u308B\u3068serialPersistentFields\u306F\u7121\u52B9\u306B\u306A\u308A\u307E\u3059\u3002\n\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u306A\u3044\u3053\u3068\u3092\u793A\u3059\u306B\u306F\u3001\u7A7A\u306E\u914D\u5217\u306B\u521D\u671F\u5316\u3057\u307E\u3059 + + # 0: type, 1: type compiler.warn.inexact.non-varargs.call=\u6700\u7D42\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u4E0D\u6B63\u78BA\u306A\u5F15\u6570\u578B\u3092\u6301\u3063\u305F\u53EF\u5909\u5F15\u6570\u30E1\u30BD\u30C3\u30C9\u306E\u975E\u53EF\u5909\u5F15\u6570\u547C\u51FA\u3057\u3002\n\u53EF\u5909\u5F15\u6570\u547C\u51FA\u3057\u306B\u95A2\u3057\u3066\u306F{0}\u306B\u30AD\u30E3\u30B9\u30C8\u3057\u307E\u3059\u3002\n\u975E\u53EF\u5909\u5F15\u6570\u547C\u51FA\u3057\u306B\u95A2\u3057\u3066\u306F{1}\u306B\u30AD\u30E3\u30B9\u30C8\u3057\u3066\u3053\u306E\u8B66\u544A\u3092\u51FA\u3055\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059 @@ -1315,9 +1346,67 @@ compiler.warn.unreachable.catch.1=catch\u53E5\u306B\u79FB\u3059\u3053\u3068\u304 # 0: symbol compiler.warn.long.SVUID=serialVersionUID\u306F\u3001\u30AF\u30E9\u30B9{0}\u306Elong\u578B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +compiler.warn.OSF.array.SPF=serialPersistentFields\u3092\u6709\u52B9\u306B\u3059\u308B\u306B\u306F\u3001\u30BF\u30A4\u30D7\u3092java.io.ObjectStreamField[]\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + # 0: symbol compiler.warn.missing.SVUID=\u76F4\u5217\u5316\u53EF\u80FD\u306A\u30AF\u30E9\u30B9{0}\u306B\u306F\u3001serialVersionUID\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +# 0: name +compiler.warn.serializable.missing.access.no.arg.ctor=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u4E0D\u53EF\u306E\u30B9\u30FC\u30D1\u30FC\u30AF\u30E9\u30B9{0}\u3067\u5F15\u6570\u306A\u3057\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093 + +# 0: name +compiler.warn.serial.method.not.private=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9{0}\u306Fprivate\u3068\u3057\u3066\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093 + +# 0: name +compiler.warn.serial.concrete.instance.method=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9{0}\u3092\u6709\u52B9\u306B\u3059\u308B\u306B\u306F\u3001concrete\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002abstract\u3067\u3082static\u3067\u3082\u3042\u308A\u307E\u305B\u3093 + +# 0: name +compiler.warn.serial.method.static=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9{0}\u304Cstatic\u3068\u3057\u3066\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u6709\u52B9\u306B\u3059\u308B\u306B\u306F\u3001\u304B\u308F\u308A\u306B\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +# 0: name +compiler.warn.serial.method.no.args=\u6709\u52B9\u306B\u3059\u308B\u306B\u306F\u3001\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9{0}\u306B\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6307\u5B9A\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044 + +# 0: name, 1: number +compiler.warn.serial.method.one.arg=\u6709\u52B9\u306B\u3059\u308B\u306B\u306F\u3001\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9{0}\u306B\u3001{1}\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u306F\u306A\u304F\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u30921\u3064\u306E\u307F\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +# 0: name, 1: type, 2: type +compiler.warn.serial.method.parameter.type=\u6709\u52B9\u306B\u3059\u308B\u306B\u306F\u3001\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9{0}\u306E1\u3064\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3001\u578B{2}\u3067\u306F\u306A\u304F\u3001\u578B{1}\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +# 0: name, 1: type, 2: type +compiler.warn.serial.method.unexpected.return.type=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9{0}\u306F\u3001\u5FC5\u8981\u306A\u578B{2}\u3067\u306F\u306A\u304F\u3001{1}\u306E\u623B\u308A\u578B\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u3088\u3046\u306B\u3001\u30E1\u30BD\u30C3\u30C9\u306F\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u304C\u7121\u52B9\u306B\u306A\u308A\u307E\u3059 + +# 0: name, 1: type +compiler.warn.serial.method.unexpected.exception=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9{0}\u306F\u4E88\u671F\u3057\u306A\u3044\u578B{1}\u3092\u30B9\u30ED\u30FC\u3059\u308B\u3088\u3046\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059 + +compiler.warn.ineffectual.serial.field.interface=serialPersistentFields\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 + +# 0: string +compiler.warn.ineffectual.serial.field.enum=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30D5\u30A3\u30FC\u30EB\u30C9{0}\u306F\u5217\u6319\u30AF\u30E9\u30B9\u3067\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 + +# 0: string +compiler.warn.ineffectual.serial.method.enum=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9{0}\u306F\u5217\u6319\u30AF\u30E9\u30B9\u3067\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 + +compiler.warn.ineffectual.serial.field.record=serialPersistentFields\u306F\u30EC\u30B3\u30FC\u30C9\u30FB\u30AF\u30E9\u30B9\u3067\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 + +# 0: string +compiler.warn.ineffectual.serial.method.record=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9{0}\u306F\u30EC\u30B3\u30FC\u30C9\u30FB\u30E9\u30B9\u3067\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 + +# 0: name +compiler.warn.ineffectual.serial.method.externalizable=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9{0}\u306F\u5916\u90E8\u5316\u53EF\u80FD\u306A\u30AF\u30E9\u30B9\u3067\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 + +compiler.warn.ineffectual.serial.field.externalizable=serialPersistentFields\u306F\u5916\u90E8\u5316\u53EF\u80FD\u306A\u30AF\u30E9\u30B9\u3067\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 + +compiler.warn.externalizable.missing.public.no.arg.ctor=\u5916\u90E8\u5316\u53EF\u80FD\u306A\u30AF\u30E9\u30B9\u306B\u306F\u5F15\u6570\u306A\u3057\u3067\u30D1\u30D6\u30EA\u30C3\u30AF\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u304C\u5FC5\u8981\u3067\u3059 + +compiler.warn.non.serializable.instance.field=\u76F4\u5217\u5316\u53EF\u80FD\u306A\u30AF\u30E9\u30B9\u306E\u5E38\u99D0\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u30FB\u30D5\u30A3\u30FC\u30EB\u30C9\u306F\u76F4\u5217\u4E0D\u53EF\u30BF\u30A4\u30D7\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059 + +# 0: type +compiler.warn.non.serializable.instance.field.array=\u76F4\u5217\u5316\u53EF\u80FD\u306A\u30AF\u30E9\u30B9\u306E\u5E38\u99D0\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u30FB\u30D5\u30A3\u30FC\u30EB\u30C9\u306F\u3001\u76F4\u5217\u4E0D\u53EF\u306E\u30D9\u30FC\u30B9\u30FB\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7{0}\u3092\u6301\u3064\u914D\u5217\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059 + +compiler.warn.non.private.method.weaker.access=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067private\u3068\u3057\u3066\u5BA3\u8A00\u3055\u308C\u305F\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u30E1\u30BD\u30C3\u30C9\u306B\u3088\u3063\u3066\u3001\n\u305D\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u5B9F\u88C5\u3059\u308B\u30AF\u30E9\u30B9\u304C\u30E1\u30BD\u30C3\u30C9\u3092private\u3068\u3057\u3066\u5BA3\u8A00\u3067\u304D\u306A\u304F\u306A\u308A\u307E\u3059 + +compiler.warn.default.ineffective=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u95A2\u9023\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u3001\u30AF\u30E9\u30B9\u3092\u5B9F\u88C5\u3059\u308B\u305F\u3081\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3067\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093 + # 0: symbol, 1: symbol, 2: symbol, 3: symbol compiler.warn.potentially.ambiguous.overload={1}\u5185\u306E{0}\u306F{3}\u5185\u306E{2}\u3068\u77DB\u76FE\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 @@ -1404,7 +1493,7 @@ compiler.warn.proc.suspicious.class.name=\u540D\u524D\u304C{1}\u3067\u7D42\u308F compiler.warn.proc.file.create.last.round=\u6700\u5F8C\u306B\u4F5C\u6210\u3055\u308C\u305F\u30BF\u30A4\u30D7''{0}''\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u6CE8\u91C8\u51E6\u7406\u306B\u6E21\u3055\u308C\u307E\u305B\u3093\u3002 # 0: string, 1: string -compiler.warn.proc.malformed.supported.string=\u30D7\u30ED\u30BB\u30C3\u30B5''{1}''\u304C\u8FD4\u3057\u305F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u308B\u6CE8\u91C8\u578B\u306E\u6587\u5B57\u5217''{0}''\u304C\u4E0D\u6B63\u3067\u3059 +compiler.warn.proc.malformed.supported.string=\u30D7\u30ED\u30BB\u30C3\u30B5''{1}''\u304C\u8FD4\u3057\u305F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u308B\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u6587\u5B57\u5217''{0}''\u304C\u4E0D\u6B63\u3067\u3059 # 0: set of string compiler.warn.proc.annotations.without.processors=\u3053\u308C\u3089\u306E\u6CE8\u91C8\u3092\u8981\u6C42\u3059\u308B\u30D7\u30ED\u30BB\u30C3\u30B5\u306F\u3042\u308A\u307E\u305B\u3093\u3067\u3057\u305F: {0} @@ -1416,10 +1505,10 @@ compiler.warn.proc.processor.incompatible.source.version=\u6CE8\u91C8\u30D7\u30E compiler.warn.proc.duplicate.option.name=\u91CD\u8907\u3059\u308B\u30B5\u30DD\u30FC\u30C8\u5BFE\u8C61\u30AA\u30D7\u30B7\u30E7\u30F3''{0}''\u304C\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5''{1}''\u306B\u3088\u3063\u3066\u8FD4\u3055\u308C\u307E\u3057\u305F # 0: string, 1: string -compiler.warn.proc.duplicate.supported.annotation=\u91CD\u8907\u3059\u308B\u30B5\u30DD\u30FC\u30C8\u5BFE\u8C61\u6CE8\u91C8\u578B''{0}''\u304C\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5''{1}''\u306B\u3088\u3063\u3066\u8FD4\u3055\u308C\u307E\u3057\u305F +compiler.warn.proc.duplicate.supported.annotation=\u91CD\u8907\u3059\u308B\u30B5\u30DD\u30FC\u30C8\u5BFE\u8C61\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9''{0}''\u304C\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5''{1}''\u306B\u3088\u3063\u3066\u8FD4\u3055\u308C\u307E\u3057\u305F # 0: string -compiler.warn.proc.redundant.types.with.wildcard=\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5''{0}''\u306F''*''\u3068\u4ED6\u306E\u6CE8\u91C8\u578B\u3092\u91CD\u8907\u3057\u3066\u30B5\u30DD\u30FC\u30C8\u3057\u307E\u3059 +compiler.warn.proc.redundant.types.with.wildcard=\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5''{0}''\u306F''*''\u3068\u4ED6\u306E\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u91CD\u8907\u3057\u3066\u30B5\u30DD\u30FC\u30C8\u3057\u307E\u3059 compiler.warn.proc.proc-only.requested.no.procs=\u30B3\u30F3\u30D1\u30A4\u30EB\u306A\u3057\u306E\u6CE8\u91C8\u51E6\u7406\u304C\u30EA\u30AF\u30A8\u30B9\u30C8\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u30D7\u30ED\u30BB\u30C3\u30B5\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002 @@ -1475,6 +1564,8 @@ compiler.warn.deprecated.annotation.has.no.effect=@Deprecated\u6CE8\u91C8\u306F\ # 0: string compiler.warn.invalid.path=\u30D5\u30A1\u30A4\u30EB\u540D\u304C\u7121\u52B9\u3067\u3059: {0} +compiler.warn.doclint.not.available=\u4F7F\u7528\u53EF\u80FD\u306Adoclint\u306E\u30B5\u30FC\u30D3\u30B9\u30FB\u30D7\u30ED\u30D0\u30A4\u30C0\u306F\u3042\u308A\u307E\u305B\u3093 + # 0: string compiler.err.invalid.path=\u30D5\u30A1\u30A4\u30EB\u540D\u304C\u7121\u52B9\u3067\u3059: {0} @@ -1577,8 +1668,6 @@ compiler.err.enum.constant.expected=\u3053\u3053\u306B\u5217\u6319\u578B\u5B9A\u compiler.err.enum.constant.not.expected=\u3053\u3053\u306B\u5217\u6319\u578B\u5B9A\u6570\u306F\u5FC5\u8981\u3042\u308A\u307E\u305B\u3093 ## The following are related in form, but do not easily fit the above paradigm. -compiler.err.expected.module=''\u30E2\u30B8\u30E5\u30FC\u30EB''\u304C\u5FC5\u8981\u3067\u3059 - compiler.err.expected.module.or.open=''\u30E2\u30B8\u30E5\u30FC\u30EB''\u307E\u305F\u306F''\u30AA\u30FC\u30D7\u30F3''\u304C\u5FC5\u8981\u3067\u3059 compiler.err.dot.class.expected=''.class''\u304C\u3042\u308A\u307E\u305B\u3093 @@ -2103,6 +2192,10 @@ compiler.misc.feature.records=\u30EC\u30B3\u30FC\u30C9 compiler.misc.feature.sealed.classes=\u30B7\u30FC\u30EB\u30FB\u30AF\u30E9\u30B9 +compiler.misc.feature.case.null=switch case\u306Enull + +compiler.misc.feature.pattern.switch=switch\u6587\u306E\u30D1\u30BF\u30FC\u30F3 + compiler.warn.underscore.as.identifier=\u30EA\u30EA\u30FC\u30B99\u304B\u3089''_''\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u306A\u306E\u3067\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 compiler.err.underscore.as.identifier=\u30EA\u30EA\u30FC\u30B99\u304B\u3089''_''\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u306A\u306E\u3067\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 @@ -2174,6 +2267,28 @@ compiler.note.deferred.method.inst=\u30E1\u30BD\u30C3\u30C9{0}\u306E\u9045\u5EF6 # 0: symbol compiler.note.verbose.l2m.deduplicate=\u91CD\u8907\u9664\u5916\u30E9\u30E0\u30C0\u5B9F\u88C5\u30E1\u30BD\u30C3\u30C9{0} +######################################## +# Diagnostics for method reference search +# results used by Resolve (debug only) +######################################## + +# 0: fragment, 1: string, 2: number +compiler.note.method.ref.search.results.multi={1}\u306E{0}\u306E\u691C\u7D22\u7D50\u679C(\u6700\u3082\u53B3\u5BC6\u306A\u3082\u306E{2}\u500B)\n\u4F7F\u7528\u53EF\u80FD\u306A\u5019\u88DC: + +# 0: number, 1: fragment, 2: symbol +compiler.misc.applicable.method.found.2=\u4F7F\u7528\u53EF\u80FD\u30E1\u30BD\u30C3\u30C9\u304C#{0}\u500B\u898B\u3064\u304B\u308A\u307E\u3057\u305F: {1} {2} + +# 0: number, 1: fragment, 2: symbol, 3: message segment +compiler.misc.applicable.method.found.3=\u4F7F\u7528\u53EF\u80FD\u30E1\u30BD\u30C3\u30C9\u304C#{0}\u500B\u898B\u3064\u304B\u308A\u307E\u3057\u305F: {1} {2}\n({3}) + +compiler.misc.static=static + +compiler.misc.non.static=static\u3067\u306A\u3044 + +compiler.misc.bound=\u30D0\u30A4\u30F3\u30C9 + +compiler.misc.unbound=\u30D0\u30A4\u30F3\u30C9\u306A\u3057 + ######################################## # Diagnostics for where clause implementation # used by the RichDiagnosticFormatter. @@ -2260,7 +2375,7 @@ compiler.err.dc.no.tag.name='@'\u306E\u5F8C\u306B\u30BF\u30B0\u540D\u304C\u3042\ compiler.err.dc.gt.expected=''>''\u304C\u5FC5\u8981\u3067\u3059 -compiler.err.dc.ref.bad.parens=\u53C2\u7167\u306B'')''\u304C\u3042\u308A\u307E\u305B\u3093 +compiler.err.dc.ref.bad.parens=\u30AB\u30C3\u30B3\u306E\u5F8C\u306E\u4E88\u671F\u3057\u306A\u3044\u30C6\u30AD\u30B9\u30C8\u3067\u3059 compiler.err.dc.ref.syntax.error=\u53C2\u7167\u306B\u69CB\u6587\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3059 @@ -2274,6 +2389,8 @@ compiler.err.dc.unterminated.signature=\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u7D4 compiler.err.dc.unterminated.string=\u6587\u5B57\u5217\u304C\u7D42\u4E86\u3057\u3066\u3044\u307E\u305B\u3093 +compiler.err.dc.ref.annotations.not.allowed=\u6CE8\u91C8\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 + ### # errors related to modules @@ -2450,8 +2567,6 @@ compiler.err.illegal.argument.for.option={0}\u306E\u5F15\u6570\u304C\u4E0D\u6B63 compiler.err.match.binding.exists=\u65E2\u5B58\u306E\u4E00\u81F4\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u518D\u5B9A\u7FA9\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 -compiler.err.switch.null.not.allowed=case\u306Enull\u30E9\u30D9\u30EB\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 - compiler.err.switch.case.unexpected.statement=case\u306E\u4E88\u671F\u3057\u306A\u3044\u6587\u3067\u3059\u3002\u4E88\u671F\u3055\u308C\u308B\u306E\u306F\u3001\u5F0F\u3001\u30D6\u30ED\u30C3\u30AF\u307E\u305F\u306Fthrow\u6587\u3067\u3059 compiler.err.switch.mixing.case.types=switch\u3067case\u306E\u7570\u306A\u308B\u7A2E\u985E\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059 @@ -2664,5 +2779,7 @@ compiler.err.preview.not.latest=--enable-preview\u304C\u6307\u5B9A\u3055\u308C\u compiler.err.preview.without.source.or.release=--enable-preview\u306F-source\u307E\u305F\u306F--release\u3068\u3068\u3082\u306B\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 -compiler.warn.attempt.to.synchronize.on.instance.of.value.based.class=\u5024\u30D9\u30FC\u30B9\u30FB\u30AF\u30E9\u30B9\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3067\u540C\u671F\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F +# 0: kind name, 1: symbol +compiler.warn.declared.using.preview={0} {1}\u306F\u30D7\u30EC\u30D3\u30E5\u30FC\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u3066\u5BA3\u8A00\u3055\u308C\u3066\u304A\u308A\u3001\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 +compiler.warn.attempt.to.synchronize.on.instance.of.value.based.class=\u5024\u30D9\u30FC\u30B9\u30FB\u30AF\u30E9\u30B9\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3067\u540C\u671F\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties index 3c6e2ca34d3454069c2095c16fefee307b8861d1..01c92e9e0b3ad6d3315cd994d3c1699f4648b431 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties @@ -119,7 +119,7 @@ compiler.err.annotation.missing.default.value.1=\u5BF9\u4E8E\u5143\u7D20{1}, \u6 # 0: type compiler.err.annotation.not.valid.for.type=\u6CE8\u91CA\u5BF9\u4E8E\u7C7B\u578B{0}\u7684\u5143\u7D20\u65E0\u6548 -compiler.err.annotation.type.not.applicable=\u6CE8\u91CA\u7C7B\u578B\u4E0D\u9002\u7528\u4E8E\u8BE5\u7C7B\u578B\u7684\u58F0\u660E +compiler.err.annotation.type.not.applicable=\u6CE8\u91CA\u63A5\u53E3\u4E0D\u9002\u7528\u4E8E\u6B64\u7C7B\u578B\u7684\u58F0\u660E # 0: type compiler.err.annotation.type.not.applicable.to.type=\u6CE8\u91CA @{0} \u5728\u6B64\u7C7B\u578B\u4E0A\u4E0B\u6587\u4E2D\u4E0D\u9002\u7528 @@ -263,12 +263,14 @@ compiler.misc.lambda=lambda \u8868\u8FBE\u5F0F compiler.misc.inner.cls=\u5185\u90E8\u7C7B +compiler.misc.guard=\u536B\u58EB + # 0: type compiler.err.cant.deref=\u65E0\u6CD5\u53D6\u6D88\u5F15\u7528{0} compiler.err.cant.extend.intf.annotation=\u5BF9\u4E8E @interfaces, \u4E0D\u5141\u8BB8 ''extends'' -compiler.err.annotation.decl.not.allowed.here=\u6B64\u5904\u4E0D\u5141\u8BB8\u6CE8\u91CA\u7C7B\u578B\u58F0\u660E +compiler.err.annotation.decl.not.allowed.here=\u6B64\u5904\u4E0D\u5141\u8BB8\u6CE8\u91CA\u63A5\u53E3\u58F0\u660E # 0: symbol compiler.err.cant.inherit.from.final=\u65E0\u6CD5\u4ECE\u6700\u7EC8{0}\u8FDB\u884C\u7EE7\u627F @@ -307,7 +309,7 @@ compiler.err.no.superclass={0}\u4E0D\u5177\u6709\u8D85\u7C7B\u3002 # 0: symbol, 1: type, 2: symbol, 3: type, 4: type compiler.err.concrete.inheritance.conflict={1}\u4E2D\u7684\u65B9\u6CD5{0}\u548C{3}\u4E2D\u7684\u65B9\u6CD5{2}\u662F\u4F7F\u7528\u76F8\u540C\u7684\u7B7E\u540D\u7EE7\u627F\u7684 -compiler.err.default.allowed.in.intf.annotation.member=\u6CE8\u91CA\u7C7B\u578B\u58F0\u660E\u4E2D\u4EC5\u5141\u8BB8\u9ED8\u8BA4\u503C +compiler.err.default.allowed.in.intf.annotation.member=\u6CE8\u91CA\u63A5\u53E3\u58F0\u660E\u4E2D\u4EC5\u5141\u8BB8\u9ED8\u8BA4\u503C # 0: symbol compiler.err.doesnt.exist=\u7A0B\u5E8F\u5305{0}\u4E0D\u5B58\u5728 @@ -319,7 +321,7 @@ compiler.err.duplicate.annotation.invalid.repeated=\u6CE8\u91CA{0}\u4E0D\u662F\u compiler.err.duplicate.annotation.member.value=\u6CE8\u91CA@{1}\u4E2D\u7684\u5143\u7D20 ''{0}'' \u91CD\u590D\u3002 # 0: type -compiler.err.duplicate.annotation.missing.container={0} \u4E0D\u662F\u53EF\u91CD\u590D\u7684\u6CE8\u91CA\u7C7B\u578B +compiler.err.duplicate.annotation.missing.container={0} \u4E0D\u662F\u53EF\u91CD\u590D\u7684\u6CE8\u91CA\u63A5\u53E3 # 0: symbol compiler.err.invalid.repeatable.annotation=\u6CE8\u91CA\u91CD\u590D: \u4F7F\u7528\u65E0\u6548\u7684 @Repeatable \u6CE8\u91CA\u5BF9{0}\u8FDB\u884C\u4E86\u6CE8\u91CA @@ -334,22 +336,22 @@ compiler.err.invalid.repeatable.annotation.multiple.values={0}\u4E0D\u662F\u6709 compiler.err.invalid.repeatable.annotation.invalid.value={0}\u4E0D\u662F\u6709\u6548\u7684 @Repeatable: \u503C\u5143\u7D20\u65E0\u6548 # 0: symbol or type, 1: type, 2: type -compiler.err.invalid.repeatable.annotation.value.return=\u5305\u542B\u6CE8\u91CA\u7C7B\u578B ({0}) \u5FC5\u987B\u58F0\u660E\u7C7B\u578B{2}\u7684\u540D\u4E3A ''value'' \u7684\u5143\u7D20 +compiler.err.invalid.repeatable.annotation.value.return=\u5305\u542B\u6CE8\u91CA\u63A5\u53E3 ({0}) \u5FC5\u987B\u58F0\u660E\u7C7B\u578B {2} \u7684\u540D\u4E3A ''value'' \u7684\u5143\u7D20 # 0: symbol or type, 1: symbol -compiler.err.invalid.repeatable.annotation.elem.nondefault=\u5BF9\u4E8E\u5143\u7D20 {1}, \u5305\u542B\u6CE8\u91CA\u7C7B\u578B ({0}) \u6CA1\u6709\u9ED8\u8BA4\u503C +compiler.err.invalid.repeatable.annotation.elem.nondefault=\u5305\u542B\u6CE8\u91CA\u63A5\u53E3 ({0}) \u6CA1\u6709\u5143\u7D20 {1} \u7684\u9ED8\u8BA4\u503C # 0: symbol, 1: string, 2: symbol, 3: string -compiler.err.invalid.repeatable.annotation.retention=\u5305\u542B\u6CE8\u91CA\u7C7B\u578B ({0}) \u7684\u4FDD\u7559\u671F\u77ED\u4E8E\u53EF\u91CD\u590D\u6CE8\u91CA\u7C7B\u578B ({2}) \u7684\u4FDD\u7559\u671F +compiler.err.invalid.repeatable.annotation.retention=\u5305\u542B\u6CE8\u91CA\u63A5\u53E3 ({0}) \u7684\u4FDD\u7559\u671F\u77ED\u4E8E\u53EF\u91CD\u590D\u6CE8\u91CA\u63A5\u53E3 ({2}) \u7684\u4FDD\u7559\u671F # 0: symbol, 1: symbol -compiler.err.invalid.repeatable.annotation.not.documented=\u53EF\u91CD\u590D\u6CE8\u91CA\u7C7B\u578B ({1}) \u662F @Documented, \u800C\u5305\u542B\u6CE8\u91CA\u7C7B\u578B ({0}) \u5219\u4E0D\u662F +compiler.err.invalid.repeatable.annotation.not.documented=\u53EF\u91CD\u590D\u6CE8\u91CA\u63A5\u53E3 ({1}) \u662F @Documented\uFF0C\u800C\u5305\u542B\u6CE8\u91CA\u63A5\u53E3 ({0}) \u5219\u4E0D\u662F # 0: symbol, 1: symbol -compiler.err.invalid.repeatable.annotation.not.inherited=\u53EF\u91CD\u590D\u6CE8\u91CA\u7C7B\u578B ({1}) \u662F @Inherited, \u800C\u5305\u542B\u6CE8\u91CA\u7C7B\u578B ({0}) \u5219\u4E0D\u662F +compiler.err.invalid.repeatable.annotation.not.inherited=\u53EF\u91CD\u590D\u6CE8\u91CA\u63A5\u53E3 ({1}) \u662F @Inherited\uFF0C\u800C\u5305\u542B\u6CE8\u91CA\u63A5\u53E3 ({0}) \u5219\u4E0D\u662F # 0: symbol, 1: symbol -compiler.err.invalid.repeatable.annotation.incompatible.target=\u5305\u542B\u6CE8\u91CA\u7C7B\u578B ({0}) \u9002\u7528\u7684\u76EE\u6807\u591A\u4E8E\u53EF\u91CD\u590D\u6CE8\u91CA\u7C7B\u578B ({1}) +compiler.err.invalid.repeatable.annotation.incompatible.target=\u5305\u542B\u6CE8\u91CA\u63A5\u53E3 ({0}) \u9002\u7528\u7684\u76EE\u6807\u591A\u4E8E\u53EF\u91CD\u590D\u6CE8\u91CA\u63A5\u53E3 ({1}) # 0: symbol compiler.err.invalid.repeatable.annotation.repeated.and.container.present=\u5BB9\u5668 {0} \u4E0D\u5F97\u4E0E\u5176\u5305\u542B\u7684\u5143\u7D20\u540C\u65F6\u5B58\u5728 @@ -368,8 +370,21 @@ compiler.err.same.binary.name=\u7C7B\uFF1A{0} \u548C {1} \u5177\u6709\u76F8\u540 compiler.err.duplicate.case.label=case \u6807\u7B7E\u91CD\u590D +compiler.err.pattern.dominated=\u6B64 case \u6807\u7B7E\u7531\u524D\u4E00\u4E2A case \u6807\u7B7E\u652F\u914D + compiler.err.duplicate.default.label=default \u6807\u7B7E\u91CD\u590D +compiler.err.duplicate.total.pattern=\u603B\u8BA1\u6A21\u5F0F\u91CD\u590D + +compiler.err.total.pattern.and.default=switch \u6709\u4E00\u4E2A\u603B\u8BA1\u6A21\u5F0F\u548C\u4E00\u4E2A\u9ED8\u8BA4\u6807\u7B7E + +# 0: type, 1: type +compiler.err.constant.label.not.compatible={0} \u7C7B\u578B\u7684\u5E38\u91CF\u6807\u7B7E\u4E0E switch \u9009\u62E9\u5668\u7C7B\u578B {1} \u4E0D\u517C\u5BB9 + +compiler.err.flows.through.to.pattern=\u8D2F\u7A7F (fall-through) \u5230\u6A21\u5F0F\u975E\u6CD5 + +compiler.err.flows.through.from.pattern=\u4ECE\u6A21\u5F0F\u8D2F\u7A7F (fall-through) \u975E\u6CD5 + compiler.err.else.without.if=\u6709 ''if'', \u4F46\u662F\u6CA1\u6709 ''else'' compiler.err.empty.char.lit=\u7A7A\u5B57\u7B26\u6587\u5B57 @@ -379,13 +394,13 @@ compiler.err.encl.class.required=\u9700\u8981\u5305\u542B{0}\u7684\u5C01\u95ED\u compiler.err.enum.annotation.must.be.enum.constant=\u679A\u4E3E\u6CE8\u91CA\u503C\u5FC5\u987B\u662F\u679A\u4E3E\u5E38\u91CF -compiler.err.enum.cant.be.instantiated=\u65E0\u6CD5\u5B9E\u4F8B\u5316\u679A\u4E3E\u7C7B\u578B +compiler.err.enum.cant.be.instantiated=\u65E0\u6CD5\u5B9E\u4F8B\u5316\u679A\u4E3E\u7C7B compiler.err.enum.label.must.be.unqualified.enum=\u679A\u4E3E switch case \u6807\u7B7E\u5FC5\u987B\u4E3A\u679A\u4E3E\u5E38\u91CF\u7684\u975E\u9650\u5B9A\u540D\u79F0 compiler.err.enum.no.subclassing=\u7C7B\u65E0\u6CD5\u76F4\u63A5\u6269\u5C55 java.lang.Enum -compiler.err.enum.types.not.extensible=\u679A\u4E3E\u7C7B\u578B\u4E0D\u53EF\u7EE7\u627F +compiler.err.enum.types.not.extensible=\u679A\u4E3E\u7C7B\u4E0D\u53EF\u6269\u5C55 compiler.err.enum.no.finalize=\u679A\u4E3E\u4E0D\u80FD\u6709 finalize \u65B9\u6CD5 @@ -415,9 +430,9 @@ compiler.err.finally.without.try=\u6709 ''finally'', \u4F46\u662F\u6CA1\u6709 '' # 0: type, 1: message segment compiler.err.foreach.not.applicable.to.type=for-each \u4E0D\u9002\u7528\u4E8E\u8868\u8FBE\u5F0F\u7C7B\u578B\n\u8981\u6C42: {1}\n\u627E\u5230: {0} -compiler.err.fp.number.too.large=\u6D6E\u70B9\u6570\u8FC7\u5927 +compiler.err.fp.number.too.large=\u6D6E\u70B9\u6570\u592A\u5927 -compiler.err.fp.number.too.small=\u6D6E\u70B9\u6570\u8FC7\u5C0F +compiler.err.fp.number.too.small=\u6D6E\u70B9\u6570\u592A\u5C0F compiler.err.generic.array.creation=\u521B\u5EFA\u6CDB\u578B\u6570\u7EC4 @@ -495,21 +510,21 @@ compiler.err.incomparable.types=\u4E0D\u53EF\u6BD4\u8F83\u7684\u7C7B\u578B: {0}\ # 0: string compiler.err.int.number.too.large=\u6574\u6570\u592A\u5927 -compiler.err.intf.annotation.members.cant.have.params=\u6CE8\u91CA\u7C7B\u578B\u58F0\u660E\u4E2D\u7684\u5143\u7D20\u65E0\u6CD5\u58F0\u660E\u5F62\u53C2 +compiler.err.intf.annotation.members.cant.have.params=\u6CE8\u91CA\u63A5\u53E3\u58F0\u660E\u4E2D\u7684\u5143\u7D20\u65E0\u6CD5\u58F0\u660E\u5F62\u53C2 # 0: symbol -compiler.err.intf.annotation.cant.have.type.params=\u6CE8\u91CA\u7C7B\u578B {0} \u4E0D\u80FD\u4E3A\u6CDB\u578B +compiler.err.intf.annotation.cant.have.type.params=\u6CE8\u91CA\u63A5\u53E3 {0} \u4E0D\u80FD\u4E3A\u6CDB\u578B -compiler.err.intf.annotation.members.cant.have.type.params=\u6CE8\u91CA\u7C7B\u578B\u58F0\u660E\u4E2D\u7684\u5143\u7D20\u4E0D\u80FD\u4E3A\u6CDB\u578B\u65B9\u6CD5 +compiler.err.intf.annotation.members.cant.have.type.params=\u6CE8\u91CA\u63A5\u53E3\u58F0\u660E\u4E2D\u7684\u5143\u7D20\u4E0D\u80FD\u4E3A\u6CDB\u578B\u65B9\u6CD5 # 0: symbol, 1: type -compiler.err.intf.annotation.member.clash=\u6CE8\u91CA\u7C7B\u578B{1}\u58F0\u660E\u4E0E\u65B9\u6CD5 {0} \u540C\u540D\u7684\u5143\u7D20 +compiler.err.intf.annotation.member.clash=\u6CE8\u91CA\u63A5\u53E3 {1} \u58F0\u660E\u7684\u5143\u7D20\u4E0E\u65B9\u6CD5 {0} \u540C\u540D compiler.err.intf.expected.here=\u6B64\u5904\u9700\u8981\u63A5\u53E3 compiler.err.intf.meth.cant.have.body=\u63A5\u53E3\u62BD\u8C61\u65B9\u6CD5\u4E0D\u80FD\u5E26\u6709\u4E3B\u4F53 -compiler.err.invalid.annotation.member.type=\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20\u7684\u7C7B\u578B\u65E0\u6548 +compiler.err.invalid.annotation.member.type=\u6CE8\u91CA\u63A5\u53E3\u5143\u7D20\u7684\u7C7B\u578B\u65E0\u6548 compiler.err.invalid.binary.number=\u4E8C\u8FDB\u5236\u6570\u5B57\u4E2D\u5FC5\u987B\u5305\u542B\u81F3\u5C11\u4E00\u4E2A\u4E8C\u8FDB\u5236\u6570 @@ -535,7 +550,7 @@ compiler.err.label.already.in.use=\u6807\u7B7E{0}\u5DF2\u4F7F\u7528 # 0: symbol compiler.err.local.var.accessed.from.icls.needs.final=\u4ECE\u5185\u90E8\u7C7B\u4E2D\u8BBF\u95EE\u672C\u5730\u53D8\u91CF{0}; \u9700\u8981\u88AB\u58F0\u660E\u4E3A\u6700\u7EC8\u7C7B\u578B -compiler.err.local.enum=\u679A\u4E3E\u7C7B\u578B\u4E0D\u80FD\u4E3A\u672C\u5730\u7C7B\u578B +compiler.err.local.enum=\u679A\u4E3E\u7C7B\u4E0D\u80FD\u4E3A\u672C\u5730\u7C7B compiler.err.cannot.create.array.with.type.arguments=\u65E0\u6CD5\u521B\u5EFA\u5177\u6709\u7C7B\u578B\u53D8\u91CF\u7684\u6570\u7EC4 @@ -649,7 +664,7 @@ compiler.err.no.intf.expected.here=\u6B64\u5904\u4E0D\u9700\u8981\u63A5\u53E3 compiler.err.no.match.entry={0}\u5728{1}\u7684\u6761\u76EE\u4E2D\u6CA1\u6709\u5339\u914D\u9879; \u9700\u8981{2} # 0: type -compiler.err.not.annotation.type={0}\u4E0D\u662F\u6CE8\u91CA\u7C7B\u578B +compiler.err.not.annotation.type={0} \u4E0D\u662F\u6CE8\u91CA\u63A5\u53E3 # 0: symbol, 1: symbol, 2: message segment compiler.err.not.def.access.package.cant.access={0} \u4E0D\u53EF\u89C1\n({2}) @@ -836,6 +851,8 @@ compiler.err.static.imp.only.classes.and.interfaces=\u4EC5\u4ECE\u7C7B\u548C\u63 compiler.err.string.const.req=\u9700\u8981\u5E38\u91CF\u5B57\u7B26\u4E32\u8868\u8FBE\u5F0F +compiler.err.pattern.expected=\u9700\u8981\u7C7B\u578B\u6A21\u5F0F + # 0: symbol, 1: fragment compiler.err.cannot.generate.class=\u751F\u6210\u7C7B {0} \u65F6\u51FA\u9519\n({1}) @@ -966,6 +983,8 @@ compiler.err.unreachable.stmt=\u65E0\u6CD5\u8BBF\u95EE\u7684\u8BED\u53E5 compiler.err.not.exhaustive=switch \u8868\u8FBE\u5F0F\u4E0D\u5305\u542B\u6240\u6709\u53EF\u80FD\u7684\u8F93\u5165\u503C +compiler.err.not.exhaustive.statement=\u5E76\u975E\u6240\u6709\u53EF\u80FD\u7684\u8F93\u5165\u503C\u90FD\u5305\u542B\u5728 switch \u8BED\u53E5\u4E2D + compiler.err.initializer.must.be.able.to.complete.normally=\u521D\u59CB\u5316\u7A0B\u5E8F\u5FC5\u987B\u80FD\u591F\u6B63\u5E38\u5B8C\u6210 compiler.err.initializer.not.allowed=\u63A5\u53E3\u4E2D\u4E0D\u5141\u8BB8\u6709\u521D\u59CB\u5316\u7A0B\u5E8F @@ -1006,7 +1025,7 @@ compiler.misc.varargs.trustme.on.reifiable.varargs=Varargs \u5143\u7D20\u7C7B\u5 compiler.err.instanceof.reifiable.not.safe={0} \u65E0\u6CD5\u5B89\u5168\u5730\u8F6C\u6362\u4E3A {1} # 0: type, 1: type -compiler.err.instanceof.pattern.no.subtype=\u6A21\u5F0F\u7C7B\u578B {0} \u662F\u8868\u8FBE\u5F0F\u7C7B\u578B {1} \u7684\u5B50\u7C7B\u578B +compiler.err.instanceof.pattern.no.subtype=\u8868\u8FBE\u5F0F\u7C7B\u578B {0} \u662F\u6A21\u5F0F\u7C7B\u578B {1} \u7684\u5B50\u7C7B\u578B # 0: symbol compiler.misc.varargs.trustme.on.non.varargs.meth=\u65B9\u6CD5 {0} \u4E0D\u662F varargs \u65B9\u6CD5\u3002 @@ -1073,12 +1092,12 @@ compiler.err.locn.invalid.arg.for.xpatch=--patch-module \u9009\u9879\u7684\u53C2 compiler.err.file.sb.on.source.or.patch.path.for.module=\u6587\u4EF6\u5E94\u5728\u6E90\u8DEF\u5F84\u6216\u6A21\u5757\u7684\u8865\u4E01\u7A0B\u5E8F\u8DEF\u5F84\u4E2D +compiler.err.no.java.lang=\u5728\u5E73\u53F0\u7C7B\u4E2D\u627E\u4E0D\u5230\u7A0B\u5E8F\u5305 java.lang + ##### # Fatal Errors -compiler.misc.fatal.err.no.java.lang=\u81F4\u547D\u9519\u8BEF: \u5728\u7C7B\u8DEF\u5F84\u6216\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u4E2D\u627E\u4E0D\u5230\u7A0B\u5E8F\u5305 java.lang - # 0: name compiler.misc.fatal.err.cant.locate.meth=\u81F4\u547D\u9519\u8BEF: \u627E\u4E0D\u5230\u65B9\u6CD5{0} @@ -1168,19 +1187,21 @@ compiler.note.unchecked.filename.additional={0}\u8FD8\u6709\u672A\u7ECF\u68C0\u6 compiler.note.unchecked.plural.additional=\u67D0\u4E9B\u8F93\u5165\u6587\u4EF6\u8FD8\u4F7F\u7528\u4E86\u672A\u7ECF\u68C0\u67E5\u6216\u4E0D\u5B89\u5168\u7684\u64CD\u4F5C\u3002 -# 0: file name -compiler.note.preview.filename={0} \u4F7F\u7528\u9884\u89C8\u8BED\u8A00\u529F\u80FD\u3002 +# 0: file name, 1: source +compiler.note.preview.filename={0} \u4F7F\u7528 Java SE {1} \u7684\u9884\u89C8\u529F\u80FD\u3002 -compiler.note.preview.plural=\u67D0\u4E9B\u8F93\u5165\u6587\u4EF6\u4F7F\u7528\u9884\u89C8\u8BED\u8A00\u529F\u80FD\u3002 +# 0: source +compiler.note.preview.plural=\u67D0\u4E9B\u8F93\u5165\u6587\u4EF6\u4F7F\u7528 Java SE {0} \u7684\u9884\u89C8\u529F\u80FD\u3002 # The following string may appear after one of the above deprecation # messages. compiler.note.preview.recompile=\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F\uFF0C\u8BF7\u4F7F\u7528 -Xlint:preview \u91CD\u65B0\u7F16\u8BD1\u3002 -# 0: file name -compiler.note.preview.filename.additional={0} \u8FD8\u4F7F\u7528\u9884\u89C8\u8BED\u8A00\u529F\u80FD\u3002 +# 0: file name, 1: source +compiler.note.preview.filename.additional={0} \u8FD8\u4F7F\u7528 Java SE {1} \u7684\u9884\u89C8\u529F\u80FD\u3002 -compiler.note.preview.plural.additional=\u67D0\u4E9B\u8F93\u5165\u6587\u4EF6\u8FD8\u4F7F\u7528\u9884\u89C8\u8BED\u8A00\u529F\u80FD\u3002 +# 0: source +compiler.note.preview.plural.additional=\u67D0\u4E9B\u8F93\u5165\u6587\u4EF6\u8FD8\u4F7F\u7528 Java SE {0} \u7684\u9884\u89C8\u529F\u80FD\u3002 # Notes related to annotation processing @@ -1269,6 +1290,8 @@ compiler.warn.dir.path.element.not.directory=\u9519\u8BEF\u7684\u8DEF\u5F84\u514 # 0: symbol, 1: symbol, 2: symbol compiler.warn.missing-explicit-ctor=\u5BFC\u51FA\u7684\u7A0B\u5E8F\u5305 {1} \u4E2D\u7684\u7C7B {0} \u672A\u58F0\u660E\u663E\u5F0F\u6784\u9020\u5668\uFF0C\u56E0\u6B64\u5C06\u5411\u6A21\u5757 {2} \u7684\u5BA2\u6237\u673A\u516C\u5F00\u9ED8\u8BA4\u6784\u9020\u5668 +compiler.warn.strictfp=\u4ECE\u53D1\u884C\u7248 17 \u5F00\u59CB\uFF0C\u6240\u6709\u6D6E\u70B9\u8868\u8FBE\u5F0F\u90FD\u7ECF\u8FC7\u4E25\u683C\u8BA1\u7B97\uFF0C\u4E0D\u9700\u8981 ''strictfp'' + compiler.warn.finally.cannot.complete=finally \u5B50\u53E5\u65E0\u6CD5\u6B63\u5E38\u5B8C\u6210 # 0: name @@ -1284,10 +1307,13 @@ compiler.warn.has.been.deprecated={1}\u4E2D\u7684{0}\u5DF2\u8FC7\u65F6 compiler.warn.has.been.deprecated.for.removal={1} \u4E2D\u7684 {0} \u5DF2\u8FC7\u65F6, \u4E14\u6807\u8BB0\u4E3A\u5F85\u5220\u9664 # 0: symbol -compiler.warn.is.preview={0} \u662F\u67D0\u9884\u89C8\u529F\u80FD\u4E2D\u7684\u4E00\u4E2A API +compiler.warn.is.preview={0} \u662F\u9884\u89C8 API\uFF0C\u53EF\u80FD\u4F1A\u5728\u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u3002 # 0: symbol -compiler.err.is.preview={0} \u662F\u67D0\u9884\u89C8\u529F\u80FD\u4E2D\u7684\u4E00\u4E2A API +compiler.err.is.preview={0} \u662F\u9884\u89C8 API\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u5904\u4E8E\u7981\u7528\u72B6\u6001\u3002\n\uFF08\u8BF7\u4F7F\u7528 --enable-preview \u4EE5\u542F\u7528\u9884\u89C8 API\uFF09 + +# 0: symbol +compiler.warn.is.preview.reflective={0} \u662F\u53CD\u5C04\u9884\u89C8 API\uFF0C\u53EF\u80FD\u4F1A\u5728\u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u3002 # 0: symbol compiler.warn.has.been.deprecated.module=\u6A21\u5757 {0} \u5DF2\u8FC7\u65F6 @@ -1303,6 +1329,11 @@ compiler.warn.illegal.char.for.encoding=\u7F16\u7801{0}\u7684\u4E0D\u53EF\u6620\ # 0: symbol compiler.warn.improper.SVUID=\u5FC5\u987B\u5728\u7C7B{0}\u4E2D\u5C06 serialVersionUID \u58F0\u660E\u4E3A static final +compiler.warn.improper.SPF=serialPersistentFields \u5FC5\u987B\u58F0\u660E\u4E3A private static final \u624D\u80FD\u751F\u6548 + +compiler.warn.SPF.null.init=serialPersistentFields \u5982\u679C\u521D\u59CB\u5316\u4E3A\u7A7A\u503C\uFF0C\u5219\u65E0\u6548\u3002\n\u8BF7\u521D\u59CB\u5316\u4E3A\u7A7A\u6570\u7EC4\u4EE5\u6307\u793A\u6CA1\u6709\u5B57\u6BB5 + + # 0: type, 1: type compiler.warn.inexact.non-varargs.call=\u6700\u540E\u4E00\u4E2A\u53C2\u6570\u4F7F\u7528\u4E86\u4E0D\u51C6\u786E\u7684\u53D8\u91CF\u7C7B\u578B\u7684 varargs \u65B9\u6CD5\u7684\u975E varargs \u8C03\u7528; \n\u5BF9\u4E8E varargs \u8C03\u7528, \u5E94\u4F7F\u7528 {0}\n\u5BF9\u4E8E\u975E varargs \u8C03\u7528, \u5E94\u4F7F\u7528 {1}, \u8FD9\u6837\u4E5F\u53EF\u4EE5\u6291\u5236\u6B64\u8B66\u544A @@ -1315,9 +1346,67 @@ compiler.warn.unreachable.catch.1=catch \u5B50\u53E5\u65E0\u6CD5\u8BBF\u95EE\n\u # 0: symbol compiler.warn.long.SVUID=serialVersionUID \u5728\u7C7B{0}\u4E2D\u5FC5\u987B\u662F long \u7C7B\u578B +compiler.warn.OSF.array.SPF=serialPersistentFields \u7684\u7C7B\u578B\u5FC5\u987B\u4E3A java.io.ObjectStreamField[] \u624D\u80FD\u751F\u6548 + # 0: symbol compiler.warn.missing.SVUID=\u53EF\u5E8F\u5217\u5316\u7C7B{0}\u6CA1\u6709 serialVersionUID \u7684\u5B9A\u4E49 +# 0: name +compiler.warn.serializable.missing.access.no.arg.ctor=\u65E0\u6CD5\u8BBF\u95EE\u7B2C\u4E00\u4E2A\u4E0D\u53EF\u5E8F\u5217\u5316\u8D85\u7C7B {0} \u4E2D\u7684\u65E0\u53C2\u6570\u6784\u9020\u5668 + +# 0: name +compiler.warn.serial.method.not.private=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u65B9\u6CD5 {0} \u672A\u58F0\u660E\u4E3A private + +# 0: name +compiler.warn.serial.concrete.instance.method=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u65B9\u6CD5 {0} \u5FC5\u987B\u662F\u5177\u4F53\u7684\u5B9E\u4F8B\u65B9\u6CD5\u624D\u80FD\u751F\u6548\uFF0C\u65E2\u4E0D\u80FD\u662F\u62BD\u8C61\u65B9\u6CD5\u4E5F\u4E0D\u80FD\u662F\u9759\u6001\u65B9\u6CD5 + +# 0: name +compiler.warn.serial.method.static=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u65B9\u6CD5 {0} \u58F0\u660E\u4E3A static\uFF1B\u5FC5\u987B\u6539\u4E3A\u5B9E\u4F8B\u65B9\u6CD5\u624D\u80FD\u6709\u6548 + +# 0: name +compiler.warn.serial.method.no.args=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u65B9\u6CD5 {0} \u5FC5\u987B\u6CA1\u6709\u53C2\u6570\u624D\u80FD\u751F\u6548 + +# 0: name, 1: number +compiler.warn.serial.method.one.arg=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u65B9\u6CD5 {0} \u5FC5\u987B\u53EA\u6709\u4E00\u4E2A\u53C2\u6570\uFF08\u800C\u975E {1} \u4E2A\u53C2\u6570\uFF09\u624D\u80FD\u751F\u6548 + +# 0: name, 1: type, 2: type +compiler.warn.serial.method.parameter.type=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u65B9\u6CD5 {0} \u7684\u552F\u4E00\u53C2\u6570\u7684\u7C7B\u578B\u5FC5\u987B\u4E3A {1}\uFF08\u800C\u975E {2}\uFF09\u624D\u80FD\u751F\u6548 + +# 0: name, 1: type, 2: type +compiler.warn.serial.method.unexpected.return.type=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u65B9\u6CD5 {0} \u662F\u7528\u8FD4\u56DE\u7C7B\u578B {1}\uFF08\u800C\u4E0D\u662F\u9884\u671F\u7C7B\u578B {2}\uFF09\u58F0\u660E\u7684\u3002\n\u5982\u58F0\u660E\u7684\u90A3\u6837\uFF0C\u8BE5\u65B9\u6CD5\u5BF9\u5E8F\u5217\u5316\u65E0\u6548 + +# 0: name, 1: type +compiler.warn.serial.method.unexpected.exception=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u65B9\u6CD5 {0} \u58F0\u660E\u4E3A\u629B\u51FA\u610F\u5916\u7C7B\u578B {1} + +compiler.warn.ineffectual.serial.field.interface=serialPersistentFields \u5728\u63A5\u53E3\u4E2D\u65E0\u6548 + +# 0: string +compiler.warn.ineffectual.serial.field.enum=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u5B57\u6BB5 {0} \u5728\u679A\u4E3E\u7C7B\u4E2D\u65E0\u6548 + +# 0: string +compiler.warn.ineffectual.serial.method.enum=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u65B9\u6CD5 {0} \u5728\u679A\u4E3E\u7C7B\u4E2D\u65E0\u6548 + +compiler.warn.ineffectual.serial.field.record=serialPersistentFields \u5728\u8BB0\u5F55\u7C7B\u4E2D\u65E0\u6548 + +# 0: string +compiler.warn.ineffectual.serial.method.record=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u65B9\u6CD5 {0} \u5728\u8BB0\u5F55\u7C7B\u4E2D\u65E0\u6548 + +# 0: name +compiler.warn.ineffectual.serial.method.externalizable=\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u65B9\u6CD5 {0} \u5728\u53EF\u5916\u90E8\u5316\u7684\u7C7B\u4E2D\u65E0\u6548 + +compiler.warn.ineffectual.serial.field.externalizable=serialPersistentFields \u5728\u53EF\u5916\u90E8\u5316\u7684\u7C7B\u4E2D\u65E0\u6548 + +compiler.warn.externalizable.missing.public.no.arg.ctor=\u53EF\u5916\u90E8\u5316\u7684\u7C7B\u9700\u8981\u4E00\u4E2A\u516C\u5171\u7684\u65E0\u53C2\u6570\u6784\u9020\u5668 + +compiler.warn.non.serializable.instance.field=\u53EF\u5E8F\u5217\u5316\u7C7B\u7684\u975E\u77AC\u65F6\u5B9E\u4F8B\u5B57\u6BB5\u662F\u7528\u4E0D\u53EF\u5E8F\u5217\u5316\u7684\u7C7B\u578B\u58F0\u660E\u7684 + +# 0: type +compiler.warn.non.serializable.instance.field.array=\u53EF\u5E8F\u5217\u5316\u7C7B\u7684\u975E\u77AC\u65F6\u5B9E\u4F8B\u5B57\u6BB5\u662F\u7528\u5177\u6709\u4E0D\u53EF\u5E8F\u5217\u5316\u57FA\u672C\u7EC4\u4EF6\u7C7B\u578B {0} \u7684\u6570\u7EC4\u58F0\u660E\u7684 + +compiler.warn.non.private.method.weaker.access=\u5728\u63A5\u53E3\u4E2D\u58F0\u660E\u4E3A non-private \u7684\u5E8F\u5217\u5316\u76F8\u5173\u65B9\u6CD5\u5C06\u963B\u6B62\n\u5B9E\u73B0\u63A5\u53E3\u7684\u7C7B\u5C06\u65B9\u6CD5\u58F0\u660E\u4E3A private + +compiler.warn.default.ineffective=\u5B9E\u73B0\u7C7B\u7684\u5E8F\u5217\u5316\u4E0D\u4F1A\u8FD0\u884C\u63A5\u53E3\u4E2D\u4E0E\u5E8F\u5217\u5316\u76F8\u5173\u7684\u9ED8\u8BA4\u65B9\u6CD5 + # 0: symbol, 1: symbol, 2: symbol, 3: symbol compiler.warn.potentially.ambiguous.overload={1} \u4E2D\u7684 {0} \u53EF\u80FD\u4E0E {3} \u4E2D\u7684 {2} \u6DF7\u6DC6 @@ -1404,7 +1493,7 @@ compiler.warn.proc.suspicious.class.name=\u6B63\u5728\u4E3A\u540D\u79F0\u4EE5{1} compiler.warn.proc.file.create.last.round=\u5C06\u4E0D\u5BF9\u5728\u6700\u540E\u4E00\u4E2A\u5FAA\u73AF\u4E2D\u521B\u5EFA\u7684\u7C7B\u578B\u4E3A ''{0}'' \u7684\u6587\u4EF6\u8FDB\u884C\u6CE8\u91CA\u5904\u7406\u3002 # 0: string, 1: string -compiler.warn.proc.malformed.supported.string=\u5904\u7406\u7A0B\u5E8F ''{1}'' \u4E3A\u652F\u6301\u7684\u6CE8\u91CA\u7C7B\u578B\u8FD4\u56DE\u683C\u5F0F\u9519\u8BEF\u7684\u5B57\u7B26\u4E32 ''{0}'' +compiler.warn.proc.malformed.supported.string=\u5904\u7406\u7A0B\u5E8F ''{1}'' \u4E3A\u652F\u6301\u7684\u6CE8\u91CA\u63A5\u53E3\u8FD4\u56DE\u683C\u5F0F\u9519\u8BEF\u7684\u5B57\u7B26\u4E32 ''{0}'' # 0: set of string compiler.warn.proc.annotations.without.processors=\u6CA1\u6709\u5904\u7406\u7A0B\u5E8F\u8981\u4F7F\u7528\u4EE5\u4E0B\u4EFB\u4F55\u6CE8\u91CA: {0} @@ -1416,10 +1505,10 @@ compiler.warn.proc.processor.incompatible.source.version=\u6765\u81EA\u6CE8\u91C compiler.warn.proc.duplicate.option.name=\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F ''{1}'' \u8FD4\u56DE\u91CD\u590D\u7684\u652F\u6301\u7684\u9009\u9879 ''{0}'' # 0: string, 1: string -compiler.warn.proc.duplicate.supported.annotation=\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F ''{1}'' \u8FD4\u56DE\u91CD\u590D\u7684\u652F\u6301\u7684\u6CE8\u91CA\u7C7B\u578B ''{0}'' +compiler.warn.proc.duplicate.supported.annotation=\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F ''{1}'' \u8FD4\u56DE\u91CD\u590D\u7684\u53D7\u652F\u6301\u6CE8\u91CA\u63A5\u53E3 ''{0}'' # 0: string -compiler.warn.proc.redundant.types.with.wildcard=\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F ''{0}'' \u91CD\u590D\u652F\u6301 ''*'' \u548C\u5176\u4ED6\u6CE8\u91CA\u7C7B\u578B +compiler.warn.proc.redundant.types.with.wildcard=\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F ''{0}'' \u91CD\u590D\u652F\u6301 ''*'' \u548C\u5176\u4ED6\u6CE8\u91CA\u63A5\u53E3 compiler.warn.proc.proc-only.requested.no.procs=\u5728\u672A\u8BF7\u6C42\u7F16\u8BD1\u7684\u60C5\u51B5\u4E0B\u8FDB\u884C\u6CE8\u91CA\u5904\u7406, \u4F46\u627E\u4E0D\u5230\u5904\u7406\u7A0B\u5E8F\u3002 @@ -1475,6 +1564,8 @@ compiler.warn.deprecated.annotation.has.no.effect=@Deprecated \u6CE8\u91CA\u5BF9 # 0: string compiler.warn.invalid.path=\u65E0\u6548\u6587\u4EF6\u540D: {0} +compiler.warn.doclint.not.available=\u6CA1\u6709 doclint \u670D\u52A1\u63D0\u4F9B\u65B9\u53EF\u7528 + # 0: string compiler.err.invalid.path=\u65E0\u6548\u6587\u4EF6\u540D: {0} @@ -1577,8 +1668,6 @@ compiler.err.enum.constant.expected=\u6B64\u5904\u9700\u8981\u679A\u4E3E\u5E38\u compiler.err.enum.constant.not.expected=\u6B64\u5904\u4E0D\u9700\u8981\u679A\u4E3E\u5E38\u91CF ## The following are related in form, but do not easily fit the above paradigm. -compiler.err.expected.module=\u9700\u8981 ''module'' - compiler.err.expected.module.or.open=\u9700\u8981 ''module'' \u6216 ''open'' compiler.err.dot.class.expected=\u9700\u8981 ''.class'' @@ -2103,6 +2192,10 @@ compiler.misc.feature.records=\u8BB0\u5F55 compiler.misc.feature.sealed.classes=\u5BC6\u5C01\u7C7B +compiler.misc.feature.case.null=switch case \u4E2D\u7684\u7A7A\u503C + +compiler.misc.feature.pattern.switch=switch \u8BED\u53E5\u4E2D\u7684\u6A21\u5F0F + compiler.warn.underscore.as.identifier=\u4ECE\u53D1\u884C\u7248 9 \u5F00\u59CB, ''_'' \u4E3A\u5173\u952E\u5B57, \u4E0D\u80FD\u7528\u4F5C\u6807\u8BC6\u7B26 compiler.err.underscore.as.identifier=\u4ECE\u53D1\u884C\u7248 9 \u5F00\u59CB, ''_'' \u4E3A\u5173\u952E\u5B57, \u4E0D\u80FD\u7528\u4F5C\u6807\u8BC6\u7B26 @@ -2174,6 +2267,28 @@ compiler.note.deferred.method.inst=\u65B9\u6CD5 {0} \u7684\u5EF6\u8FDF\u5B9E\u4F # 0: symbol compiler.note.verbose.l2m.deduplicate=\u6B63\u5728\u5BF9 lambda \u51FD\u6570\u5B9E\u73B0\u65B9\u6CD5 {0} \u8FDB\u884C\u91CD\u590D\u6570\u636E\u5220\u9664 +######################################## +# Diagnostics for method reference search +# results used by Resolve (debug only) +######################################## + +# 0: fragment, 1: string, 2: number +compiler.note.method.ref.search.results.multi={1} \u7684 {0} \u641C\u7D22\u7ED3\u679C\uFF0C\u6709 {2} \u4E2A\n\u6700\u660E\u786E\u7684\u9002\u7528\u5019\u9009\u9879\uFF1A + +# 0: number, 1: fragment, 2: symbol +compiler.misc.applicable.method.found.2=\u627E\u5230\u7684\u7B2C {0} \u4E2A\u9002\u7528\u65B9\u6CD5\uFF1A{1} {2} + +# 0: number, 1: fragment, 2: symbol, 3: message segment +compiler.misc.applicable.method.found.3=\u627E\u5230\u7684\u7B2C {0} \u4E2A\u9002\u7528\u65B9\u6CD5\uFF1A{1} {2}\n({3}) + +compiler.misc.static=\u9759\u6001 + +compiler.misc.non.static=\u975E\u9759\u6001 + +compiler.misc.bound=\u7ED1\u5B9A + +compiler.misc.unbound=\u672A\u7ED1\u5B9A + ######################################## # Diagnostics for where clause implementation # used by the RichDiagnosticFormatter. @@ -2260,7 +2375,7 @@ compiler.err.dc.no.tag.name='@' \u540E\u6CA1\u6709\u6807\u8BB0\u540D compiler.err.dc.gt.expected=\u9700\u8981 ''>'' -compiler.err.dc.ref.bad.parens=\u5F15\u7528\u4E2D\u7F3A\u5C11 '')'' +compiler.err.dc.ref.bad.parens=\u62EC\u53F7\u4E4B\u540E\u51FA\u73B0\u610F\u5916\u7684\u6587\u672C compiler.err.dc.ref.syntax.error=\u5F15\u7528\u4E2D\u51FA\u73B0\u8BED\u6CD5\u9519\u8BEF @@ -2274,6 +2389,8 @@ compiler.err.dc.unterminated.signature=\u672A\u7EC8\u6B62\u7684\u7B7E\u540D compiler.err.dc.unterminated.string=\u672A\u7EC8\u6B62\u7684\u5B57\u7B26\u4E32 +compiler.err.dc.ref.annotations.not.allowed=\u4E0D\u5141\u8BB8\u4F7F\u7528\u6CE8\u91CA + ### # errors related to modules @@ -2450,8 +2567,6 @@ compiler.err.illegal.argument.for.option={0} \u7684\u53C2\u6570\u975E\u6CD5: {1} compiler.err.match.binding.exists=\u5C1D\u8BD5\u91CD\u65B0\u5B9A\u4E49\u73B0\u6709\u7684\u5339\u914D\u7ED1\u5B9A\uFF0C\u8FD9\u662F\u975E\u6CD5\u7684 -compiler.err.switch.null.not.allowed=case \u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u7A7A\u6807\u7B7E - compiler.err.switch.case.unexpected.statement=case \u4E2D\u5B58\u5728\u610F\u5916\u8BED\u53E5\uFF0C\u5E94\u4E3A\u8868\u8FBE\u5F0F\u3001\u5757\u6216\u629B\u51FA\u8BED\u53E5 compiler.err.switch.mixing.case.types=\u5728 switch \u4E2D\u4F7F\u7528\u4E86\u4E0D\u540C case \u7C7B\u578B @@ -2664,5 +2779,7 @@ compiler.err.preview.not.latest=\u6E90\u53D1\u884C\u7248 {0} \u4E0E --enable-pre compiler.err.preview.without.source.or.release=--enable-preview \u5FC5\u987B\u4E0E -source \u6216 --release \u4E00\u8D77\u4F7F\u7528 -compiler.warn.attempt.to.synchronize.on.instance.of.value.based.class=\u5C1D\u8BD5\u5728\u57FA\u4E8E\u503C\u7684\u7C7B\u7684\u5B9E\u4F8B\u4E0A\u540C\u6B65 +# 0: kind name, 1: symbol +compiler.warn.declared.using.preview={0} {1} \u662F\u4F7F\u7528\u9884\u89C8\u529F\u80FD\u58F0\u660E\u7684\uFF0C\u53EF\u80FD\u4F1A\u5728\u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u3002 +compiler.warn.attempt.to.synchronize.on.instance.of.value.based.class=\u5C1D\u8BD5\u5728\u57FA\u4E8E\u503C\u7684\u7C7B\u7684\u5B9E\u4F8B\u4E0A\u540C\u6B65 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties new file mode 100644 index 0000000000000000000000000000000000000000..85b76234891ba3d2a6798ac2255db83282a65207 --- /dev/null +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties @@ -0,0 +1,228 @@ +# +# Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute 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. +# + +## standard options + +javac.opt.g=Generiert alle Debugginginformationen +javac.opt.g.none=Generiert keine Debugginginformationen +javac.opt.g.lines.vars.source=Generiert nur einige Debugginginformationen +javac.opt.nowarn=Generiert keine Warnungen +javac.opt.verbose=Gibt Nachrichten zu den Compilervorg\u00E4ngen aus +javac.opt.deprecation=Gibt Quellspeicherorte aus, wo veraltete APIs verwendet werden +javac.opt.classpath=Gibt an, wo sich die Benutzerklassendateien und Annotationsprozessoren befinden +javac.opt.modulepath=Gibt an, wo sich die Anwendungsmodule befinden +javac.opt.sourcepath=Gibt an, wo sich die Eingabequelldateien befinden +javac.opt.m=Kompiliert nur die angegebenen Module und pr\u00FCft die Zeitstempel +javac.opt.modulesourcepath=Gib an, wo sich die Eingabequelldateien f\u00FCr mehrere Module befinden +javac.opt.bootclasspath=Setzt den Speicherort der Bootstrap-Klassendateien au\u00DFer Kraft +javac.opt.system=Setzt den Speicherort der Systemmodule au\u00DFer Kraft +javac.opt.upgrademodulepath=Setzt den Speicherort der upgradef\u00E4higen Module au\u00DFer Kraft +javac.opt.endorseddirs=Setzt den Speicherort der unterst\u00FCtzten Standardpfade au\u00DFer Kraft +javac.opt.extdirs=Setzt den Speicherort der installierten Erweiterungen au\u00DFer Kraft +javac.opt.processorpath=Gibt an, wo sich die Annotationsprozessoren befinden +javac.opt.processormodulepath=Gibt einen Modulpfad an, wo sich die Annotationsprozessoren befinden +javac.opt.processor=Namen der auszuf\u00FChrenden Annotationsprozessoren; Standard-Discovery-Prozess wird umgangen +javac.opt.parameters=Generiert Metadaten zur Reflexion auf Methodenparameter +javac.opt.proc.none.only=Steuert, wo die Verarbeitung von Annotationen und/oder die Kompilierung ausgef\u00FChrt wird +javac.opt.d=Gibt an, wo generierte Klassendateien abgelegt werden +javac.opt.sourceDest=Gibt an, wo generierte Quelldateien abgelegt werden +javac.opt.headerDest=Gibt an, wo generierte native Headerdateien abgelegt werden +javac.opt.J=\u00DCbergibt direkt an das Laufzeitsystem +javac.opt.encoding=Gibt die von den Quelldateien verwendete Zeichencodierung an +javac.opt.profile=Vergewissern Sie sich, dass die verwendete API im angegebenen Profil verf\u00FCgbar ist +javac.opt.target=Generiert Klassendateien, die sich f\u00FCr das angegebene Java SE-Release eignen. Unterst\u00FCtzte Releases: {0} +javac.opt.release=Kompiliert f\u00FCr das angegebene Java SE-Release. Unterst\u00FCtzte Releases: {0} +javac.opt.source=Liefert Quellkompatibilit\u00E4t mit dem angegebenen Release von Java SE. Unterst\u00FCtzte Releases: {0} +javac.opt.Werror=Kompilierung beenden, wenn Warnungen auftreten +javac.opt.A=Optionen zur \u00DCbergabe an die Annotationsprozessoren +javac.opt.implicit=Gibt an, ob Klassendateien f\u00FCr implizit referenzierte Dateien generiert werden oder nicht +javac.opt.pkginfo=Gibt an, wie package-info-Dateien behandelt werden sollen +javac.opt.multi-release=Gibt an, welches Release in Multi-Release-JAR-Dateien verwendet werden soll +javac.opt.arg.class= +javac.opt.arg.class.list=[,,...] +javac.opt.arg.flag= +javac.opt.arg.key.equals.value=key[=value] +javac.opt.arg.path= +javac.opt.arg.mspath= +javac.opt.arg.m=(,)* +javac.opt.arg.jdk=|none +javac.opt.arg.dirs= +javac.opt.arg.directory= +javac.opt.arg.encoding= +javac.opt.arg.profile= +javac.opt.arg.release= +javac.opt.arg.release= +javac.opt.arg.number= +javac.opt.plugin=Der Name und optional die Argumente f\u00FCr die Ausf\u00FChrung eines Plug-ins +javac.opt.arg.plugin="name args" +javac.opt.arg.multi-release= +javac.opt.arg.default.module.for.created.files= + +## extended options + +javac.opt.maxerrs=Legt die maximale Anzahl der zu auszugebenden Fehler fest +javac.opt.maxwarns=Legt die maximale Anzahl der auszugebenden Warnungen fest +javac.opt.nogj=Akzeptiert keine Generics in der Sprache +javac.opt.moreinfo=Gibt erweiterte Informationen f\u00FCr Typvariablen aus +javac.opt.printsearch=Gibt Informationen dazu aus, wo Klassendateien gesucht werden +javac.opt.prompt=Stoppt nach jedem Fehler +javac.opt.s=Gibt Java-Quellen statt Klassendateien aus +javac.opt.version=Versionsinformationen +javac.opt.arg.pathname= +javac.opt.arg.file= +javac.opt.Xbootclasspath.p=Dem Bootstrap Classpath voranstellen +javac.opt.Xbootclasspath.a=An Bootstrap Classpath anh\u00E4ngen +javac.opt.Xlint=Aktiviert die empfohlenen Warnungen +javac.opt.Xlint.all=Alle Warnungen aktivieren +javac.opt.Xlint.none=Alle Warnungen deaktivieren +#L10N: do not localize: -Xlint +javac.opt.arg.Xlint=(,)* +javac.opt.Xlint.custom=Warnungen, die aktiviert oder deaktiviert werden sollen, durch Komma getrennt.\nStellen Sie einem Schl\u00FCssel "-" voran, um die angegebene Warnung zu deaktivieren.\nVerwenden Sie --help-lint, um die unterst\u00FCtzten Schl\u00FCssel zu sehen. +javac.opt.Xlint.desc.auxiliaryclass=Warnt vor Auxiliary-Klassen, die in einer Quelldatei verborgen sind und aus anderen Dateien heraus verwendet werden. + +javac.opt.Xlint.desc.cast=Warnt vor unn\u00F6tigen Umwandlungen mit Cast. + +javac.opt.Xlint.desc.classfile=Warnt vor Problemen im Zusammenhang mit Klassendateiinhalten. + +javac.opt.Xlint.desc.missing-explicit-ctor=Warnt vor fehlenden expliziten Konstruktoren in \u00F6ffentlichen und gesch\u00FCtzten Klassen in exportierten Packages. + +javac.opt.Xlint.desc.deprecation=Warnt vor der Verwendung veralteter Elemente. + +javac.opt.Xlint.desc.dep-ann=Warnt vor Elementen, die in JavaDoc als veraltet markiert sind, jedoch nicht mit der Annotation @Deprecated versehen sind. + +javac.opt.Xlint.desc.divzero=Warnt vor Division durch Ganzzahlkonstante 0. + +javac.opt.Xlint.desc.empty=Warnt vor leerer Anweisung nach "if". + +javac.opt.Xlint.desc.exports=Warnt vor Problemen in Bezug auf Modulexporte. + +javac.opt.Xlint.desc.fallthrough=Warnt vor Weitergabe von einem Case einer Switch-Anweisung zum n\u00E4chsten. + +javac.opt.Xlint.desc.finally=Warnt vor Finally-Klauseln, die nicht normal beendet werden. + +javac.opt.Xlint.desc.module=Warnt vor Problemen im Zusammenhang mit dem Modulsystem. + +javac.opt.Xlint.desc.opens=Warnt vor Problemen in Bezug auf Modul\u00F6ffnungen. + +javac.opt.Xlint.desc.options=Warnt vor Problemen im Zusammenhang mit der Verwendung von Befehlszeilenoptionen. + +javac.opt.Xlint.desc.overloads=Warnt vor Problemen in Bezug auf Methoden\u00FCberladung. + +javac.opt.Xlint.desc.overrides=Warnt vor Problemen in Bezug auf Methodenau\u00DFerkraftsetzung. + +javac.opt.Xlint.desc.path=Warnt vor ung\u00FCltigen Pfadelementen in der Befehlszeile. + +javac.opt.Xlint.desc.processing=Warnt vor Problemen in Bezug auf die Annotationsverarbeitung. + +javac.opt.Xlint.desc.rawtypes=Warnt vor der Verwendung von Raw-Typen. + +javac.opt.Xlint.desc.removal=Warnt vor der Verwendung einer API, die zum Entfernen markiert wurde. + +javac.opt.Xlint.desc.requires-automatic=Warnt vor der Verwendung automatischer Module in den "Requires"-Klauseln. + +javac.opt.Xlint.desc.requires-transitive-automatic=Warnt vor automatischen Modulen in "requires transitive". + +javac.opt.Xlint.desc.serial=Warnt vor serialisierbaren Klassen, die kein serialVersionUID-Feld haben. \n Warnt auch vor anderen verd\u00E4chtigen Deklarationen in serialisierbaren und externalisierbaren Klassen und Schnittstellen. + +javac.opt.Xlint.desc.static=Warnt vor Zugriff auf ein statisches Mitglied mit einer Instanz. + +javac.opt.Xlint.desc.strictfp=Warnt vor unn\u00F6tiger Verwendung des strictfp-Modifizierers. + +javac.opt.Xlint.desc.text-blocks=Warnt vor inkonsistenten Leerzeichen in Textblockeinr\u00FCckung. + +javac.opt.Xlint.desc.try=Warnt vor Problemen im Zusammenhang mit try-Bl\u00F6cken (d.h. try-with-resources). + +javac.opt.Xlint.desc.unchecked=Warnt vor deaktivierten Vorg\u00E4ngen. + +javac.opt.Xlint.desc.varargs=Warnt vor m\u00F6glicherweise nicht sicheren vararg-Methoden. + +javac.opt.Xlint.desc.preview=Warnt vor Verwendung von Vorschausprachfeatures. + +javac.opt.Xlint.desc.synchronization=Warnt vor Synchronisierungsversuchen mit Instanzen wertbasierter Klassen. + +javac.opt.Xdoclint=Empfohlene Pr\u00FCfungen f\u00FCr Probleme in javadoc-Kommentaren aktivieren +# L10N: do not localize: all none +javac.opt.Xdoclint.subopts = (all|none|[-])[/] + +# L10N: do not localize: accessibility html missing reference syntax +# L10N: do not localize: public protected package private +javac.opt.Xdoclint.custom=Aktiviert oder deaktiviert bestimmte Pr\u00FCfungen auf Probleme in javadoc-Kommentaren,\nwobei f\u00FCr accessibility, html, missing, reference oder syntax\nund f\u00FCr public, protected, package oder private steht. + +javac.opt.Xdoclint.package.args = [-](,[-])* + +javac.opt.Xdoclint.package.desc=Aktiviert oder deaktiviert Pr\u00FCfungen in bestimmten Packages. Jedes ist entweder der\nqualifizierte Name eines Packages oder ein Namenspr\u00E4fix, gefolgt von ".*", und bezieht sich auf\nalle Subpackages des angegebenen Packages. Jedem Package kann \nvorangestellt werden, um Pr\u00FCfungen f\u00FCr die angegebenen Packages zu deaktivieren. + +javac.opt.Xstdout=Leitet die Standardausgabe um +javac.opt.X=Gibt Hilfe zu zus\u00E4tzlichen Optionen aus +javac.opt.help=Gibt diese Hilfemeldung aus +javac.opt.help.lint=Gibt die unterst\u00FCtzten Schl\u00FCssel f\u00FCr -Xlint aus +javac.opt.help.lint.header=Die unterst\u00FCtzten Schl\u00FCssel f\u00FCr -Xlint sind: +javac.opt.print=Gibt eine Textdarstellung der angegebenen Typen aus +javac.opt.printRounds=Gibt Informationen zu Durchl\u00E4ufen der Annotationsverarbeitung aus +javac.opt.printProcessorInfo=Gibt Informationen dazu aus, welche Annotationen ein Prozessor verarbeiten soll +javac.opt.userpathsfirst=Durchsucht classpath und sourcepath vor anstatt nach bootclasspath nach Klassen +javac.opt.prefer=Gibt an, welche Datei gelesen werden soll, wenn sowohl eine Quell- als auch eine Klassendatei f\u00FCr eine implizit kompilierte Klasse gefunden werden +javac.opt.preview=Aktiviert Vorschausprachfeatures. Wird in Verbindung mit -source oder --release verwendet. +javac.opt.AT=Liest Optionen und Dateinamen aus Datei +javac.opt.diags=W\u00E4hlt einen Diagnosemodus aus +javac.opt.addExports=Gibt an, dass ein Package als aus seinem definierenden Modul in weitere Module oder, wenn\n ALL-UNNAMED lautet, in alle unbenannten Module exportiert betrachtet werden soll. +javac.opt.arg.addExports=/=(,)* +javac.opt.addReads=Gibt weitere Module an, die als von einem gegebenen Modul angefordert betrachtet werden sollen.\n kann ALL-UNNAMED lauten, um das unbenannte Modul anzufordern. +javac.opt.arg.addReads==(,)* +javac.opt.patch=Setzt ein Modul au\u00DFer Kraft oder erweitert es mit Klassen und Ressourcen\nin JAR-Dateien oder Verzeichnissen +javac.opt.arg.patch==(:)* +javac.opt.addmods=Root-Module, die zus\u00E4tzlich zu den anf\u00E4nglichen Modulen aufgel\u00F6st werden sollen, oder alle Module\nim Modulpfad, wenn ALL-MODULE-PATH lautet. +javac.opt.arg.addmods=(,)* +javac.opt.limitmods=Begrenzt die Gesamtzahl der beobachtbaren Module +javac.opt.arg.limitmods=(,)* +javac.opt.module.version=Gibt die Version der Module an, die kompiliert werden +javac.opt.arg.module.version= +javac.opt.inherit_runtime_environment=Vererbt Modulsystemkonfigurationsoptionen aus der Laufzeitumgebung. +javac.opt.default.module.for.created.files=Fallback-Zielmodul f\u00FCr Dateien, die von Annotationsprozessoren erstellt werden, falls keines angegeben ist oder abgeleitet werden kann. + +## messages + +javac.msg.usage.header=Verwendung: {0} ,\nwobei folgende Optionen m\u00F6glich sind: + +javac.msg.usage=Verwendung: {0} \nMit --help k\u00F6nnen Sie eine Liste der m\u00F6glichen Optionen aufrufen + +javac.msg.usage.nonstandard.footer=Diese zus\u00E4tzlichen Optionen k\u00F6nnen jederzeit ohne vorherige Ank\u00FCndigung ge\u00E4ndert werden. + +javac.msg.bug=Im Compiler ({0}) ist eine Ausnahme aufgetreten. Erstellen Sie auf der Java-Seite zum Melden von Bugs (http://bugreport.java.com) einen Bugbericht, nachdem Sie die Bugdatenbank (http://bugs.java.com) auf Duplikate gepr\u00FCft haben. Geben Sie in Ihrem Bericht Ihr Programm, die folgende Diagnose und die Parameter an, die Sie dem Java-Compiler \u00FCbergeben haben. Vielen Dank. + +javac.msg.io=\n\nEin Eingabe-/Ausgabefehler ist aufgetreten.\nDetails finden Sie im folgenden Stacktrace.\n + +javac.msg.proc.annotation.uncaught.exception=\n\nEin Annotationsprozessor hat eine nicht abgefangene Ausnahme ausgel\u00F6st.\nDetails finden Sie im folgenden Stacktrace.\n + +javac.msg.plugin.uncaught.exception=\n\nEin Plug-in hat eine nicht abgefangene Ausnahme ausgel\u00F6st.\nDetails finden Sie im folgenden Stacktrace.\n + +javac.msg.resource=\n\nDas System hat keine Ressourcen mehr.\nDetails finden Sie im folgenden Stacktrace.\n + +javac.version={0} {1} +javac.fullVersion={0} Vollversion "{1}" + +javac.msg.parameters.output=Ausgabe von javac-Parametern an: {0} + +javac.msg.parameters.output.error=Fehler beim Versuch, javac-Parameter auszugeben an: {0}. Die Parameter folgen: diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties index 231bbc69df87b0e173c95a3a98c377c0cef46f3b..0628340ea2b8ce7bcc0ec122db90044df6f9828e 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties @@ -99,7 +99,7 @@ javac.opt.Xlint.all=\u3059\u3079\u3066\u306E\u8B66\u544A\u3092\u6709\u52B9\u306B javac.opt.Xlint.none=\u3059\u3079\u3066\u306E\u8B66\u544A\u3092\u7121\u52B9\u306B\u3057\u307E\u3059 #L10N: do not localize: -Xlint javac.opt.arg.Xlint=(,)* -javac.opt.Xlint.custom=\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3059\u308B\u8B66\u544A(\u30AB\u30F3\u30DE\u533A\u5207\u308A)\u3002\n \u6307\u5B9A\u3057\u305F\u8B66\u544A\u3092\u7121\u52B9\u306B\u3059\u308B\u306B\u306F\u3001\u30AD\u30FC\u306E\u524D\u306B'-'\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\n \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30AD\u30FC\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059: +javac.opt.Xlint.custom=\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3059\u308B\u8B66\u544A(\u30AB\u30F3\u30DE\u533A\u5207\u308A)\u3002\n\u6307\u5B9A\u3057\u305F\u8B66\u544A\u3092\u7121\u52B9\u306B\u3059\u308B\u306B\u306F\u3001\u30AD\u30FC\u306E\u524D\u306B'-'\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\n\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30AD\u30FC\u3092\u8868\u793A\u3059\u308B\u306B\u306F--help-lint\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 javac.opt.Xlint.desc.auxiliaryclass=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u975E\u8868\u793A\u306B\u306A\u3063\u3066\u3044\u308B\u304C\u4ED6\u306E\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u88DC\u52A9\u30AF\u30E9\u30B9\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 javac.opt.Xlint.desc.cast=\u4E0D\u8981\u306A\u30AD\u30E3\u30B9\u30C8\u306E\u4F7F\u7528\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 @@ -144,10 +144,12 @@ javac.opt.Xlint.desc.requires-automatic=requires\u53E5\u5185\u306E\u81EA\u52D5\u javac.opt.Xlint.desc.requires-transitive-automatic=requires transitive\u5185\u306E\u81EA\u52D5\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 -javac.opt.Xlint.desc.serial=\u30B7\u30EA\u30A2\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3ID\u3092\u6307\u5B9A\u3057\u306A\u3044\u76F4\u5217\u5316\u53EF\u80FD\u306A\u30AF\u30E9\u30B9\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 \n \u307E\u305F\u3001\u76F4\u5217\u5316\u53EF\u80FD\u8981\u7D20\u304B\u3089public\u4EE5\u5916\u306E\u30E1\u30F3\u30D0\u30FC\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 +javac.opt.Xlint.desc.serial=serialVersionUID\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u306A\u3044\u76F4\u5217\u5316\u53EF\u80FD\u30AF\u30E9\u30B9\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 \n \u76F4\u5217\u5316\u53EF\u80FD\u304A\u3088\u3073\u5916\u90E8\u5316\u53EF\u80FD\u30AF\u30E9\u30B9\u3068\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306E\u4ED6\u306E\u8981\u6CE8\u610F\u5BA3\u8A00\u306B\u3064\u3044\u3066\u3082\u8B66\u544A\u3057\u307E\u3059\u3002 javac.opt.Xlint.desc.static=\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u4F7F\u7528\u3057\u305Fstatic\u30E1\u30F3\u30D0\u30FC\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 +javac.opt.Xlint.desc.strictfp=strictfp\u4FEE\u98FE\u5B50\u306E\u4E0D\u8981\u306A\u4F7F\u7528\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 + javac.opt.Xlint.desc.text-blocks=\u30C6\u30AD\u30B9\u30C8\u30FB\u30D6\u30ED\u30C3\u30AF\u30FB\u30A4\u30F3\u30C7\u30F3\u30C8\u5185\u306E\u4E00\u8CAB\u6027\u306E\u306A\u3044\u7A7A\u767D\u6587\u5B57\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 javac.opt.Xlint.desc.try=try\u30D6\u30ED\u30C3\u30AF(try-with-resources\u306A\u3069)\u306E\u4F7F\u7528\u306B\u95A2\u3059\u308B\u554F\u984C\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 @@ -172,11 +174,11 @@ javac.opt.Xdoclint.package.args = [-](,[-])* javac.opt.Xdoclint.package.desc=\u7279\u5B9A\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059\u3002\u5404\u306F\u3001\n\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u4FEE\u98FE\u3055\u308C\u305F\u540D\u524D\u3001\u307E\u305F\u306F\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u306E\u63A5\u982D\u8F9E\u306E\u5F8C\u306B''.*''\u3092\u6307\u5B9A\n(\u6307\u5B9A\u3057\u305F\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u3059\u3079\u3066\u306E\u30B5\u30D6\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u62E1\u5F35)\u3057\u305F\u3082\u306E\u3067\u3059\u3002\u5404\u306E\u524D\u306B\n'-'\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u6307\u5B9A\u3057\u305F1\u3064\u4EE5\u4E0A\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u95A2\u3059\u308B\u30C1\u30A7\u30C3\u30AF\u3092\u7121\u52B9\u306B\u3067\u304D\u307E\u3059\u3002 -javac.opt.doclint.format=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30B3\u30E1\u30F3\u30C8\u306E\u5F62\u5F0F\u3092\u6307\u5B9A\u3057\u307E\u3059 - javac.opt.Xstdout=\u6A19\u6E96\u51FA\u529B\u3092\u30EA\u30C0\u30A4\u30EC\u30AF\u30C8\u3059\u308B javac.opt.X=\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3057\u307E\u3059 javac.opt.help=\u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3057\u307E\u3059 +javac.opt.help.lint=-Xlint\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30AD\u30FC\u3092\u51FA\u529B\u3057\u307E\u3059 +javac.opt.help.lint.header=-Xlint\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30AD\u30FC\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059: javac.opt.print=\u6307\u5B9A\u3057\u305F\u578B\u306E\u30C6\u30AD\u30B9\u30C8\u8868\u793A\u3092\u51FA\u529B\u3059\u308B javac.opt.printRounds=\u6CE8\u91C8\u51E6\u7406\u306E\u5F80\u5FA9\u306B\u3064\u3044\u3066\u306E\u60C5\u5831\u3092\u5370\u5237\u3059\u308B javac.opt.printProcessorInfo=\u30D7\u30ED\u30BB\u30C3\u30B5\u304C\u51E6\u7406\u3092\u4F9D\u983C\u3055\u308C\u308B\u6CE8\u91C8\u306B\u3064\u3044\u3066\u306E\u60C5\u5831\u3092\u5370\u5237\u3059\u308B diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties index 3160e9486397de6f092c0746b998d1c0d64ff5a9..0fa374e3f65b4ac5f6fcba1ddae8e2185d55bd62 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties @@ -99,7 +99,7 @@ javac.opt.Xlint.all=\u542F\u7528\u6240\u6709\u8B66\u544A javac.opt.Xlint.none=\u7981\u7528\u6240\u6709\u8B66\u544A #L10N: do not localize: -Xlint javac.opt.arg.Xlint=<\u5BC6\u94A5>(,<\u5BC6\u94A5>)* -javac.opt.Xlint.custom=\u8981\u542F\u7528\u6216\u7981\u7528\u7684\u8B66\u544A, \u4F7F\u7528\u9017\u53F7\u5206\u9694\u3002\n \u5728\u5173\u952E\u5B57\u524D\u9762\u52A0\u4E0A '-' \u53EF\u7981\u7528\u6307\u5B9A\u7684\u8B66\u544A\u3002\n \u652F\u6301\u7684\u5173\u952E\u5B57\u5305\u62EC: +javac.opt.Xlint.custom=\u8981\u542F\u7528\u6216\u7981\u7528\u7684\u8B66\u544A\uFF0C\u4F7F\u7528\u9017\u53F7\u5206\u9694\u3002\n\u5728\u5173\u952E\u5B57\u524D\u9762\u52A0\u4E0A '-' \u53EF\u7981\u7528\u6307\u5B9A\u7684\u8B66\u544A\u3002\n\u4F7F\u7528 --help-lint \u53EF\u67E5\u770B\u53D7\u652F\u6301\u7684\u5173\u952E\u5B57\u3002 javac.opt.Xlint.desc.auxiliaryclass=\u6709\u5173\u8F85\u52A9\u7C7B\u5728\u6E90\u6587\u4EF6\u4E2D\u9690\u85CF, \u4F46\u5728\u5176\u4ED6\u6587\u4EF6\u4E2D\u4F7F\u7528\u7684\u8B66\u544A\u3002 javac.opt.Xlint.desc.cast=\u6709\u5173\u4F7F\u7528\u4E86\u4E0D\u5FC5\u8981\u8F6C\u6362\u7684\u8B66\u544A\u3002 @@ -144,10 +144,12 @@ javac.opt.Xlint.desc.requires-automatic=\u6709\u5173\u5728 requires \u5B50\u53E5 javac.opt.Xlint.desc.requires-transitive-automatic=\u6709\u5173 requires \u8FC7\u6E21\u4E2D\u7684\u81EA\u52A8\u6A21\u5757\u7684\u8B66\u544A\u3002 -javac.opt.Xlint.desc.serial=\u6709\u5173\u672A\u63D0\u4F9B\u5E8F\u5217\u7248\u672C ID \u7684\u53EF\u5E8F\u5217\u5316\u7C7B\u7684\u8B66\u544A\u3002\n \u6B64\u5916\u8FD8\u8B66\u544A\u6709\u5173\u53EF\u4E32\u884C\u5316\u5143\u7D20\u5BF9\u975E\u516C\u5171\u6210\u5458\u7684\u8BBF\u95EE\u3002 +javac.opt.Xlint.desc.serial=\u6709\u5173\u6CA1\u6709 serialVersionUID \u5B57\u6BB5\u7684\u53EF\u5E8F\u5217\u5316\u7C7B\u7684\u8B66\u544A\u3002\n \u4EE5\u53CA\u6709\u5173\u53EF\u5E8F\u5217\u5316\u548C\u53EF\u5916\u90E8\u5316\u7684\u7C7B\u548C\u63A5\u53E3\u4E2D\u5176\u4ED6\u53EF\u7591\u58F0\u660E\u7684\u8B66\u544A\u3002 javac.opt.Xlint.desc.static=\u6709\u5173\u4F7F\u7528\u5B9E\u4F8B\u6765\u8BBF\u95EE\u9759\u6001\u6210\u5458\u7684\u8B66\u544A\u3002 +javac.opt.Xlint.desc.strictfp=\u6709\u5173\u4E0D\u5FC5\u8981\u5730\u4F7F\u7528\u4E86 strictfp \u4FEE\u9970\u7B26\u7684\u8B66\u544A\u3002 + javac.opt.Xlint.desc.text-blocks=\u6709\u5173\u6587\u672C\u5757\u7F29\u8FDB\u4E2D\u7684\u7A7A\u683C\u5B57\u7B26\u4E0D\u4E00\u81F4\u7684\u8B66\u544A\u3002 javac.opt.Xlint.desc.try=\u6709\u5173\u4E0E\u4F7F\u7528 try \u5757 (\u4F8B\u5982 try-with-resources) \u76F8\u5173\u7684\u95EE\u9898\u7684\u8B66\u544A\u3002 @@ -172,11 +174,11 @@ javac.opt.Xdoclint.package.args = [-]<\u7A0B\u5E8F\u5305>(,[-]<\u7A0B\u5E8F\u530 javac.opt.Xdoclint.package.desc=\u5728\u7279\u5B9A\u7684\u7A0B\u5E8F\u5305\u4E2D\u542F\u7528\u6216\u7981\u7528\u68C0\u67E5\u3002\u6BCF\u4E2A <\u7A0B\u5E8F\u5305> \u662F\n\u7A0B\u5E8F\u5305\u7684\u9650\u5B9A\u540D\u79F0, \u6216\u7A0B\u5E8F\u5305\u540D\u79F0\u524D\u7F00\u540E\u8DDF '.*', \n\u5B83\u6269\u5C55\u5230\u7ED9\u5B9A\u7A0B\u5E8F\u5305\u7684\u6240\u6709\u5B50\u7A0B\u5E8F\u5305\u3002\u5728\u6BCF\u4E2A <\u7A0B\u5E8F\u5305>\n\u524D\u9762\u52A0\u4E0A '-' \u53EF\u4EE5\u4E3A\u6307\u5B9A\u7A0B\u5E8F\u5305\u7981\u7528\u68C0\u67E5\u3002 -javac.opt.doclint.format=\u6307\u5B9A\u6587\u6863\u6CE8\u91CA\u7684\u683C\u5F0F - javac.opt.Xstdout=\u91CD\u5B9A\u5411\u6807\u51C6\u8F93\u51FA javac.opt.X=\u8F93\u51FA\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9 javac.opt.help=\u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F +javac.opt.help.lint=\u8F93\u51FA -Xlint \u652F\u6301\u7684\u5173\u952E\u5B57 +javac.opt.help.lint.header=-Xlint \u652F\u6301\u7684\u5173\u952E\u5B57\u5305\u62EC\uFF1A javac.opt.print=\u8F93\u51FA\u6307\u5B9A\u7C7B\u578B\u7684\u6587\u672C\u8868\u793A javac.opt.printRounds=\u8F93\u51FA\u6709\u5173\u6CE8\u91CA\u5904\u7406\u5FAA\u73AF\u7684\u4FE1\u606F javac.opt.printProcessorInfo=\u8F93\u51FA\u6709\u5173\u8BF7\u6C42\u5904\u7406\u7A0B\u5E8F\u5904\u7406\u54EA\u4E9B\u6CE8\u91CA\u7684\u4FE1\u606F diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/launcher_de.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/launcher_de.properties new file mode 100644 index 0000000000000000000000000000000000000000..a5796a168dfee0905f7634e5ffbdcfa2d1ab7bae --- /dev/null +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/launcher_de.properties @@ -0,0 +1,117 @@ +# +# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Messages in this file which use "placeholders" for values (e.g. {0}, {1}) +# are preceded by a stylized comment describing the type of the corresponding +# values. +# The simple types currently in use are: +# +# annotation annotation compound +# boolean true or false +# diagnostic a sub-message; see compiler.misc.* +# fragment similar to 'message segment', but with more specific type +# modifier a Java modifier; e.g. public, private, protected +# file a file URL +# file object a file URL - similar to 'file' but typically used for source/class files, hence more specific +# flag a Flags.Flag instance +# name a name, typically a Java identifier +# number an integer +# option name the name of a command line option +# source version a source version number, such as 1.5, 1.6, 1.7 +# string a general string +# symbol the name of a declared type +# symbol kind the kind of a symbol (i.e. method, variable) +# kind name an informative description of the kind of a declaration; see compiler.misc.kindname.* +# token the name of a non-terminal in source code; see compiler.misc.token.* +# type a Java type; e.g. int, X, X +# object a Java object (unspecified) +# unused the value is not used in this message +# +# The following compound types are also used: +# +# collection of X a comma-separated collection of items; e.g. collection of type +# list of X a comma-separated list of items; e.g. list of type +# set of X a comma-separated set of items; e.g. set of modifier +# +# These may be composed: +# +# list of type or message segment +# +# The following type aliases are supported: +# +# message segment --> diagnostic or fragment +# file name --> file, path or file object +# +# Custom comments are supported in parenthesis i.e. +# +# number (classfile major version) +# +# These comments are used internally in order to generate an enum-like class declaration containing +# a method/field for each of the diagnostic keys listed here. Those methods/fields can then be used +# by javac code to build diagnostics in a type-safe fashion. +# +# In addition, these comments are verified by the jtreg test test/tools/javac/diags/MessageInfo, +# using info derived from the collected set of examples in test/tools/javac/diags/examples. +# MessageInfo can also be run as a standalone utility providing more facilities +# for manipulating this file. For more details, see MessageInfo.java. + +## All errors are preceded by this string. +launcher.error=Fehler: + +launcher.err.no.args=kein Pfad f\u00FCr Quelldatei + +# 0: string +launcher.err.invalid.filename=ung\u00FCltiger Pfad f\u00FCr Quelldatei: {0} + +# 0: path +launcher.err.file.not.found=Quelldatei nicht gefunden: {0} + +launcher.err.compilation.failed=Kompilierung nicht erfolgreich + +launcher.err.no.class=keine Klasse deklariert in Quelldatei + +launcher.err.main.not.public.static=Methode "main" ist nicht als "public static" deklariert + +launcher.err.main.not.void=Methode "main" ist nicht mit R\u00FCckgabetyp "void" deklariert + +# 0: string +launcher.err.cant.find.class=Klasse nicht gefunden: {0} + +# 0: string +launcher.err.cant.find.main.method=Methode "main(String[])" nicht gefunden in Klasse: {0} + +# 0: string +launcher.err.cant.access.main.method=kein Zugriff auf Methode "main" in Klasse: {0} + +# 0: path, 1: object +launcher.err.cant.read.file=Fehler beim Lesen von Quelldatei {0}: {1} + +# 0: string +launcher.err.no.value.for.option=kein Wert angegeben f\u00FCr Option: {0} + +# 0: string +launcher.err.invalid.value.for.source=ung\u00FCltiger Wert f\u00FCr Option --source: {0} + +launcher.err.enable.preview.requires.source=--enable-preview muss mit --source verwendet werden diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/Pretty.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/Pretty.java index acccd4d574cca6d84c64def724d947c956190912..bdfef06fd7c53143e0c02a38eeca949038371251 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/Pretty.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/Pretty.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -194,9 +194,7 @@ public class Pretty extends JCTree.Visitor { tree.accept(this); } } catch (UncheckedIOException ex) { - IOException e = new IOException(ex.getMessage()); - e.initCause(ex); - throw e; + throw new IOException(ex.getMessage(), ex); } finally { this.prec = prevPrec; } diff --git a/src/jdk.compiler/share/classes/sun/tools/serialver/resources/serialver_de.properties b/src/jdk.compiler/share/classes/sun/tools/serialver/resources/serialver_de.properties new file mode 100644 index 0000000000000000000000000000000000000000..fac9b7e1e2e874df697254e6fc49542d92167883 --- /dev/null +++ b/src/jdk.compiler/share/classes/sun/tools/serialver/resources/serialver_de.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute 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. +# + +NotSerializable=Klasse {0} ist nicht serialisierbar. +ClassNotFound=Klasse {0} nicht gefunden. +error.parsing.classpath=Fehler beim Parsen von Classpath {0}. +error.missing.classpath=Fehlendes Argument bei Option -classpath +invalid.flag=Ung\u00FCltiges Flag {0}. +usage=Verwendung: serialver [-classpath classpath] [classname...] diff --git a/make/data/symbols/README b/src/jdk.compiler/share/data/symbols/README similarity index 100% rename from make/data/symbols/README rename to src/jdk.compiler/share/data/symbols/README diff --git a/make/data/symbols/include.list b/src/jdk.compiler/share/data/symbols/include.list similarity index 100% rename from make/data/symbols/include.list rename to src/jdk.compiler/share/data/symbols/include.list diff --git a/make/data/symbols/java.activation-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.activation-8.sym.txt similarity index 100% rename from make/data/symbols/java.activation-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.activation-8.sym.txt diff --git a/make/data/symbols/java.activation-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.activation-9.sym.txt similarity index 100% rename from make/data/symbols/java.activation-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.activation-9.sym.txt diff --git a/make/data/symbols/java.activation-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.activation-A.sym.txt similarity index 100% rename from make/data/symbols/java.activation-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.activation-A.sym.txt diff --git a/make/data/symbols/java.activation-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.activation-B.sym.txt similarity index 100% rename from make/data/symbols/java.activation-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.activation-B.sym.txt diff --git a/make/data/symbols/java.base-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-7.sym.txt similarity index 100% rename from make/data/symbols/java.base-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-7.sym.txt diff --git a/make/data/symbols/java.base-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-8.sym.txt similarity index 100% rename from make/data/symbols/java.base-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-8.sym.txt diff --git a/make/data/symbols/java.base-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-9.sym.txt similarity index 100% rename from make/data/symbols/java.base-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-9.sym.txt diff --git a/make/data/symbols/java.base-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-A.sym.txt similarity index 100% rename from make/data/symbols/java.base-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-A.sym.txt diff --git a/make/data/symbols/java.base-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-B.sym.txt similarity index 100% rename from make/data/symbols/java.base-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-B.sym.txt diff --git a/make/data/symbols/java.base-C.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-C.sym.txt similarity index 100% rename from make/data/symbols/java.base-C.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-C.sym.txt diff --git a/make/data/symbols/java.base-D.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-D.sym.txt similarity index 100% rename from make/data/symbols/java.base-D.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-D.sym.txt diff --git a/make/data/symbols/java.base-E.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-E.sym.txt similarity index 100% rename from make/data/symbols/java.base-E.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-E.sym.txt diff --git a/make/data/symbols/java.base-F.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-F.sym.txt similarity index 100% rename from make/data/symbols/java.base-F.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-F.sym.txt diff --git a/make/data/symbols/java.base-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-G.sym.txt similarity index 100% rename from make/data/symbols/java.base-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-G.sym.txt diff --git a/make/data/symbols/java.base-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-H.sym.txt similarity index 100% rename from make/data/symbols/java.base-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-H.sym.txt diff --git a/make/data/symbols/java.base-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.base-I.sym.txt similarity index 100% rename from make/data/symbols/java.base-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.base-I.sym.txt diff --git a/make/data/symbols/java.compiler-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-7.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-7.sym.txt diff --git a/make/data/symbols/java.compiler-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-8.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-8.sym.txt diff --git a/make/data/symbols/java.compiler-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-9.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-9.sym.txt diff --git a/make/data/symbols/java.compiler-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-A.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-A.sym.txt diff --git a/make/data/symbols/java.compiler-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-B.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-B.sym.txt diff --git a/make/data/symbols/java.compiler-C.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-C.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-C.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-C.sym.txt diff --git a/make/data/symbols/java.compiler-D.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-D.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-D.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-D.sym.txt diff --git a/make/data/symbols/java.compiler-E.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-E.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-E.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-E.sym.txt diff --git a/make/data/symbols/java.compiler-F.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-F.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-F.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-F.sym.txt diff --git a/make/data/symbols/java.compiler-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-G.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-G.sym.txt diff --git a/make/data/symbols/java.compiler-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-H.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-H.sym.txt diff --git a/make/data/symbols/java.compiler-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.compiler-I.sym.txt similarity index 100% rename from make/data/symbols/java.compiler-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.compiler-I.sym.txt diff --git a/make/data/symbols/java.corba-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.corba-8.sym.txt similarity index 100% rename from make/data/symbols/java.corba-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.corba-8.sym.txt diff --git a/make/data/symbols/java.corba-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.corba-9.sym.txt similarity index 100% rename from make/data/symbols/java.corba-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.corba-9.sym.txt diff --git a/make/data/symbols/java.corba-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.corba-A.sym.txt similarity index 100% rename from make/data/symbols/java.corba-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.corba-A.sym.txt diff --git a/make/data/symbols/java.corba-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.corba-B.sym.txt similarity index 100% rename from make/data/symbols/java.corba-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.corba-B.sym.txt diff --git a/make/data/symbols/java.datatransfer-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.datatransfer-7.sym.txt similarity index 100% rename from make/data/symbols/java.datatransfer-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.datatransfer-7.sym.txt diff --git a/make/data/symbols/java.datatransfer-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.datatransfer-8.sym.txt similarity index 100% rename from make/data/symbols/java.datatransfer-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.datatransfer-8.sym.txt diff --git a/make/data/symbols/java.datatransfer-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.datatransfer-9.sym.txt similarity index 100% rename from make/data/symbols/java.datatransfer-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.datatransfer-9.sym.txt diff --git a/make/data/symbols/java.datatransfer-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.datatransfer-A.sym.txt similarity index 100% rename from make/data/symbols/java.datatransfer-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.datatransfer-A.sym.txt diff --git a/make/data/symbols/java.datatransfer-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.datatransfer-B.sym.txt similarity index 100% rename from make/data/symbols/java.datatransfer-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.datatransfer-B.sym.txt diff --git a/make/data/symbols/java.datatransfer-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.datatransfer-G.sym.txt similarity index 100% rename from make/data/symbols/java.datatransfer-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.datatransfer-G.sym.txt diff --git a/make/data/symbols/java.datatransfer-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.datatransfer-H.sym.txt similarity index 100% rename from make/data/symbols/java.datatransfer-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.datatransfer-H.sym.txt diff --git a/make/data/symbols/java.datatransfer-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.datatransfer-I.sym.txt similarity index 100% rename from make/data/symbols/java.datatransfer-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.datatransfer-I.sym.txt diff --git a/make/data/symbols/java.desktop-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-7.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-7.sym.txt diff --git a/make/data/symbols/java.desktop-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt diff --git a/make/data/symbols/java.desktop-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-9.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-9.sym.txt diff --git a/make/data/symbols/java.desktop-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-A.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-A.sym.txt diff --git a/make/data/symbols/java.desktop-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-B.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-B.sym.txt diff --git a/make/data/symbols/java.desktop-C.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-C.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-C.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-C.sym.txt diff --git a/make/data/symbols/java.desktop-D.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-D.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-D.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-D.sym.txt diff --git a/make/data/symbols/java.desktop-E.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-E.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-E.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-E.sym.txt diff --git a/make/data/symbols/java.desktop-F.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-F.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-F.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-F.sym.txt diff --git a/make/data/symbols/java.desktop-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-G.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-G.sym.txt diff --git a/make/data/symbols/java.desktop-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-H.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-H.sym.txt diff --git a/make/data/symbols/java.desktop-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.desktop-I.sym.txt similarity index 100% rename from make/data/symbols/java.desktop-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.desktop-I.sym.txt diff --git a/make/data/symbols/java.instrument-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.instrument-8.sym.txt similarity index 100% rename from make/data/symbols/java.instrument-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.instrument-8.sym.txt diff --git a/make/data/symbols/java.instrument-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.instrument-9.sym.txt similarity index 100% rename from make/data/symbols/java.instrument-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.instrument-9.sym.txt diff --git a/make/data/symbols/java.instrument-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.instrument-A.sym.txt similarity index 100% rename from make/data/symbols/java.instrument-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.instrument-A.sym.txt diff --git a/make/data/symbols/java.instrument-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.instrument-B.sym.txt similarity index 100% rename from make/data/symbols/java.instrument-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.instrument-B.sym.txt diff --git a/make/data/symbols/java.instrument-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.instrument-G.sym.txt similarity index 100% rename from make/data/symbols/java.instrument-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.instrument-G.sym.txt diff --git a/make/data/symbols/java.instrument-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.instrument-H.sym.txt similarity index 100% rename from make/data/symbols/java.instrument-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.instrument-H.sym.txt diff --git a/make/data/symbols/java.instrument-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.instrument-I.sym.txt similarity index 100% rename from make/data/symbols/java.instrument-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.instrument-I.sym.txt diff --git a/make/data/symbols/java.logging-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.logging-7.sym.txt similarity index 100% rename from make/data/symbols/java.logging-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.logging-7.sym.txt diff --git a/make/data/symbols/java.logging-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.logging-8.sym.txt similarity index 100% rename from make/data/symbols/java.logging-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.logging-8.sym.txt diff --git a/make/data/symbols/java.logging-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.logging-9.sym.txt similarity index 100% rename from make/data/symbols/java.logging-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.logging-9.sym.txt diff --git a/make/data/symbols/java.logging-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.logging-A.sym.txt similarity index 100% rename from make/data/symbols/java.logging-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.logging-A.sym.txt diff --git a/make/data/symbols/java.logging-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.logging-B.sym.txt similarity index 100% rename from make/data/symbols/java.logging-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.logging-B.sym.txt diff --git a/make/data/symbols/java.logging-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.logging-G.sym.txt similarity index 100% rename from make/data/symbols/java.logging-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.logging-G.sym.txt diff --git a/make/data/symbols/java.logging-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.logging-H.sym.txt similarity index 100% rename from make/data/symbols/java.logging-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.logging-H.sym.txt diff --git a/make/data/symbols/java.logging-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.logging-I.sym.txt similarity index 100% rename from make/data/symbols/java.logging-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.logging-I.sym.txt diff --git a/make/data/symbols/java.management-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.management-7.sym.txt similarity index 100% rename from make/data/symbols/java.management-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management-7.sym.txt diff --git a/make/data/symbols/java.management-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.management-8.sym.txt similarity index 100% rename from make/data/symbols/java.management-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management-8.sym.txt diff --git a/make/data/symbols/java.management-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.management-9.sym.txt similarity index 100% rename from make/data/symbols/java.management-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management-9.sym.txt diff --git a/make/data/symbols/java.management-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.management-A.sym.txt similarity index 100% rename from make/data/symbols/java.management-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management-A.sym.txt diff --git a/make/data/symbols/java.management-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.management-B.sym.txt similarity index 100% rename from make/data/symbols/java.management-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management-B.sym.txt diff --git a/make/data/symbols/java.management-D.sym.txt b/src/jdk.compiler/share/data/symbols/java.management-D.sym.txt similarity index 100% rename from make/data/symbols/java.management-D.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management-D.sym.txt diff --git a/make/data/symbols/java.management-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.management-G.sym.txt similarity index 100% rename from make/data/symbols/java.management-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management-G.sym.txt diff --git a/make/data/symbols/java.management-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.management-H.sym.txt similarity index 100% rename from make/data/symbols/java.management-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management-H.sym.txt diff --git a/make/data/symbols/java.management-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.management-I.sym.txt similarity index 100% rename from make/data/symbols/java.management-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management-I.sym.txt diff --git a/make/data/symbols/java.management.rmi-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.management.rmi-8.sym.txt similarity index 100% rename from make/data/symbols/java.management.rmi-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management.rmi-8.sym.txt diff --git a/make/data/symbols/java.management.rmi-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.management.rmi-9.sym.txt similarity index 100% rename from make/data/symbols/java.management.rmi-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management.rmi-9.sym.txt diff --git a/make/data/symbols/java.management.rmi-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.management.rmi-A.sym.txt similarity index 100% rename from make/data/symbols/java.management.rmi-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management.rmi-A.sym.txt diff --git a/make/data/symbols/java.management.rmi-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.management.rmi-B.sym.txt similarity index 100% rename from make/data/symbols/java.management.rmi-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management.rmi-B.sym.txt diff --git a/make/data/symbols/java.management.rmi-D.sym.txt b/src/jdk.compiler/share/data/symbols/java.management.rmi-D.sym.txt similarity index 100% rename from make/data/symbols/java.management.rmi-D.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management.rmi-D.sym.txt diff --git a/make/data/symbols/java.management.rmi-F.sym.txt b/src/jdk.compiler/share/data/symbols/java.management.rmi-F.sym.txt similarity index 100% rename from make/data/symbols/java.management.rmi-F.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management.rmi-F.sym.txt diff --git a/make/data/symbols/java.management.rmi-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.management.rmi-G.sym.txt similarity index 100% rename from make/data/symbols/java.management.rmi-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management.rmi-G.sym.txt diff --git a/make/data/symbols/java.management.rmi-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.management.rmi-H.sym.txt similarity index 100% rename from make/data/symbols/java.management.rmi-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management.rmi-H.sym.txt diff --git a/make/data/symbols/java.management.rmi-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.management.rmi-I.sym.txt similarity index 100% rename from make/data/symbols/java.management.rmi-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.management.rmi-I.sym.txt diff --git a/make/data/symbols/java.naming-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.naming-7.sym.txt similarity index 100% rename from make/data/symbols/java.naming-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.naming-7.sym.txt diff --git a/make/data/symbols/java.naming-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.naming-8.sym.txt similarity index 100% rename from make/data/symbols/java.naming-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.naming-8.sym.txt diff --git a/make/data/symbols/java.naming-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.naming-9.sym.txt similarity index 100% rename from make/data/symbols/java.naming-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.naming-9.sym.txt diff --git a/make/data/symbols/java.naming-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.naming-A.sym.txt similarity index 100% rename from make/data/symbols/java.naming-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.naming-A.sym.txt diff --git a/make/data/symbols/java.naming-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.naming-B.sym.txt similarity index 100% rename from make/data/symbols/java.naming-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.naming-B.sym.txt diff --git a/make/data/symbols/java.naming-C.sym.txt b/src/jdk.compiler/share/data/symbols/java.naming-C.sym.txt similarity index 100% rename from make/data/symbols/java.naming-C.sym.txt rename to src/jdk.compiler/share/data/symbols/java.naming-C.sym.txt diff --git a/make/data/symbols/java.naming-F.sym.txt b/src/jdk.compiler/share/data/symbols/java.naming-F.sym.txt similarity index 100% rename from make/data/symbols/java.naming-F.sym.txt rename to src/jdk.compiler/share/data/symbols/java.naming-F.sym.txt diff --git a/make/data/symbols/java.naming-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.naming-G.sym.txt similarity index 100% rename from make/data/symbols/java.naming-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.naming-G.sym.txt diff --git a/make/data/symbols/java.naming-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.naming-H.sym.txt similarity index 100% rename from make/data/symbols/java.naming-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.naming-H.sym.txt diff --git a/make/data/symbols/java.naming-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.naming-I.sym.txt similarity index 100% rename from make/data/symbols/java.naming-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.naming-I.sym.txt diff --git a/make/data/symbols/java.net.http-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.net.http-B.sym.txt similarity index 100% rename from make/data/symbols/java.net.http-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.net.http-B.sym.txt diff --git a/make/data/symbols/java.net.http-D.sym.txt b/src/jdk.compiler/share/data/symbols/java.net.http-D.sym.txt similarity index 100% rename from make/data/symbols/java.net.http-D.sym.txt rename to src/jdk.compiler/share/data/symbols/java.net.http-D.sym.txt diff --git a/make/data/symbols/java.net.http-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.net.http-G.sym.txt similarity index 100% rename from make/data/symbols/java.net.http-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.net.http-G.sym.txt diff --git a/make/data/symbols/java.net.http-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.net.http-I.sym.txt similarity index 100% rename from make/data/symbols/java.net.http-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.net.http-I.sym.txt diff --git a/make/data/symbols/java.prefs-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.prefs-7.sym.txt similarity index 100% rename from make/data/symbols/java.prefs-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.prefs-7.sym.txt diff --git a/make/data/symbols/java.prefs-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.prefs-8.sym.txt similarity index 100% rename from make/data/symbols/java.prefs-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.prefs-8.sym.txt diff --git a/make/data/symbols/java.prefs-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.prefs-9.sym.txt similarity index 100% rename from make/data/symbols/java.prefs-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.prefs-9.sym.txt diff --git a/make/data/symbols/java.prefs-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.prefs-A.sym.txt similarity index 100% rename from make/data/symbols/java.prefs-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.prefs-A.sym.txt diff --git a/make/data/symbols/java.prefs-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.prefs-B.sym.txt similarity index 100% rename from make/data/symbols/java.prefs-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.prefs-B.sym.txt diff --git a/make/data/symbols/java.rmi-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.rmi-7.sym.txt similarity index 100% rename from make/data/symbols/java.rmi-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.rmi-7.sym.txt diff --git a/make/data/symbols/java.rmi-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.rmi-8.sym.txt similarity index 100% rename from make/data/symbols/java.rmi-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.rmi-8.sym.txt diff --git a/make/data/symbols/java.rmi-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.rmi-9.sym.txt similarity index 100% rename from make/data/symbols/java.rmi-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.rmi-9.sym.txt diff --git a/make/data/symbols/java.rmi-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.rmi-A.sym.txt similarity index 100% rename from make/data/symbols/java.rmi-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.rmi-A.sym.txt diff --git a/make/data/symbols/java.rmi-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.rmi-B.sym.txt similarity index 100% rename from make/data/symbols/java.rmi-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.rmi-B.sym.txt diff --git a/make/data/symbols/java.rmi-C.sym.txt b/src/jdk.compiler/share/data/symbols/java.rmi-C.sym.txt similarity index 100% rename from make/data/symbols/java.rmi-C.sym.txt rename to src/jdk.compiler/share/data/symbols/java.rmi-C.sym.txt diff --git a/make/data/symbols/java.rmi-F.sym.txt b/src/jdk.compiler/share/data/symbols/java.rmi-F.sym.txt similarity index 100% rename from make/data/symbols/java.rmi-F.sym.txt rename to src/jdk.compiler/share/data/symbols/java.rmi-F.sym.txt diff --git a/make/data/symbols/java.rmi-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.rmi-G.sym.txt similarity index 100% rename from make/data/symbols/java.rmi-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.rmi-G.sym.txt diff --git a/make/data/symbols/java.rmi-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.rmi-H.sym.txt similarity index 100% rename from make/data/symbols/java.rmi-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.rmi-H.sym.txt diff --git a/make/data/symbols/java.rmi-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.rmi-I.sym.txt similarity index 100% rename from make/data/symbols/java.rmi-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.rmi-I.sym.txt diff --git a/make/data/symbols/java.scripting-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.scripting-7.sym.txt similarity index 100% rename from make/data/symbols/java.scripting-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.scripting-7.sym.txt diff --git a/make/data/symbols/java.scripting-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.scripting-8.sym.txt similarity index 100% rename from make/data/symbols/java.scripting-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.scripting-8.sym.txt diff --git a/make/data/symbols/java.scripting-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.scripting-9.sym.txt similarity index 100% rename from make/data/symbols/java.scripting-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.scripting-9.sym.txt diff --git a/make/data/symbols/java.scripting-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.scripting-A.sym.txt similarity index 100% rename from make/data/symbols/java.scripting-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.scripting-A.sym.txt diff --git a/make/data/symbols/java.scripting-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.scripting-B.sym.txt similarity index 100% rename from make/data/symbols/java.scripting-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.scripting-B.sym.txt diff --git a/make/data/symbols/java.scripting-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.scripting-G.sym.txt similarity index 100% rename from make/data/symbols/java.scripting-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.scripting-G.sym.txt diff --git a/make/data/symbols/java.scripting-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.scripting-H.sym.txt similarity index 100% rename from make/data/symbols/java.scripting-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.scripting-H.sym.txt diff --git a/make/data/symbols/java.scripting-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.scripting-I.sym.txt similarity index 100% rename from make/data/symbols/java.scripting-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.scripting-I.sym.txt diff --git a/make/data/symbols/java.se-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.se-9.sym.txt similarity index 100% rename from make/data/symbols/java.se-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.se-9.sym.txt diff --git a/make/data/symbols/java.se-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.se-A.sym.txt similarity index 100% rename from make/data/symbols/java.se-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.se-A.sym.txt diff --git a/make/data/symbols/java.se-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.se-B.sym.txt similarity index 100% rename from make/data/symbols/java.se-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.se-B.sym.txt diff --git a/make/data/symbols/java.se.ee-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.se.ee-9.sym.txt similarity index 100% rename from make/data/symbols/java.se.ee-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.se.ee-9.sym.txt diff --git a/make/data/symbols/java.se.ee-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.se.ee-A.sym.txt similarity index 100% rename from make/data/symbols/java.se.ee-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.se.ee-A.sym.txt diff --git a/make/data/symbols/java.se.ee-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.se.ee-B.sym.txt similarity index 100% rename from make/data/symbols/java.se.ee-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.se.ee-B.sym.txt diff --git a/make/data/symbols/java.security.jgss-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.jgss-7.sym.txt similarity index 100% rename from make/data/symbols/java.security.jgss-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.jgss-7.sym.txt diff --git a/make/data/symbols/java.security.jgss-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.jgss-8.sym.txt similarity index 100% rename from make/data/symbols/java.security.jgss-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.jgss-8.sym.txt diff --git a/make/data/symbols/java.security.jgss-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.jgss-9.sym.txt similarity index 100% rename from make/data/symbols/java.security.jgss-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.jgss-9.sym.txt diff --git a/make/data/symbols/java.security.jgss-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.jgss-A.sym.txt similarity index 100% rename from make/data/symbols/java.security.jgss-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.jgss-A.sym.txt diff --git a/make/data/symbols/java.security.jgss-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.jgss-B.sym.txt similarity index 100% rename from make/data/symbols/java.security.jgss-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.jgss-B.sym.txt diff --git a/make/data/symbols/java.security.jgss-D.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.jgss-D.sym.txt similarity index 100% rename from make/data/symbols/java.security.jgss-D.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.jgss-D.sym.txt diff --git a/make/data/symbols/java.security.jgss-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.jgss-G.sym.txt similarity index 100% rename from make/data/symbols/java.security.jgss-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.jgss-G.sym.txt diff --git a/make/data/symbols/java.security.jgss-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.jgss-H.sym.txt similarity index 100% rename from make/data/symbols/java.security.jgss-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.jgss-H.sym.txt diff --git a/make/data/symbols/java.security.jgss-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.jgss-I.sym.txt similarity index 100% rename from make/data/symbols/java.security.jgss-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.jgss-I.sym.txt diff --git a/make/data/symbols/java.security.sasl-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.sasl-7.sym.txt similarity index 100% rename from make/data/symbols/java.security.sasl-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.sasl-7.sym.txt diff --git a/make/data/symbols/java.security.sasl-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.sasl-8.sym.txt similarity index 100% rename from make/data/symbols/java.security.sasl-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.sasl-8.sym.txt diff --git a/make/data/symbols/java.security.sasl-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.sasl-9.sym.txt similarity index 100% rename from make/data/symbols/java.security.sasl-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.sasl-9.sym.txt diff --git a/make/data/symbols/java.security.sasl-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.sasl-A.sym.txt similarity index 100% rename from make/data/symbols/java.security.sasl-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.sasl-A.sym.txt diff --git a/make/data/symbols/java.security.sasl-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.sasl-B.sym.txt similarity index 100% rename from make/data/symbols/java.security.sasl-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.sasl-B.sym.txt diff --git a/make/data/symbols/java.security.sasl-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.sasl-G.sym.txt similarity index 100% rename from make/data/symbols/java.security.sasl-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.sasl-G.sym.txt diff --git a/make/data/symbols/java.security.sasl-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.sasl-H.sym.txt similarity index 100% rename from make/data/symbols/java.security.sasl-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.sasl-H.sym.txt diff --git a/make/data/symbols/java.security.sasl-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.security.sasl-I.sym.txt similarity index 100% rename from make/data/symbols/java.security.sasl-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.security.sasl-I.sym.txt diff --git a/make/data/symbols/java.smartcardio-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.smartcardio-9.sym.txt similarity index 100% rename from make/data/symbols/java.smartcardio-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.smartcardio-9.sym.txt diff --git a/make/data/symbols/java.smartcardio-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.smartcardio-A.sym.txt similarity index 100% rename from make/data/symbols/java.smartcardio-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.smartcardio-A.sym.txt diff --git a/make/data/symbols/java.smartcardio-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.smartcardio-B.sym.txt similarity index 100% rename from make/data/symbols/java.smartcardio-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.smartcardio-B.sym.txt diff --git a/make/data/symbols/java.smartcardio-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.smartcardio-G.sym.txt similarity index 100% rename from make/data/symbols/java.smartcardio-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.smartcardio-G.sym.txt diff --git a/make/data/symbols/java.smartcardio-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.smartcardio-H.sym.txt similarity index 100% rename from make/data/symbols/java.smartcardio-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.smartcardio-H.sym.txt diff --git a/make/data/symbols/java.smartcardio-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.smartcardio-I.sym.txt similarity index 100% rename from make/data/symbols/java.smartcardio-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.smartcardio-I.sym.txt diff --git a/make/data/symbols/java.sql-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql-7.sym.txt similarity index 100% rename from make/data/symbols/java.sql-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql-7.sym.txt diff --git a/make/data/symbols/java.sql-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql-8.sym.txt similarity index 100% rename from make/data/symbols/java.sql-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql-8.sym.txt diff --git a/make/data/symbols/java.sql-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql-9.sym.txt similarity index 100% rename from make/data/symbols/java.sql-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql-9.sym.txt diff --git a/make/data/symbols/java.sql-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql-A.sym.txt similarity index 100% rename from make/data/symbols/java.sql-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql-A.sym.txt diff --git a/make/data/symbols/java.sql-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql-B.sym.txt similarity index 100% rename from make/data/symbols/java.sql-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql-B.sym.txt diff --git a/make/data/symbols/java.sql-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql-G.sym.txt similarity index 100% rename from make/data/symbols/java.sql-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql-G.sym.txt diff --git a/make/data/symbols/java.sql-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql-H.sym.txt similarity index 100% rename from make/data/symbols/java.sql-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql-H.sym.txt diff --git a/make/data/symbols/java.sql-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql-I.sym.txt similarity index 100% rename from make/data/symbols/java.sql-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql-I.sym.txt diff --git a/make/data/symbols/java.sql.rowset-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql.rowset-7.sym.txt similarity index 100% rename from make/data/symbols/java.sql.rowset-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql.rowset-7.sym.txt diff --git a/make/data/symbols/java.sql.rowset-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql.rowset-8.sym.txt similarity index 100% rename from make/data/symbols/java.sql.rowset-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql.rowset-8.sym.txt diff --git a/make/data/symbols/java.sql.rowset-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql.rowset-9.sym.txt similarity index 100% rename from make/data/symbols/java.sql.rowset-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql.rowset-9.sym.txt diff --git a/make/data/symbols/java.sql.rowset-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql.rowset-A.sym.txt similarity index 100% rename from make/data/symbols/java.sql.rowset-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql.rowset-A.sym.txt diff --git a/make/data/symbols/java.sql.rowset-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql.rowset-B.sym.txt similarity index 100% rename from make/data/symbols/java.sql.rowset-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql.rowset-B.sym.txt diff --git a/make/data/symbols/java.sql.rowset-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql.rowset-G.sym.txt similarity index 100% rename from make/data/symbols/java.sql.rowset-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql.rowset-G.sym.txt diff --git a/make/data/symbols/java.sql.rowset-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql.rowset-H.sym.txt similarity index 100% rename from make/data/symbols/java.sql.rowset-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql.rowset-H.sym.txt diff --git a/make/data/symbols/java.sql.rowset-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.sql.rowset-I.sym.txt similarity index 100% rename from make/data/symbols/java.sql.rowset-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.sql.rowset-I.sym.txt diff --git a/make/data/symbols/java.transaction-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.transaction-8.sym.txt similarity index 100% rename from make/data/symbols/java.transaction-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.transaction-8.sym.txt diff --git a/make/data/symbols/java.transaction-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.transaction-9.sym.txt similarity index 100% rename from make/data/symbols/java.transaction-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.transaction-9.sym.txt diff --git a/make/data/symbols/java.transaction-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.transaction-A.sym.txt similarity index 100% rename from make/data/symbols/java.transaction-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.transaction-A.sym.txt diff --git a/make/data/symbols/java.transaction-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.transaction-B.sym.txt similarity index 100% rename from make/data/symbols/java.transaction-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.transaction-B.sym.txt diff --git a/make/data/symbols/java.transaction.xa-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.transaction.xa-B.sym.txt similarity index 100% rename from make/data/symbols/java.transaction.xa-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.transaction.xa-B.sym.txt diff --git a/make/data/symbols/java.xml-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-7.sym.txt similarity index 100% rename from make/data/symbols/java.xml-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-7.sym.txt diff --git a/make/data/symbols/java.xml-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-8.sym.txt similarity index 100% rename from make/data/symbols/java.xml-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-8.sym.txt diff --git a/make/data/symbols/java.xml-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-9.sym.txt similarity index 100% rename from make/data/symbols/java.xml-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-9.sym.txt diff --git a/make/data/symbols/java.xml-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-A.sym.txt similarity index 100% rename from make/data/symbols/java.xml-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-A.sym.txt diff --git a/make/data/symbols/java.xml-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-B.sym.txt similarity index 100% rename from make/data/symbols/java.xml-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-B.sym.txt diff --git a/make/data/symbols/java.xml-C.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-C.sym.txt similarity index 100% rename from make/data/symbols/java.xml-C.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-C.sym.txt diff --git a/make/data/symbols/java.xml-D.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-D.sym.txt similarity index 100% rename from make/data/symbols/java.xml-D.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-D.sym.txt diff --git a/make/data/symbols/java.xml-E.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-E.sym.txt similarity index 100% rename from make/data/symbols/java.xml-E.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-E.sym.txt diff --git a/make/data/symbols/java.xml-F.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-F.sym.txt similarity index 100% rename from make/data/symbols/java.xml-F.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-F.sym.txt diff --git a/make/data/symbols/java.xml-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-G.sym.txt similarity index 100% rename from make/data/symbols/java.xml-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-G.sym.txt diff --git a/make/data/symbols/java.xml-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-H.sym.txt similarity index 100% rename from make/data/symbols/java.xml-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-H.sym.txt diff --git a/make/data/symbols/java.xml-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml-I.sym.txt similarity index 100% rename from make/data/symbols/java.xml-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml-I.sym.txt diff --git a/make/data/symbols/java.xml.bind-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.bind-7.sym.txt similarity index 100% rename from make/data/symbols/java.xml.bind-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.bind-7.sym.txt diff --git a/make/data/symbols/java.xml.bind-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.bind-8.sym.txt similarity index 100% rename from make/data/symbols/java.xml.bind-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.bind-8.sym.txt diff --git a/make/data/symbols/java.xml.bind-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.bind-9.sym.txt similarity index 100% rename from make/data/symbols/java.xml.bind-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.bind-9.sym.txt diff --git a/make/data/symbols/java.xml.bind-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.bind-A.sym.txt similarity index 100% rename from make/data/symbols/java.xml.bind-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.bind-A.sym.txt diff --git a/make/data/symbols/java.xml.bind-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.bind-B.sym.txt similarity index 100% rename from make/data/symbols/java.xml.bind-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.bind-B.sym.txt diff --git a/make/data/symbols/java.xml.crypto-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.crypto-8.sym.txt similarity index 100% rename from make/data/symbols/java.xml.crypto-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.crypto-8.sym.txt diff --git a/make/data/symbols/java.xml.crypto-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.crypto-9.sym.txt similarity index 100% rename from make/data/symbols/java.xml.crypto-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.crypto-9.sym.txt diff --git a/make/data/symbols/java.xml.crypto-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.crypto-A.sym.txt similarity index 100% rename from make/data/symbols/java.xml.crypto-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.crypto-A.sym.txt diff --git a/make/data/symbols/java.xml.crypto-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.crypto-B.sym.txt similarity index 100% rename from make/data/symbols/java.xml.crypto-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.crypto-B.sym.txt diff --git a/make/data/symbols/java.xml.crypto-D.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.crypto-D.sym.txt similarity index 100% rename from make/data/symbols/java.xml.crypto-D.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.crypto-D.sym.txt diff --git a/make/data/symbols/java.xml.crypto-G.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.crypto-G.sym.txt similarity index 100% rename from make/data/symbols/java.xml.crypto-G.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.crypto-G.sym.txt diff --git a/make/data/symbols/java.xml.crypto-H.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.crypto-H.sym.txt similarity index 100% rename from make/data/symbols/java.xml.crypto-H.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.crypto-H.sym.txt diff --git a/make/data/symbols/java.xml.crypto-I.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.crypto-I.sym.txt similarity index 100% rename from make/data/symbols/java.xml.crypto-I.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.crypto-I.sym.txt diff --git a/make/data/symbols/java.xml.ws-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.ws-8.sym.txt similarity index 100% rename from make/data/symbols/java.xml.ws-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.ws-8.sym.txt diff --git a/make/data/symbols/java.xml.ws-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.ws-9.sym.txt similarity index 100% rename from make/data/symbols/java.xml.ws-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.ws-9.sym.txt diff --git a/make/data/symbols/java.xml.ws-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.ws-A.sym.txt similarity index 100% rename from make/data/symbols/java.xml.ws-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.ws-A.sym.txt diff --git a/make/data/symbols/java.xml.ws-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.ws-B.sym.txt similarity index 100% rename from make/data/symbols/java.xml.ws-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.ws-B.sym.txt diff --git a/make/data/symbols/java.xml.ws.annotation-7.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.ws.annotation-7.sym.txt similarity index 100% rename from make/data/symbols/java.xml.ws.annotation-7.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.ws.annotation-7.sym.txt diff --git a/make/data/symbols/java.xml.ws.annotation-8.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.ws.annotation-8.sym.txt similarity index 100% rename from make/data/symbols/java.xml.ws.annotation-8.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.ws.annotation-8.sym.txt diff --git a/make/data/symbols/java.xml.ws.annotation-9.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.ws.annotation-9.sym.txt similarity index 100% rename from make/data/symbols/java.xml.ws.annotation-9.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.ws.annotation-9.sym.txt diff --git a/make/data/symbols/java.xml.ws.annotation-A.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.ws.annotation-A.sym.txt similarity index 100% rename from make/data/symbols/java.xml.ws.annotation-A.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.ws.annotation-A.sym.txt diff --git a/make/data/symbols/java.xml.ws.annotation-B.sym.txt b/src/jdk.compiler/share/data/symbols/java.xml.ws.annotation-B.sym.txt similarity index 100% rename from make/data/symbols/java.xml.ws.annotation-B.sym.txt rename to src/jdk.compiler/share/data/symbols/java.xml.ws.annotation-B.sym.txt diff --git a/make/data/symbols/jdk.accessibility-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.accessibility-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.accessibility-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.accessibility-9.sym.txt diff --git a/make/data/symbols/jdk.accessibility-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.accessibility-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.accessibility-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.accessibility-A.sym.txt diff --git a/make/data/symbols/jdk.accessibility-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.accessibility-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.accessibility-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.accessibility-B.sym.txt diff --git a/make/data/symbols/jdk.accessibility-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.accessibility-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.accessibility-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.accessibility-G.sym.txt diff --git a/make/data/symbols/jdk.accessibility-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.accessibility-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.accessibility-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.accessibility-H.sym.txt diff --git a/make/data/symbols/jdk.accessibility-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.accessibility-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.accessibility-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.accessibility-I.sym.txt diff --git a/make/data/symbols/jdk.attach-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.attach-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.attach-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.attach-9.sym.txt diff --git a/make/data/symbols/jdk.attach-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.attach-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.attach-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.attach-A.sym.txt diff --git a/make/data/symbols/jdk.attach-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.attach-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.attach-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.attach-B.sym.txt diff --git a/make/data/symbols/jdk.attach-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.attach-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.attach-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.attach-G.sym.txt diff --git a/make/data/symbols/jdk.attach-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.attach-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.attach-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.attach-H.sym.txt diff --git a/make/data/symbols/jdk.attach-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.attach-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.attach-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.attach-I.sym.txt diff --git a/make/data/symbols/jdk.charsets-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.charsets-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.charsets-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.charsets-9.sym.txt diff --git a/make/data/symbols/jdk.charsets-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.charsets-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.charsets-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.charsets-A.sym.txt diff --git a/make/data/symbols/jdk.charsets-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.charsets-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.charsets-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.charsets-B.sym.txt diff --git a/make/data/symbols/jdk.compiler-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.compiler-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.compiler-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.compiler-9.sym.txt diff --git a/make/data/symbols/jdk.compiler-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.compiler-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.compiler-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.compiler-A.sym.txt diff --git a/make/data/symbols/jdk.compiler-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.compiler-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.compiler-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.compiler-B.sym.txt diff --git a/make/data/symbols/jdk.compiler-C.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.compiler-C.sym.txt similarity index 100% rename from make/data/symbols/jdk.compiler-C.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.compiler-C.sym.txt diff --git a/make/data/symbols/jdk.compiler-D.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.compiler-D.sym.txt similarity index 100% rename from make/data/symbols/jdk.compiler-D.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.compiler-D.sym.txt diff --git a/make/data/symbols/jdk.compiler-E.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.compiler-E.sym.txt similarity index 100% rename from make/data/symbols/jdk.compiler-E.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.compiler-E.sym.txt diff --git a/make/data/symbols/jdk.compiler-F.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.compiler-F.sym.txt similarity index 100% rename from make/data/symbols/jdk.compiler-F.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.compiler-F.sym.txt diff --git a/make/data/symbols/jdk.compiler-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.compiler-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.compiler-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.compiler-G.sym.txt diff --git a/make/data/symbols/jdk.compiler-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.compiler-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.compiler-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.compiler-H.sym.txt diff --git a/make/data/symbols/jdk.compiler-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.compiler-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.compiler-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.compiler-I.sym.txt diff --git a/make/data/symbols/jdk.crypto.cryptoki-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.crypto.cryptoki-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.crypto.cryptoki-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.crypto.cryptoki-9.sym.txt diff --git a/make/data/symbols/jdk.crypto.cryptoki-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.crypto.cryptoki-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.crypto.cryptoki-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.crypto.cryptoki-A.sym.txt diff --git a/make/data/symbols/jdk.crypto.cryptoki-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.crypto.cryptoki-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.crypto.cryptoki-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.crypto.cryptoki-B.sym.txt diff --git a/make/data/symbols/jdk.crypto.ec-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.crypto.ec-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.crypto.ec-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.crypto.ec-9.sym.txt diff --git a/make/data/symbols/jdk.crypto.ec-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.crypto.ec-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.crypto.ec-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.crypto.ec-A.sym.txt diff --git a/make/data/symbols/jdk.crypto.ec-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.crypto.ec-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.crypto.ec-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.crypto.ec-B.sym.txt diff --git a/make/data/symbols/jdk.dynalink-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.dynalink-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.dynalink-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.dynalink-9.sym.txt diff --git a/make/data/symbols/jdk.dynalink-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.dynalink-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.dynalink-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.dynalink-A.sym.txt diff --git a/make/data/symbols/jdk.dynalink-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.dynalink-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.dynalink-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.dynalink-B.sym.txt diff --git a/make/data/symbols/jdk.dynalink-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.dynalink-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.dynalink-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.dynalink-G.sym.txt diff --git a/make/data/symbols/jdk.dynalink-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.dynalink-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.dynalink-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.dynalink-H.sym.txt diff --git a/make/data/symbols/jdk.dynalink-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.dynalink-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.dynalink-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.dynalink-I.sym.txt diff --git a/make/data/symbols/jdk.editpad-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.editpad-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.editpad-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.editpad-9.sym.txt diff --git a/make/data/symbols/jdk.editpad-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.editpad-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.editpad-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.editpad-A.sym.txt diff --git a/make/data/symbols/jdk.editpad-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.editpad-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.editpad-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.editpad-B.sym.txt diff --git a/make/data/symbols/jdk.hotspot.agent-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.hotspot.agent-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.hotspot.agent-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.hotspot.agent-9.sym.txt diff --git a/make/data/symbols/jdk.hotspot.agent-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.hotspot.agent-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.hotspot.agent-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.hotspot.agent-A.sym.txt diff --git a/make/data/symbols/jdk.hotspot.agent-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.hotspot.agent-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.hotspot.agent-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.hotspot.agent-B.sym.txt diff --git a/make/data/symbols/jdk.httpserver-7.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.httpserver-7.sym.txt similarity index 100% rename from make/data/symbols/jdk.httpserver-7.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.httpserver-7.sym.txt diff --git a/make/data/symbols/jdk.httpserver-8.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.httpserver-8.sym.txt similarity index 100% rename from make/data/symbols/jdk.httpserver-8.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.httpserver-8.sym.txt diff --git a/make/data/symbols/jdk.httpserver-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.httpserver-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.httpserver-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.httpserver-9.sym.txt diff --git a/make/data/symbols/jdk.httpserver-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.httpserver-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.httpserver-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.httpserver-A.sym.txt diff --git a/make/data/symbols/jdk.httpserver-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.httpserver-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.httpserver-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.httpserver-B.sym.txt diff --git a/make/data/symbols/jdk.httpserver-D.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.httpserver-D.sym.txt similarity index 100% rename from make/data/symbols/jdk.httpserver-D.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.httpserver-D.sym.txt diff --git a/make/data/symbols/jdk.httpserver-E.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.httpserver-E.sym.txt similarity index 100% rename from make/data/symbols/jdk.httpserver-E.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.httpserver-E.sym.txt diff --git a/make/data/symbols/jdk.httpserver-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.httpserver-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.httpserver-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.httpserver-G.sym.txt diff --git a/make/data/symbols/jdk.httpserver-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.httpserver-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.httpserver-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.httpserver-H.sym.txt diff --git a/make/data/symbols/jdk.httpserver-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.httpserver-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.httpserver-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.httpserver-I.sym.txt diff --git a/make/data/symbols/jdk.incubator.foreign-E.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-E.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.foreign-E.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-E.sym.txt diff --git a/make/data/symbols/jdk.incubator.foreign-F.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-F.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.foreign-F.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-F.sym.txt diff --git a/make/data/symbols/jdk.incubator.foreign-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.foreign-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-G.sym.txt diff --git a/make/data/symbols/jdk.incubator.foreign-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.foreign-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-H.sym.txt diff --git a/make/data/symbols/jdk.incubator.foreign-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.foreign-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.foreign-I.sym.txt diff --git a/make/data/symbols/jdk.incubator.httpclient-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.httpclient-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.httpclient-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.httpclient-9.sym.txt diff --git a/make/data/symbols/jdk.incubator.httpclient-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.httpclient-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.httpclient-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.httpclient-A.sym.txt diff --git a/make/data/symbols/jdk.incubator.httpclient-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.httpclient-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.httpclient-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.httpclient-B.sym.txt diff --git a/make/data/symbols/jdk.incubator.jpackage-E.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.jpackage-E.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.jpackage-E.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.jpackage-E.sym.txt diff --git a/make/data/symbols/jdk.incubator.jpackage-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.jpackage-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.jpackage-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.jpackage-G.sym.txt diff --git a/make/data/symbols/jdk.incubator.vector-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.vector-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.vector-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.vector-G.sym.txt diff --git a/make/data/symbols/jdk.incubator.vector-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.vector-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.vector-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.vector-H.sym.txt diff --git a/make/data/symbols/jdk.incubator.vector-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.incubator.vector-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.incubator.vector-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.incubator.vector-I.sym.txt diff --git a/make/data/symbols/jdk.jartool-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jartool-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.jartool-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jartool-9.sym.txt diff --git a/make/data/symbols/jdk.jartool-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jartool-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.jartool-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jartool-A.sym.txt diff --git a/make/data/symbols/jdk.jartool-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jartool-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.jartool-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jartool-B.sym.txt diff --git a/make/data/symbols/jdk.jartool-D.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jartool-D.sym.txt similarity index 100% rename from make/data/symbols/jdk.jartool-D.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jartool-D.sym.txt diff --git a/make/data/symbols/jdk.jartool-F.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jartool-F.sym.txt similarity index 100% rename from make/data/symbols/jdk.jartool-F.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jartool-F.sym.txt diff --git a/make/data/symbols/jdk.jartool-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jartool-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.jartool-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jartool-G.sym.txt diff --git a/make/data/symbols/jdk.jartool-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jartool-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.jartool-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jartool-H.sym.txt diff --git a/make/data/symbols/jdk.jartool-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jartool-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.jartool-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jartool-I.sym.txt diff --git a/make/data/symbols/jdk.javadoc-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.javadoc-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.javadoc-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.javadoc-9.sym.txt diff --git a/make/data/symbols/jdk.javadoc-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.javadoc-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.javadoc-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.javadoc-A.sym.txt diff --git a/make/data/symbols/jdk.javadoc-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.javadoc-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.javadoc-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.javadoc-B.sym.txt diff --git a/make/data/symbols/jdk.javadoc-D.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.javadoc-D.sym.txt similarity index 100% rename from make/data/symbols/jdk.javadoc-D.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.javadoc-D.sym.txt diff --git a/make/data/symbols/jdk.javadoc-F.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.javadoc-F.sym.txt similarity index 100% rename from make/data/symbols/jdk.javadoc-F.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.javadoc-F.sym.txt diff --git a/make/data/symbols/jdk.javadoc-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.javadoc-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.javadoc-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.javadoc-G.sym.txt diff --git a/make/data/symbols/jdk.javadoc-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.javadoc-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.javadoc-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.javadoc-H.sym.txt diff --git a/make/data/symbols/jdk.javadoc-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.javadoc-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.javadoc-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.javadoc-I.sym.txt diff --git a/make/data/symbols/jdk.jcmd-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jcmd-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.jcmd-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jcmd-9.sym.txt diff --git a/make/data/symbols/jdk.jcmd-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jcmd-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.jcmd-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jcmd-A.sym.txt diff --git a/make/data/symbols/jdk.jcmd-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jcmd-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.jcmd-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jcmd-B.sym.txt diff --git a/make/data/symbols/jdk.jconsole-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jconsole-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.jconsole-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jconsole-9.sym.txt diff --git a/make/data/symbols/jdk.jconsole-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jconsole-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.jconsole-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jconsole-A.sym.txt diff --git a/make/data/symbols/jdk.jconsole-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jconsole-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.jconsole-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jconsole-B.sym.txt diff --git a/make/data/symbols/jdk.jconsole-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jconsole-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.jconsole-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jconsole-G.sym.txt diff --git a/make/data/symbols/jdk.jconsole-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jconsole-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.jconsole-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jconsole-H.sym.txt diff --git a/make/data/symbols/jdk.jconsole-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jconsole-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.jconsole-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jconsole-I.sym.txt diff --git a/make/data/symbols/jdk.jdeps-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdeps-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdeps-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdeps-9.sym.txt diff --git a/make/data/symbols/jdk.jdeps-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdeps-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdeps-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdeps-A.sym.txt diff --git a/make/data/symbols/jdk.jdeps-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdeps-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdeps-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdeps-B.sym.txt diff --git a/make/data/symbols/jdk.jdi-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdi-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdi-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdi-9.sym.txt diff --git a/make/data/symbols/jdk.jdi-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdi-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdi-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdi-A.sym.txt diff --git a/make/data/symbols/jdk.jdi-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdi-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdi-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdi-B.sym.txt diff --git a/make/data/symbols/jdk.jdi-F.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdi-F.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdi-F.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdi-F.sym.txt diff --git a/make/data/symbols/jdk.jdi-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdi-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdi-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdi-G.sym.txt diff --git a/make/data/symbols/jdk.jdi-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdi-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdi-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdi-H.sym.txt diff --git a/make/data/symbols/jdk.jdi-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdi-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdi-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdi-I.sym.txt diff --git a/make/data/symbols/jdk.jdwp.agent-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdwp.agent-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdwp.agent-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdwp.agent-9.sym.txt diff --git a/make/data/symbols/jdk.jdwp.agent-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdwp.agent-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdwp.agent-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdwp.agent-A.sym.txt diff --git a/make/data/symbols/jdk.jdwp.agent-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jdwp.agent-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.jdwp.agent-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jdwp.agent-B.sym.txt diff --git a/make/data/symbols/jdk.jfr-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jfr-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.jfr-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jfr-B.sym.txt diff --git a/make/data/symbols/jdk.jfr-C.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jfr-C.sym.txt similarity index 100% rename from make/data/symbols/jdk.jfr-C.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jfr-C.sym.txt diff --git a/make/data/symbols/jdk.jfr-E.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jfr-E.sym.txt similarity index 100% rename from make/data/symbols/jdk.jfr-E.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jfr-E.sym.txt diff --git a/make/data/symbols/jdk.jfr-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jfr-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.jfr-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jfr-G.sym.txt diff --git a/make/data/symbols/jdk.jfr-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jfr-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.jfr-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jfr-H.sym.txt diff --git a/make/data/symbols/jdk.jlink-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jlink-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.jlink-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jlink-9.sym.txt diff --git a/make/data/symbols/jdk.jlink-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jlink-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.jlink-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jlink-A.sym.txt diff --git a/make/data/symbols/jdk.jlink-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jlink-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.jlink-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jlink-B.sym.txt diff --git a/make/data/symbols/jdk.jlink-D.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jlink-D.sym.txt similarity index 100% rename from make/data/symbols/jdk.jlink-D.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jlink-D.sym.txt diff --git a/make/data/symbols/jdk.jlink-E.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jlink-E.sym.txt similarity index 100% rename from make/data/symbols/jdk.jlink-E.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jlink-E.sym.txt diff --git a/make/data/symbols/jdk.jlink-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jlink-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.jlink-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jlink-I.sym.txt diff --git a/make/data/symbols/jdk.jpackage-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jpackage-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.jpackage-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jpackage-G.sym.txt diff --git a/make/data/symbols/jdk.jshell-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jshell-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.jshell-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jshell-9.sym.txt diff --git a/make/data/symbols/jdk.jshell-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jshell-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.jshell-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jshell-A.sym.txt diff --git a/make/data/symbols/jdk.jshell-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jshell-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.jshell-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jshell-B.sym.txt diff --git a/make/data/symbols/jdk.jshell-D.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jshell-D.sym.txt similarity index 100% rename from make/data/symbols/jdk.jshell-D.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jshell-D.sym.txt diff --git a/make/data/symbols/jdk.jshell-E.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jshell-E.sym.txt similarity index 100% rename from make/data/symbols/jdk.jshell-E.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jshell-E.sym.txt diff --git a/make/data/symbols/jdk.jshell-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jshell-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.jshell-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jshell-G.sym.txt diff --git a/make/data/symbols/jdk.jshell-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jshell-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.jshell-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jshell-H.sym.txt diff --git a/make/data/symbols/jdk.jshell-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jshell-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.jshell-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jshell-I.sym.txt diff --git a/make/data/symbols/jdk.jsobject-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jsobject-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.jsobject-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jsobject-9.sym.txt diff --git a/make/data/symbols/jdk.jsobject-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jsobject-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.jsobject-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jsobject-A.sym.txt diff --git a/make/data/symbols/jdk.jsobject-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jsobject-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.jsobject-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jsobject-B.sym.txt diff --git a/make/data/symbols/jdk.jsobject-C.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jsobject-C.sym.txt similarity index 100% rename from make/data/symbols/jdk.jsobject-C.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jsobject-C.sym.txt diff --git a/make/data/symbols/jdk.jsobject-E.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jsobject-E.sym.txt similarity index 100% rename from make/data/symbols/jdk.jsobject-E.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jsobject-E.sym.txt diff --git a/make/data/symbols/jdk.jsobject-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jsobject-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.jsobject-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jsobject-G.sym.txt diff --git a/make/data/symbols/jdk.jsobject-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jsobject-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.jsobject-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jsobject-H.sym.txt diff --git a/make/data/symbols/jdk.jsobject-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jsobject-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.jsobject-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jsobject-I.sym.txt diff --git a/make/data/symbols/jdk.jstatd-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jstatd-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.jstatd-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jstatd-9.sym.txt diff --git a/make/data/symbols/jdk.jstatd-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jstatd-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.jstatd-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jstatd-A.sym.txt diff --git a/make/data/symbols/jdk.jstatd-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.jstatd-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.jstatd-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.jstatd-B.sym.txt diff --git a/make/data/symbols/jdk.localedata-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.localedata-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.localedata-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.localedata-9.sym.txt diff --git a/make/data/symbols/jdk.localedata-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.localedata-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.localedata-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.localedata-A.sym.txt diff --git a/make/data/symbols/jdk.localedata-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.localedata-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.localedata-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.localedata-B.sym.txt diff --git a/make/data/symbols/jdk.management-7.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management-7.sym.txt similarity index 100% rename from make/data/symbols/jdk.management-7.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management-7.sym.txt diff --git a/make/data/symbols/jdk.management-8.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management-8.sym.txt similarity index 100% rename from make/data/symbols/jdk.management-8.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management-8.sym.txt diff --git a/make/data/symbols/jdk.management-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.management-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management-9.sym.txt diff --git a/make/data/symbols/jdk.management-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.management-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management-A.sym.txt diff --git a/make/data/symbols/jdk.management-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.management-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management-B.sym.txt diff --git a/make/data/symbols/jdk.management-E.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management-E.sym.txt similarity index 100% rename from make/data/symbols/jdk.management-E.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management-E.sym.txt diff --git a/make/data/symbols/jdk.management-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.management-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management-G.sym.txt diff --git a/make/data/symbols/jdk.management-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.management-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management-H.sym.txt diff --git a/make/data/symbols/jdk.management-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.management-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management-I.sym.txt diff --git a/make/data/symbols/jdk.management.agent-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management.agent-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.management.agent-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management.agent-9.sym.txt diff --git a/make/data/symbols/jdk.management.agent-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management.agent-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.management.agent-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management.agent-A.sym.txt diff --git a/make/data/symbols/jdk.management.agent-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management.agent-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.management.agent-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management.agent-B.sym.txt diff --git a/make/data/symbols/jdk.management.jfr-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management.jfr-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.management.jfr-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management.jfr-B.sym.txt diff --git a/make/data/symbols/jdk.management.jfr-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management.jfr-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.management.jfr-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management.jfr-G.sym.txt diff --git a/make/data/symbols/jdk.management.jfr-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management.jfr-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.management.jfr-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management.jfr-H.sym.txt diff --git a/make/data/symbols/jdk.management.jfr-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.management.jfr-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.management.jfr-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.management.jfr-I.sym.txt diff --git a/make/data/symbols/jdk.naming.dns-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.naming.dns-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.naming.dns-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.naming.dns-9.sym.txt diff --git a/make/data/symbols/jdk.naming.dns-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.naming.dns-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.naming.dns-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.naming.dns-A.sym.txt diff --git a/make/data/symbols/jdk.naming.dns-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.naming.dns-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.naming.dns-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.naming.dns-B.sym.txt diff --git a/make/data/symbols/jdk.naming.rmi-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.naming.rmi-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.naming.rmi-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.naming.rmi-9.sym.txt diff --git a/make/data/symbols/jdk.naming.rmi-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.naming.rmi-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.naming.rmi-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.naming.rmi-A.sym.txt diff --git a/make/data/symbols/jdk.naming.rmi-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.naming.rmi-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.naming.rmi-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.naming.rmi-B.sym.txt diff --git a/make/data/symbols/jdk.net-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.net-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.net-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.net-9.sym.txt diff --git a/make/data/symbols/jdk.net-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.net-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.net-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.net-A.sym.txt diff --git a/make/data/symbols/jdk.net-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.net-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.net-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.net-B.sym.txt diff --git a/make/data/symbols/jdk.net-E.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.net-E.sym.txt similarity index 100% rename from make/data/symbols/jdk.net-E.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.net-E.sym.txt diff --git a/make/data/symbols/jdk.net-F.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.net-F.sym.txt similarity index 100% rename from make/data/symbols/jdk.net-F.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.net-F.sym.txt diff --git a/make/data/symbols/jdk.net-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.net-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.net-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.net-G.sym.txt diff --git a/make/data/symbols/jdk.net-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.net-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.net-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.net-H.sym.txt diff --git a/make/data/symbols/jdk.net-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.net-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.net-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.net-I.sym.txt diff --git a/make/data/symbols/jdk.nio.mapmode-F.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.nio.mapmode-F.sym.txt similarity index 100% rename from make/data/symbols/jdk.nio.mapmode-F.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.nio.mapmode-F.sym.txt diff --git a/make/data/symbols/jdk.pack-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.pack-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.pack-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.pack-9.sym.txt diff --git a/make/data/symbols/jdk.pack-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.pack-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.pack-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.pack-A.sym.txt diff --git a/make/data/symbols/jdk.pack-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.pack-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.pack-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.pack-B.sym.txt diff --git a/make/data/symbols/jdk.pack-E.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.pack-E.sym.txt similarity index 100% rename from make/data/symbols/jdk.pack-E.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.pack-E.sym.txt diff --git a/make/data/symbols/jdk.policytool-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.policytool-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.policytool-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.policytool-9.sym.txt diff --git a/make/data/symbols/jdk.policytool-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.policytool-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.policytool-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.policytool-A.sym.txt diff --git a/make/data/symbols/jdk.rmic-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.rmic-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.rmic-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.rmic-9.sym.txt diff --git a/make/data/symbols/jdk.rmic-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.rmic-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.rmic-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.rmic-A.sym.txt diff --git a/make/data/symbols/jdk.rmic-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.rmic-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.rmic-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.rmic-B.sym.txt diff --git a/make/data/symbols/jdk.rmic-F.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.rmic-F.sym.txt similarity index 100% rename from make/data/symbols/jdk.rmic-F.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.rmic-F.sym.txt diff --git a/make/data/symbols/jdk.scripting.nashorn-7.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-7.sym.txt similarity index 100% rename from make/data/symbols/jdk.scripting.nashorn-7.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-7.sym.txt diff --git a/make/data/symbols/jdk.scripting.nashorn-8.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-8.sym.txt similarity index 100% rename from make/data/symbols/jdk.scripting.nashorn-8.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-8.sym.txt diff --git a/make/data/symbols/jdk.scripting.nashorn-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.scripting.nashorn-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-9.sym.txt diff --git a/make/data/symbols/jdk.scripting.nashorn-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.scripting.nashorn-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-A.sym.txt diff --git a/make/data/symbols/jdk.scripting.nashorn-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.scripting.nashorn-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-B.sym.txt diff --git a/make/data/symbols/jdk.scripting.nashorn-F.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-F.sym.txt similarity index 100% rename from make/data/symbols/jdk.scripting.nashorn-F.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.scripting.nashorn-F.sym.txt diff --git a/make/data/symbols/jdk.sctp-7.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.sctp-7.sym.txt similarity index 100% rename from make/data/symbols/jdk.sctp-7.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.sctp-7.sym.txt diff --git a/make/data/symbols/jdk.sctp-8.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.sctp-8.sym.txt similarity index 100% rename from make/data/symbols/jdk.sctp-8.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.sctp-8.sym.txt diff --git a/make/data/symbols/jdk.sctp-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.sctp-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.sctp-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.sctp-9.sym.txt diff --git a/make/data/symbols/jdk.sctp-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.sctp-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.sctp-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.sctp-A.sym.txt diff --git a/make/data/symbols/jdk.sctp-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.sctp-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.sctp-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.sctp-B.sym.txt diff --git a/make/data/symbols/jdk.sctp-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.sctp-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.sctp-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.sctp-G.sym.txt diff --git a/make/data/symbols/jdk.sctp-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.sctp-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.sctp-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.sctp-H.sym.txt diff --git a/make/data/symbols/jdk.sctp-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.sctp-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.sctp-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.sctp-I.sym.txt diff --git a/make/data/symbols/jdk.security.auth-7.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.auth-7.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.auth-7.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.auth-7.sym.txt diff --git a/make/data/symbols/jdk.security.auth-8.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.auth-8.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.auth-8.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.auth-8.sym.txt diff --git a/make/data/symbols/jdk.security.auth-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.auth-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.auth-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.auth-9.sym.txt diff --git a/make/data/symbols/jdk.security.auth-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.auth-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.auth-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.auth-A.sym.txt diff --git a/make/data/symbols/jdk.security.auth-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.auth-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.auth-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.auth-B.sym.txt diff --git a/make/data/symbols/jdk.security.auth-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.auth-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.auth-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.auth-G.sym.txt diff --git a/make/data/symbols/jdk.security.auth-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.auth-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.auth-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.auth-H.sym.txt diff --git a/make/data/symbols/jdk.security.auth-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.auth-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.auth-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.auth-I.sym.txt diff --git a/make/data/symbols/jdk.security.jgss-7.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.jgss-7.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.jgss-7.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.jgss-7.sym.txt diff --git a/make/data/symbols/jdk.security.jgss-8.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.jgss-8.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.jgss-8.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.jgss-8.sym.txt diff --git a/make/data/symbols/jdk.security.jgss-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.jgss-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.jgss-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.jgss-9.sym.txt diff --git a/make/data/symbols/jdk.security.jgss-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.jgss-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.jgss-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.jgss-A.sym.txt diff --git a/make/data/symbols/jdk.security.jgss-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.jgss-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.jgss-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.jgss-B.sym.txt diff --git a/make/data/symbols/jdk.security.jgss-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.jgss-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.jgss-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.jgss-G.sym.txt diff --git a/make/data/symbols/jdk.security.jgss-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.jgss-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.jgss-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.jgss-H.sym.txt diff --git a/make/data/symbols/jdk.security.jgss-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.security.jgss-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.security.jgss-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.security.jgss-I.sym.txt diff --git a/make/data/symbols/jdk.unsupported-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.unsupported-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.unsupported-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.unsupported-9.sym.txt diff --git a/make/data/symbols/jdk.unsupported-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.unsupported-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.unsupported-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.unsupported-A.sym.txt diff --git a/make/data/symbols/jdk.unsupported-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.unsupported-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.unsupported-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.unsupported-B.sym.txt diff --git a/make/data/symbols/jdk.unsupported-C.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.unsupported-C.sym.txt similarity index 100% rename from make/data/symbols/jdk.unsupported-C.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.unsupported-C.sym.txt diff --git a/make/data/symbols/jdk.unsupported-F.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.unsupported-F.sym.txt similarity index 100% rename from make/data/symbols/jdk.unsupported-F.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.unsupported-F.sym.txt diff --git a/make/data/symbols/jdk.unsupported-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.unsupported-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.unsupported-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.unsupported-G.sym.txt diff --git a/make/data/symbols/jdk.unsupported-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.unsupported-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.unsupported-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.unsupported-H.sym.txt diff --git a/make/data/symbols/jdk.unsupported-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.unsupported-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.unsupported-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.unsupported-I.sym.txt diff --git a/make/data/symbols/jdk.xml.dom-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.xml.dom-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.xml.dom-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.xml.dom-9.sym.txt diff --git a/make/data/symbols/jdk.xml.dom-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.xml.dom-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.xml.dom-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.xml.dom-A.sym.txt diff --git a/make/data/symbols/jdk.xml.dom-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.xml.dom-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.xml.dom-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.xml.dom-B.sym.txt diff --git a/make/data/symbols/jdk.xml.dom-G.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.xml.dom-G.sym.txt similarity index 100% rename from make/data/symbols/jdk.xml.dom-G.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.xml.dom-G.sym.txt diff --git a/make/data/symbols/jdk.xml.dom-H.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.xml.dom-H.sym.txt similarity index 100% rename from make/data/symbols/jdk.xml.dom-H.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.xml.dom-H.sym.txt diff --git a/make/data/symbols/jdk.xml.dom-I.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.xml.dom-I.sym.txt similarity index 100% rename from make/data/symbols/jdk.xml.dom-I.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.xml.dom-I.sym.txt diff --git a/make/data/symbols/jdk.zipfs-9.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.zipfs-9.sym.txt similarity index 100% rename from make/data/symbols/jdk.zipfs-9.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.zipfs-9.sym.txt diff --git a/make/data/symbols/jdk.zipfs-A.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.zipfs-A.sym.txt similarity index 100% rename from make/data/symbols/jdk.zipfs-A.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.zipfs-A.sym.txt diff --git a/make/data/symbols/jdk.zipfs-B.sym.txt b/src/jdk.compiler/share/data/symbols/jdk.zipfs-B.sym.txt similarity index 100% rename from make/data/symbols/jdk.zipfs-B.sym.txt rename to src/jdk.compiler/share/data/symbols/jdk.zipfs-B.sym.txt diff --git a/make/data/symbols/symbols b/src/jdk.compiler/share/data/symbols/symbols similarity index 100% rename from make/data/symbols/symbols rename to src/jdk.compiler/share/data/symbols/symbols diff --git a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyGenerator.java b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyGenerator.java index c7552402509313ad98521793f77c4656c47a3316..5bc199b55ad4b7b3fa3f0137fadfb3b0080e22dc 100644 --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyGenerator.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,6 +30,7 @@ import java.security.spec.AlgorithmParameterSpec; import javax.crypto.*; +import sun.security.util.SecurityProviderConstants; import static sun.security.pkcs11.TemplateManager.*; import sun.security.pkcs11.wrapper.*; import static sun.security.pkcs11.wrapper.PKCS11Constants.*; @@ -225,7 +226,8 @@ final class P11KeyGenerator extends KeyGeneratorSpi { significantKeySize = 168; break; case (int)CKM_AES_KEY_GEN: - keySize = adjustKeySize(128, range); + keySize = adjustKeySize + (SecurityProviderConstants.getDefAESKeySize(), range); keyType = CKK_AES; break; case (int)CKM_RC4_KEY_GEN: diff --git a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java index f13ae3cd67ddcad436de77bf6f808f3a1829dd41..ba99d0bcb5c13b67e88cc06093b5ba07e1e02d15 100644 --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -99,29 +99,35 @@ final class P11KeyPairGenerator extends KeyPairGeneratorSpi { // set default key sizes and apply our own algorithm-specific limits // override lower limit to disallow unsecure keys being generated // override upper limit to deter DOS attack - if (algorithm.equals("EC")) { - keySize = DEF_EC_KEY_SIZE; - if (minKeyLen < 112) { - minKeyLen = 112; - } - if (maxKeyLen > 2048) { - maxKeyLen = 2048; + int jdkMinKeyLen = 512; + int jdkMaxKeyLen = Integer.MAX_VALUE; + switch (algorithm) { + case "EC" -> { + keySize = DEF_EC_KEY_SIZE; + jdkMinKeyLen = 112; + jdkMaxKeyLen = 2048; } - } else { - if (algorithm.equals("DSA")) { + case "DSA" -> { keySize = DEF_DSA_KEY_SIZE; - } else if (algorithm.equals("RSA")) { + } + case "RSA" -> { keySize = DEF_RSA_KEY_SIZE; - if (maxKeyLen > 64 * 1024) { - maxKeyLen = 64 * 1024; - } - } else { + jdkMaxKeyLen = 64 * 1024; + } + case "DH" -> { keySize = DEF_DH_KEY_SIZE; } - if (minKeyLen < 512) { - minKeyLen = 512; + default -> { + throw new ProviderException + ("Unrecognized algorithm for checking key size"); } } + if (minKeyLen < jdkMinKeyLen) { + minKeyLen = jdkMinKeyLen; + } + if (maxKeyLen > jdkMaxKeyLen) { + maxKeyLen = jdkMaxKeyLen; + } // auto-adjust default keysize in case it's out-of-range if (keySize < minKeyLen) { diff --git a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyStore.java b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyStore.java index 585fb47ec5461492aa2fc7fdceb8ea538af6e5f2..fe8ffab7a46e649c75da93cf86c6fd4eb2bebabd 100644 --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyStore.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyStore.java @@ -25,6 +25,7 @@ package sun.security.pkcs11; +import java.lang.ref.Cleaner; import java.math.BigInteger; import java.io.InputStream; @@ -231,6 +232,8 @@ final class P11KeyStore extends KeyStoreSpi { private PasswordCallbackHandler(char[] password) { if (password != null) { this.password = password.clone(); + Cleaner.create().register(this, + () -> Arrays.fill(this.password, ' ')); } } @@ -242,14 +245,6 @@ final class P11KeyStore extends KeyStoreSpi { PasswordCallback pc = (PasswordCallback)callbacks[0]; pc.setPassword(password); // this clones the password if not null } - - @SuppressWarnings("removal") - protected void finalize() throws Throwable { - if (password != null) { - Arrays.fill(password, ' '); - } - super.finalize(); - } } /** diff --git a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/PKCS11.java b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/PKCS11.java index f87690bc24f96de870115022f843eee0cd74b35c..cf2e231ea91efa9083bad3cd22453c5dd1ec856d 100644 --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/PKCS11.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/PKCS11.java @@ -47,6 +47,7 @@ package sun.security.pkcs11.wrapper; +import java.lang.ref.Cleaner; import java.io.File; import java.io.IOException; import java.util.*; @@ -161,6 +162,9 @@ public class PKCS11 { // give up; just use what is returned by connect() } } + + // Calls disconnect() to cleanup the native part of the wrapper. + Cleaner.create().register(this, this::disconnect); } public CK_VERSION getVersion() { @@ -1657,18 +1661,6 @@ public class PKCS11 { return "Module name: " + pkcs11ModulePath; } - /** - * Calls disconnect() to cleanup the native part of the wrapper. Once this - * method is called, this object cannot be used any longer. Any subsequent - * call to a C_* method will result in a runtime exception. - * - * @exception Throwable If finalization fails. - */ - @SuppressWarnings("removal") - protected void finalize() throws Throwable { - disconnect(); - } - // PKCS11 subclass that has all methods synchronized and delegating to the // parent. Used for tokens that only support single threaded access static class SynchronizedPKCS11 extends PKCS11 { diff --git a/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp b/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp index b7a2c6dde8fe56c4184f747a5d62aa4956ff8599..9accba375a2553020d96a7e9c2f0f427683b919e 100644 --- a/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp +++ b/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2021, NTT DATA. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -60,6 +60,10 @@ #include "sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext.h" #endif +#ifdef riscv64 +#include "sun_jvm_hotspot_debugger_riscv64_RISCV64ThreadContext.h" +#endif + class AutoJavaString { JNIEnv* m_env; jstring m_str; @@ -408,7 +412,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo return (err == PS_OK)? array : 0; } -#if defined(i586) || defined(amd64) || defined(ppc64) || defined(ppc64le) || defined(aarch64) +#if defined(i586) || defined(amd64) || defined(ppc64) || defined(ppc64le) || defined(aarch64) || defined(riscv64) extern "C" JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0 (JNIEnv *env, jobject this_obj, jint lwp_id) { @@ -440,6 +444,9 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo #ifdef aarch64 #define NPRGREG sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_NPRGREG #endif +#ifdef riscv64 +#define NPRGREG sun_jvm_hotspot_debugger_riscv64_RISCV64ThreadContext_NPRGREG +#endif #if defined(ppc64) || defined(ppc64le) #define NPRGREG sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext_NPRGREG #endif @@ -516,6 +523,44 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo } #endif /* aarch64 */ +#if defined(riscv64) +#define REG_INDEX(reg) sun_jvm_hotspot_debugger_riscv64_RISCV64ThreadContext_##reg + + regs[REG_INDEX(PC)] = gregs.pc; + regs[REG_INDEX(LR)] = gregs.ra; + regs[REG_INDEX(SP)] = gregs.sp; + regs[REG_INDEX(R3)] = gregs.gp; + regs[REG_INDEX(R4)] = gregs.tp; + regs[REG_INDEX(R5)] = gregs.t0; + regs[REG_INDEX(R6)] = gregs.t1; + regs[REG_INDEX(R7)] = gregs.t2; + regs[REG_INDEX(R8)] = gregs.s0; + regs[REG_INDEX(R9)] = gregs.s1; + regs[REG_INDEX(R10)] = gregs.a0; + regs[REG_INDEX(R11)] = gregs.a1; + regs[REG_INDEX(R12)] = gregs.a2; + regs[REG_INDEX(R13)] = gregs.a3; + regs[REG_INDEX(R14)] = gregs.a4; + regs[REG_INDEX(R15)] = gregs.a5; + regs[REG_INDEX(R16)] = gregs.a6; + regs[REG_INDEX(R17)] = gregs.a7; + regs[REG_INDEX(R18)] = gregs.s2; + regs[REG_INDEX(R19)] = gregs.s3; + regs[REG_INDEX(R20)] = gregs.s4; + regs[REG_INDEX(R21)] = gregs.s5; + regs[REG_INDEX(R22)] = gregs.s6; + regs[REG_INDEX(R23)] = gregs.s7; + regs[REG_INDEX(R24)] = gregs.s8; + regs[REG_INDEX(R25)] = gregs.s9; + regs[REG_INDEX(R26)] = gregs.s10; + regs[REG_INDEX(R27)] = gregs.s11; + regs[REG_INDEX(R28)] = gregs.t3; + regs[REG_INDEX(R29)] = gregs.t4; + regs[REG_INDEX(R30)] = gregs.t5; + regs[REG_INDEX(R31)] = gregs.t6; + +#endif /* riscv64 */ + #if defined(ppc64) || defined(ppc64le) #define REG_INDEX(reg) sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext_##reg diff --git a/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h b/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h index b0fcfb1e4d59b97aaad6d9199c98970f92530705..a69496e77a4d46ee4593ae6d4a996189ad2dad0e 100644 --- a/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h +++ b/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,6 +43,8 @@ #elif defined(arm) #include #define user_regs_struct pt_regs +#elif defined(riscv64) +#include #endif // This C bool type must be int for compatibility with Linux calls and diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java index 04db854c84d03f2e064e3ee8305a437e19856478..12983fc93cdfaea0e1bc74d879a1be167bd669e9 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java @@ -36,6 +36,7 @@ import sun.jvm.hotspot.debugger.MachineDescription; import sun.jvm.hotspot.debugger.MachineDescriptionAMD64; import sun.jvm.hotspot.debugger.MachineDescriptionPPC64; import sun.jvm.hotspot.debugger.MachineDescriptionAArch64; +import sun.jvm.hotspot.debugger.MachineDescriptionRISCV64; import sun.jvm.hotspot.debugger.MachineDescriptionIntelX86; import sun.jvm.hotspot.debugger.NoSuchSymbolException; import sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal; @@ -476,12 +477,8 @@ public class HotSpotAgent { throw new DebuggerException("Cannot find alternate SA Debugger: '" + alternateName + "'"); } catch (NoSuchMethodException nsme) { throw new DebuggerException("Alternate SA Debugger: '" + alternateName + "' has missing constructor."); - } catch (InstantiationException ie) { - throw new DebuggerException("Alternate SA Debugger: '" + alternateName + "' fails to initialise: ", ie); - } catch (IllegalAccessException iae) { - throw new DebuggerException("Alternate SA Debugger: '" + alternateName + "' fails to initialise: ", iae); - } catch (InvocationTargetException iae) { - throw new DebuggerException("Alternate SA Debugger: '" + alternateName + "' fails to initialise: ", iae); + } catch (InstantiationException | InvocationTargetException | IllegalAccessException e) { + throw new DebuggerException("Alternate SA Debugger: '" + alternateName + "' fails to initialise: ", e); } System.err.println("Loaded alternate HotSpot SA Debugger: " + alternateName); @@ -558,6 +555,8 @@ public class HotSpotAgent { machDesc = new MachineDescriptionPPC64(); } else if (cpu.equals("aarch64")) { machDesc = new MachineDescriptionAArch64(); + } else if (cpu.equals("riscv64")) { + machDesc = new MachineDescriptionRISCV64(); } else { try { machDesc = (MachineDescription) diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/CardGeneration.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionRISCV64.java similarity index 65% rename from src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/CardGeneration.java rename to src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionRISCV64.java index 3d96d33d81e8974677bbfb23676689472da2c895..a972516dee3b0e418da8a1e383c5571ed656ce9e 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/CardGeneration.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionRISCV64.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, Huawei Technologies Co., Ltd. All rights reserved. * 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 +23,18 @@ * */ -package sun.jvm.hotspot.gc.shared; +package sun.jvm.hotspot.debugger; -import sun.jvm.hotspot.debugger.*; - -/** Class CardGeneration is a generation that is covered by a card - table, and uses a card-size block-offset array to implement - block_start. */ +public class MachineDescriptionRISCV64 extends MachineDescriptionTwosComplement implements MachineDescription { + public long getAddressSize() { + return 8; + } -public abstract class CardGeneration extends Generation { - public CardGeneration(Address addr) { - super(addr); + public boolean isLP64() { + return true; } - // FIXME: not sure what I need to expose from here in order to have - // verification similar to that of the old RememberedSet + public boolean isBigEndian() { + return false; + } } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java index 491e3d5dc2c007f50772df4b60ce76105778c8d2..469bb6e0665557f053985688d4a921b858aa0f49 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, Red Hat Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -33,11 +33,13 @@ import sun.jvm.hotspot.debugger.cdbg.*; import sun.jvm.hotspot.debugger.x86.*; import sun.jvm.hotspot.debugger.amd64.*; import sun.jvm.hotspot.debugger.aarch64.*; +import sun.jvm.hotspot.debugger.riscv64.*; import sun.jvm.hotspot.debugger.ppc64.*; import sun.jvm.hotspot.debugger.linux.x86.*; import sun.jvm.hotspot.debugger.linux.amd64.*; import sun.jvm.hotspot.debugger.linux.ppc64.*; import sun.jvm.hotspot.debugger.linux.aarch64.*; +import sun.jvm.hotspot.debugger.linux.riscv64.*; import sun.jvm.hotspot.utilities.*; class LinuxCDebugger implements CDebugger { @@ -105,7 +107,14 @@ class LinuxCDebugger implements CDebugger { Address pc = context.getRegisterAsAddress(AARCH64ThreadContext.PC); if (pc == null) return null; return new LinuxAARCH64CFrame(dbg, fp, pc); - } else { + } else if (cpu.equals("riscv64")) { + RISCV64ThreadContext context = (RISCV64ThreadContext) thread.getContext(); + Address fp = context.getRegisterAsAddress(RISCV64ThreadContext.FP); + if (fp == null) return null; + Address pc = context.getRegisterAsAddress(RISCV64ThreadContext.PC); + if (pc == null) return null; + return new LinuxRISCV64CFrame(dbg, fp, pc); + } else { // Runtime exception thrown by LinuxThreadContextFactory if unknown cpu ThreadContext context = (ThreadContext) thread.getContext(); return context.getTopFrame(dbg); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/riscv64/LinuxRISCV64CFrame.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/riscv64/LinuxRISCV64CFrame.java new file mode 100644 index 0000000000000000000000000000000000000000..f06da24bd0e30e8e442de1fffe824f5f5fef164b --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/riscv64/LinuxRISCV64CFrame.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.debugger.linux.riscv64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.riscv64.*; +import sun.jvm.hotspot.debugger.linux.*; +import sun.jvm.hotspot.debugger.cdbg.*; +import sun.jvm.hotspot.debugger.cdbg.basic.*; + +public final class LinuxRISCV64CFrame extends BasicCFrame { + private static final int C_FRAME_LINK_OFFSET = -2; + private static final int C_FRAME_RETURN_ADDR_OFFSET = -1; + + public LinuxRISCV64CFrame(LinuxDebugger dbg, Address fp, Address pc) { + super(dbg.getCDebugger()); + this.fp = fp; + this.pc = pc; + this.dbg = dbg; + } + + // override base class impl to avoid ELF parsing + public ClosestSymbol closestSymbolToPC() { + // try native lookup in debugger. + return dbg.lookup(dbg.getAddressValue(pc())); + } + + public Address pc() { + return pc; + } + + public Address localVariableBase() { + return fp; + } + + public CFrame sender(ThreadProxy thread) { + RISCV64ThreadContext context = (RISCV64ThreadContext) thread.getContext(); + Address rsp = context.getRegisterAsAddress(RISCV64ThreadContext.SP); + + if ((fp == null) || fp.lessThan(rsp)) { + return null; + } + + // Check alignment of fp + if (dbg.getAddressValue(fp) % (2 * ADDRESS_SIZE) != 0) { + return null; + } + + Address nextFP = fp.getAddressAt(C_FRAME_LINK_OFFSET * ADDRESS_SIZE); + if (nextFP == null || nextFP.lessThanOrEqual(fp)) { + return null; + } + Address nextPC = fp.getAddressAt(C_FRAME_RETURN_ADDR_OFFSET * ADDRESS_SIZE); + if (nextPC == null) { + return null; + } + return new LinuxRISCV64CFrame(dbg, nextFP, nextPC); + } + + // package/class internals only + private static final int ADDRESS_SIZE = 8; + private Address pc; + private Address sp; + private Address fp; + private LinuxDebugger dbg; +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/riscv64/LinuxRISCV64ThreadContext.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/riscv64/LinuxRISCV64ThreadContext.java new file mode 100644 index 0000000000000000000000000000000000000000..fdb841ccf3dbcb43bd686a2ab17aab9c89bb664e --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/riscv64/LinuxRISCV64ThreadContext.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.debugger.linux.riscv64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.riscv64.*; +import sun.jvm.hotspot.debugger.linux.*; + +public class LinuxRISCV64ThreadContext extends RISCV64ThreadContext { + private LinuxDebugger debugger; + + public LinuxRISCV64ThreadContext(LinuxDebugger debugger) { + super(); + this.debugger = debugger; + } + + public void setRegisterAsAddress(int index, Address value) { + setRegister(index, debugger.getAddressValue(value)); + } + + public Address getRegisterAsAddress(int index) { + return debugger.newAddress(getRegister(index)); + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/proc/riscv64/ProcRISCV64Thread.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/proc/riscv64/ProcRISCV64Thread.java new file mode 100644 index 0000000000000000000000000000000000000000..96d5dee47cee343d2b45f038534bd3e4c6b98bff --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/proc/riscv64/ProcRISCV64Thread.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.debugger.proc.riscv64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.riscv64.*; +import sun.jvm.hotspot.debugger.proc.*; +import sun.jvm.hotspot.utilities.*; + +public class ProcRISCV64Thread implements ThreadProxy { + private ProcDebugger debugger; + private int id; + + public ProcRISCV64Thread(ProcDebugger debugger, Address addr) { + this.debugger = debugger; + + // FIXME: the size here should be configurable. However, making it + // so would produce a dependency on the "types" package from the + // debugger package, which is not desired. + this.id = (int) addr.getCIntegerAt(0, 4, true); + } + + public ProcRISCV64Thread(ProcDebugger debugger, long id) { + this.debugger = debugger; + this.id = (int) id; + } + + public ThreadContext getContext() throws IllegalThreadStateException { + ProcRISCV64ThreadContext context = new ProcRISCV64ThreadContext(debugger); + long[] regs = debugger.getThreadIntegerRegisterSet(id); + if (Assert.ASSERTS_ENABLED) { + Assert.that(regs.length == RISCV64ThreadContext.NPRGREG, "size mismatch"); + } + for (int i = 0; i < regs.length; i++) { + context.setRegister(i, regs[i]); + } + return context; + } + + public boolean canSetContext() throws DebuggerException { + return false; + } + + public void setContext(ThreadContext context) + throws IllegalThreadStateException, DebuggerException { + throw new DebuggerException("Unimplemented"); + } + + public String toString() { + return "t@" + id; + } + + public boolean equals(Object obj) { + if ((obj == null) || !(obj instanceof ProcRISCV64Thread)) { + return false; + } + + return (((ProcRISCV64Thread) obj).id == id); + } + + public int hashCode() { + return id; + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/proc/riscv64/ProcRISCV64ThreadContext.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/proc/riscv64/ProcRISCV64ThreadContext.java new file mode 100644 index 0000000000000000000000000000000000000000..f2aa845e665c84a3e9f3cf05c78ba4e2579828db --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/proc/riscv64/ProcRISCV64ThreadContext.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.debugger.proc.riscv64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.riscv64.*; +import sun.jvm.hotspot.debugger.proc.*; + +public class ProcRISCV64ThreadContext extends RISCV64ThreadContext { + private ProcDebugger debugger; + + public ProcRISCV64ThreadContext(ProcDebugger debugger) { + super(); + this.debugger = debugger; + } + + public void setRegisterAsAddress(int index, Address value) { + setRegister(index, debugger.getAddressValue(value)); + } + + public Address getRegisterAsAddress(int index) { + return debugger.newAddress(getRegister(index)); + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/proc/riscv64/ProcRISCV64ThreadFactory.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/proc/riscv64/ProcRISCV64ThreadFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..19f64b8ce2dc8bb70e69b77db93479f59fb1d419 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/proc/riscv64/ProcRISCV64ThreadFactory.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.debugger.proc.riscv64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.proc.*; + +public class ProcRISCV64ThreadFactory implements ProcThreadFactory { + private ProcDebugger debugger; + + public ProcRISCV64ThreadFactory(ProcDebugger debugger) { + this.debugger = debugger; + } + + public ThreadProxy createThreadWrapper(Address threadIdentifierAddr) { + return new ProcRISCV64Thread(debugger, threadIdentifierAddr); + } + + public ThreadProxy createThreadWrapper(long id) { + return new ProcRISCV64Thread(debugger, id); + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/riscv64/RemoteRISCV64Thread.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/riscv64/RemoteRISCV64Thread.java new file mode 100644 index 0000000000000000000000000000000000000000..aecbda590238ac40b3450f6c1ea88fcf132df9e3 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/riscv64/RemoteRISCV64Thread.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.debugger.remote.riscv64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.riscv64.*; +import sun.jvm.hotspot.debugger.remote.*; +import sun.jvm.hotspot.utilities.*; + +public class RemoteRISCV64Thread extends RemoteThread { + public RemoteRISCV64Thread(RemoteDebuggerClient debugger, Address addr) { + super(debugger, addr); + } + + public RemoteRISCV64Thread(RemoteDebuggerClient debugger, long id) { + super(debugger, id); + } + + public ThreadContext getContext() throws IllegalThreadStateException { + RemoteRISCV64ThreadContext context = new RemoteRISCV64ThreadContext(debugger); + long[] regs = (addr != null)? debugger.getThreadIntegerRegisterSet(addr) : + debugger.getThreadIntegerRegisterSet(id); + if (Assert.ASSERTS_ENABLED) { + Assert.that(regs.length == RISCV64ThreadContext.NPRGREG, "size of register set must match"); + } + for (int i = 0; i < regs.length; i++) { + context.setRegister(i, regs[i]); + } + return context; + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/riscv64/RemoteRISCV64ThreadContext.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/riscv64/RemoteRISCV64ThreadContext.java new file mode 100644 index 0000000000000000000000000000000000000000..1d3da6be5afe1dff774bb6edf0a67601bb2cb770 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/riscv64/RemoteRISCV64ThreadContext.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.debugger.remote.riscv64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.riscv64.*; +import sun.jvm.hotspot.debugger.remote.*; + +public class RemoteRISCV64ThreadContext extends RISCV64ThreadContext { + private RemoteDebuggerClient debugger; + + public RemoteRISCV64ThreadContext(RemoteDebuggerClient debugger) { + super(); + this.debugger = debugger; + } + + public void setRegisterAsAddress(int index, Address value) { + setRegister(index, debugger.getAddressValue(value)); + } + + public Address getRegisterAsAddress(int index) { + return debugger.newAddress(getRegister(index)); + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/riscv64/RemoteRISCV64ThreadFactory.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/riscv64/RemoteRISCV64ThreadFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..725b94e25a31e2527aae984aa7e92ffeac731dbc --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/riscv64/RemoteRISCV64ThreadFactory.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.debugger.remote.riscv64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.remote.*; + +public class RemoteRISCV64ThreadFactory implements RemoteThreadFactory { + private RemoteDebuggerClient debugger; + + public RemoteRISCV64ThreadFactory(RemoteDebuggerClient debugger) { + this.debugger = debugger; + } + + public ThreadProxy createThreadWrapper(Address threadIdentifierAddr) { + return new RemoteRISCV64Thread(debugger, threadIdentifierAddr); + } + + public ThreadProxy createThreadWrapper(long id) { + return new RemoteRISCV64Thread(debugger, id); + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/riscv64/RISCV64ThreadContext.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/riscv64/RISCV64ThreadContext.java new file mode 100644 index 0000000000000000000000000000000000000000..fb60a70427a5f455a3198c1f09a1d3ef4193c9a7 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/riscv64/RISCV64ThreadContext.java @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.debugger.riscv64; + +import java.lang.annotation.Native; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.cdbg.*; + +/** Specifies the thread context on riscv64 platforms; only a sub-portion + * of the context is guaranteed to be present on all operating + * systems. */ + +public abstract class RISCV64ThreadContext implements ThreadContext { + // Taken from /usr/include/asm/sigcontext.h on Linux/RISCV64. + + // /* + // * Signal context structure - contains all info to do with the state + // * before the signal handler was invoked. + // */ + // struct sigcontext { + // struct user_regs_struct sc_regs; + // union __riscv_fp_state sc_fpregs; + // }; + // + // struct user_regs_struct { + // unsigned long pc; + // unsigned long ra; + // unsigned long sp; + // unsigned long gp; + // unsigned long tp; + // unsigned long t0; + // unsigned long t1; + // unsigned long t2; + // unsigned long s0; + // unsigned long s1; + // unsigned long a0; + // unsigned long a1; + // unsigned long a2; + // unsigned long a3; + // unsigned long a4; + // unsigned long a5; + // unsigned long a6; + // unsigned long a7; + // unsigned long s2; + // unsigned long s3; + // unsigned long s4; + // unsigned long s5; + // unsigned long s6; + // unsigned long s7; + // unsigned long s8; + // unsigned long s9; + // unsigned long s10; + // unsigned long s11; + // unsigned long t3; + // unsigned long t4; + // unsigned long t5; + // unsigned long t6; + // }; + + // NOTE: the indices for the various registers must be maintained as + // listed across various operating systems. However, only a small + // subset of the registers' values are guaranteed to be present (and + // must be present for the SA's stack walking to work) + + // One instance of the Native annotation is enough to trigger header generation + // for this file. + @Native + public static final int R0 = 0; + public static final int R1 = 1; + public static final int R2 = 2; + public static final int R3 = 3; + public static final int R4 = 4; + public static final int R5 = 5; + public static final int R6 = 6; + public static final int R7 = 7; + public static final int R8 = 8; + public static final int R9 = 9; + public static final int R10 = 10; + public static final int R11 = 11; + public static final int R12 = 12; + public static final int R13 = 13; + public static final int R14 = 14; + public static final int R15 = 15; + public static final int R16 = 16; + public static final int R17 = 17; + public static final int R18 = 18; + public static final int R19 = 19; + public static final int R20 = 20; + public static final int R21 = 21; + public static final int R22 = 22; + public static final int R23 = 23; + public static final int R24 = 24; + public static final int R25 = 25; + public static final int R26 = 26; + public static final int R27 = 27; + public static final int R28 = 28; + public static final int R29 = 29; + public static final int R30 = 30; + public static final int R31 = 31; + + public static final int NPRGREG = 32; + + public static final int PC = R0; + public static final int LR = R1; + public static final int SP = R2; + public static final int FP = R8; + + private long[] data; + + public RISCV64ThreadContext() { + data = new long[NPRGREG]; + } + + public int getNumRegisters() { + return NPRGREG; + } + + public String getRegisterName(int index) { + switch (index) { + case LR: return "lr"; + case SP: return "sp"; + case PC: return "pc"; + default: + return "r" + index; + } + } + + public void setRegister(int index, long value) { + data[index] = value; + } + + public long getRegister(int index) { + return data[index]; + } + + public CFrame getTopFrame(Debugger dbg) { + return null; + } + + /** This can't be implemented in this class since we would have to + * tie the implementation to, for example, the debugging system */ + public abstract void setRegisterAsAddress(int index, Address value); + + /** This can't be implemented in this class since we would have to + * tie the implementation to, for example, the debugging system */ + public abstract Address getRegisterAsAddress(int index); +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/win32/coff/COFFFileParser.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/win32/coff/COFFFileParser.java index 10ac92556369283b6bf38794f43b74aa65410c91..198f5ca6d07faba747fbba67c483237a5ece7254 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/win32/coff/COFFFileParser.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/win32/coff/COFFFileParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -76,8 +76,6 @@ public class COFFFileParser { // a bug if there is one. (FIXME) // buf.order(ByteOrder.nativeOrder()); return parse(new MappedByteBufferDataSource(buf)); - } catch (FileNotFoundException e) { - throw new COFFException(e); } catch (IOException e) { throw new COFFException(e); } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/serial/TenuredGeneration.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/serial/TenuredGeneration.java index 6f121f963af17f69ff31bd4acb94c14cff0ed8de..cc4f216efc2047b4266d44fdb0f17fd61987ba17 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/serial/TenuredGeneration.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/serial/TenuredGeneration.java @@ -39,7 +39,7 @@ import sun.jvm.hotspot.utilities.Observer;

    Garbage collection is performed using mark-compact.

    */ -public class TenuredGeneration extends CardGeneration { +public class TenuredGeneration extends Generation { private static AddressField theSpaceField; static { diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/Generation.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/Generation.java index eeb099a11dca80539d544f4f8d442363d9ad6cf3..5323d9cee4e9d10979d11051dbfa6cf6b8f4adfa 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/Generation.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/Generation.java @@ -38,10 +38,7 @@ import sun.jvm.hotspot.utilities.Observer;
    • Generation
        -
      • CardGeneration -
          -
        • TenuredGeneration -
        +
      • TenuredGeneration
      • DefNewGeneration
    diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Thread.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Thread.java index b091afece874b1d3f21f89e3aeaa0a3f8db82fff..355f78e44060061e99c1fbe77f8028be6b7a06c8 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Thread.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Thread.java @@ -34,8 +34,6 @@ public class Thread extends VMObject { private static long tlabFieldOffset; private static CIntegerField suspendFlagsField; - // Thread::SuspendFlags enum constants - private static int HAS_ASYNC_EXCEPTION; private static AddressField currentPendingMonitorField; private static AddressField currentWaitingMonitorField; @@ -55,7 +53,6 @@ public class Thread extends VMObject { Type typeJavaThread = db.lookupType("JavaThread"); suspendFlagsField = typeJavaThread.getCIntegerField("_suspend_flags"); - HAS_ASYNC_EXCEPTION = db.lookupIntConstant("JavaThread::_has_async_exception").intValue(); tlabFieldOffset = typeThread.getField("_tlab").getOffset(); currentPendingMonitorField = typeJavaThread.getAddressField("_current_pending_monitor"); @@ -71,10 +68,6 @@ public class Thread extends VMObject { return (int) suspendFlagsField.getValue(addr); } - public boolean hasAsyncException() { - return (suspendFlags() & HAS_ASYNC_EXCEPTION) != 0; - } - public ThreadLocalAllocBuffer tlab() { return new ThreadLocalAllocBuffer(addr.addOffsetTo(tlabFieldOffset)); } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java index 4a2fa691d3ff6180c61d45b728632ef6a132c7ba..d16ac8aae518633cdc78fc204893809ead67c54c 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,7 @@ import sun.jvm.hotspot.runtime.win32_aarch64.Win32AARCH64JavaThreadPDAccess; import sun.jvm.hotspot.runtime.linux_x86.LinuxX86JavaThreadPDAccess; import sun.jvm.hotspot.runtime.linux_amd64.LinuxAMD64JavaThreadPDAccess; import sun.jvm.hotspot.runtime.linux_aarch64.LinuxAARCH64JavaThreadPDAccess; +import sun.jvm.hotspot.runtime.linux_riscv64.LinuxRISCV64JavaThreadPDAccess; import sun.jvm.hotspot.runtime.linux_ppc64.LinuxPPC64JavaThreadPDAccess; import sun.jvm.hotspot.runtime.bsd_x86.BsdX86JavaThreadPDAccess; import sun.jvm.hotspot.runtime.bsd_amd64.BsdAMD64JavaThreadPDAccess; @@ -113,6 +114,8 @@ public class Threads { access = new LinuxPPC64JavaThreadPDAccess(); } else if (cpu.equals("aarch64")) { access = new LinuxAARCH64JavaThreadPDAccess(); + } else if (cpu.equals("riscv64")) { + access = new LinuxRISCV64JavaThreadPDAccess(); } else { try { access = (JavaThreadPDAccess) diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_riscv64/LinuxRISCV64JavaThreadPDAccess.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_riscv64/LinuxRISCV64JavaThreadPDAccess.java new file mode 100644 index 0000000000000000000000000000000000000000..f2e224f28eeaa5be7f431bed226c5b300c0c8910 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_riscv64/LinuxRISCV64JavaThreadPDAccess.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.runtime.linux_riscv64; + +import java.io.*; +import java.util.*; +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.riscv64.*; +import sun.jvm.hotspot.runtime.*; +import sun.jvm.hotspot.runtime.riscv64.*; +import sun.jvm.hotspot.types.*; +import sun.jvm.hotspot.utilities.*; +import sun.jvm.hotspot.utilities.Observable; +import sun.jvm.hotspot.utilities.Observer; + +public class LinuxRISCV64JavaThreadPDAccess implements JavaThreadPDAccess { + private static AddressField lastJavaFPField; + private static AddressField osThreadField; + + // Field from OSThread + private static CIntegerField osThreadThreadIDField; + + // This is currently unneeded but is being kept in case we change + // the currentFrameGuess algorithm + private static final long GUESS_SCAN_RANGE = 128 * 1024; + + static { + VM.registerVMInitializedObserver(new Observer() { + public void update(Observable o, Object data) { + initialize(VM.getVM().getTypeDataBase()); + } + }); + } + + private static synchronized void initialize(TypeDataBase db) { + Type type = db.lookupType("JavaThread"); + osThreadField = type.getAddressField("_osthread"); + + Type anchorType = db.lookupType("JavaFrameAnchor"); + lastJavaFPField = anchorType.getAddressField("_last_Java_fp"); + + Type osThreadType = db.lookupType("OSThread"); + osThreadThreadIDField = osThreadType.getCIntegerField("_thread_id"); + } + + public Address getLastJavaFP(Address addr) { + return lastJavaFPField.getValue(addr.addOffsetTo(sun.jvm.hotspot.runtime.JavaThread.getAnchorField().getOffset())); + } + + public Address getLastJavaPC(Address addr) { + return null; + } + + public Address getBaseOfStackPointer(Address addr) { + return null; + } + + public Frame getLastFramePD(JavaThread thread, Address addr) { + Address fp = thread.getLastJavaFP(); + if (fp == null) { + return null; // no information + } + return new RISCV64Frame(thread.getLastJavaSP(), fp); + } + + public RegisterMap newRegisterMap(JavaThread thread, boolean updateMap) { + return new RISCV64RegisterMap(thread, updateMap); + } + + public Frame getCurrentFrameGuess(JavaThread thread, Address addr) { + ThreadProxy t = getThreadProxy(addr); + RISCV64ThreadContext context = (RISCV64ThreadContext) t.getContext(); + RISCV64CurrentFrameGuess guesser = new RISCV64CurrentFrameGuess(context, thread); + if (!guesser.run(GUESS_SCAN_RANGE)) { + return null; + } + if (guesser.getPC() == null) { + return new RISCV64Frame(guesser.getSP(), guesser.getFP()); + } else { + return new RISCV64Frame(guesser.getSP(), guesser.getFP(), guesser.getPC()); + } + } + + public void printThreadIDOn(Address addr, PrintStream tty) { + tty.print(getThreadProxy(addr)); + } + + public void printInfoOn(Address threadAddr, PrintStream tty) { + tty.print("Thread id: "); + printThreadIDOn(threadAddr, tty); + } + + public Address getLastSP(Address addr) { + ThreadProxy t = getThreadProxy(addr); + RISCV64ThreadContext context = (RISCV64ThreadContext) t.getContext(); + return context.getRegisterAsAddress(RISCV64ThreadContext.SP); + } + + public ThreadProxy getThreadProxy(Address addr) { + // Addr is the address of the JavaThread. + // Fetch the OSThread (for now and for simplicity, not making a + // separate "OSThread" class in this package) + Address osThreadAddr = osThreadField.getValue(addr); + // Get the address of the _thread_id from the OSThread + Address threadIdAddr = osThreadAddr.addOffsetTo(osThreadThreadIDField.getOffset()); + + JVMDebugger debugger = VM.getVM().getDebugger(); + return debugger.getThreadForIdentifierAddress(threadIdAddr); + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64CurrentFrameGuess.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64CurrentFrameGuess.java new file mode 100644 index 0000000000000000000000000000000000000000..34701c6922f3deaad09c9cb8d08165a7a55af82d --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64CurrentFrameGuess.java @@ -0,0 +1,223 @@ +/* + * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.runtime.riscv64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.riscv64.*; +import sun.jvm.hotspot.code.*; +import sun.jvm.hotspot.interpreter.*; +import sun.jvm.hotspot.runtime.*; +import sun.jvm.hotspot.runtime.riscv64.*; + +/**

    Should be able to be used on all riscv64 platforms we support + (Linux/riscv64) to implement JavaThread's "currentFrameGuess()" + functionality. Input is an RISCV64ThreadContext; output is SP, FP, + and PC for an RISCV64Frame. Instantiation of the RISCV64Frame is + left to the caller, since we may need to subclass RISCV64Frame to + support signal handler frames on Unix platforms.

    + +

    Algorithm is to walk up the stack within a given range (say, + 512K at most) looking for a plausible PC and SP for a Java frame, + also considering those coming in from the context. If we find a PC + that belongs to the VM (i.e., in generated code like the + interpreter or CodeCache) then we try to find an associated FP. + We repeat this until we either find a complete frame or run out of + stack to look at.

    */ + +public class RISCV64CurrentFrameGuess { + private RISCV64ThreadContext context; + private JavaThread thread; + private Address spFound; + private Address fpFound; + private Address pcFound; + + private static final boolean DEBUG = System.getProperty("sun.jvm.hotspot.runtime.riscv64.RISCV64Frame.DEBUG") + != null; + + public RISCV64CurrentFrameGuess(RISCV64ThreadContext context, + JavaThread thread) { + this.context = context; + this.thread = thread; + } + + /** Returns false if not able to find a frame within a reasonable range. */ + public boolean run(long regionInBytesToSearch) { + Address sp = context.getRegisterAsAddress(RISCV64ThreadContext.SP); + Address pc = context.getRegisterAsAddress(RISCV64ThreadContext.PC); + Address fp = context.getRegisterAsAddress(RISCV64ThreadContext.FP); + if (sp == null) { + // Bail out if no last java frame either + if (thread.getLastJavaSP() != null) { + setValues(thread.getLastJavaSP(), thread.getLastJavaFP(), null); + return true; + } + return false; + } + Address end = sp.addOffsetTo(regionInBytesToSearch); + VM vm = VM.getVM(); + + setValues(null, null, null); // Assume we're not going to find anything + + if (vm.isJavaPCDbg(pc)) { + if (vm.isClientCompiler()) { + // If the topmost frame is a Java frame, we are (pretty much) + // guaranteed to have a viable FP. We should be more robust + // than this (we have the potential for losing entire threads' + // stack traces) but need to see how much work we really have + // to do here. Searching the stack for an (SP, FP) pair is + // hard since it's easy to misinterpret inter-frame stack + // pointers as base-of-frame pointers; we also don't know the + // sizes of C1 frames (not registered in the nmethod) so can't + // derive them from SP. + + setValues(sp, fp, pc); + return true; + } else { + if (vm.getInterpreter().contains(pc)) { + if (DEBUG) { + System.out.println("CurrentFrameGuess: choosing interpreter frame: sp = " + + sp + ", fp = " + fp + ", pc = " + pc); + } + setValues(sp, fp, pc); + return true; + } + + // For the server compiler, FP is not guaranteed to be valid + // for compiled code. In addition, an earlier attempt at a + // non-searching algorithm (see below) failed because the + // stack pointer from the thread context was pointing + // (considerably) beyond the ostensible end of the stack, into + // garbage; walking from the topmost frame back caused a crash. + // + // This algorithm takes the current PC as a given and tries to + // find the correct corresponding SP by walking up the stack + // and repeatedly performing stackwalks (very inefficient). + // + // FIXME: there is something wrong with stackwalking across + // adapter frames...this is likely to be the root cause of the + // failure with the simpler algorithm below. + + for (long offset = 0; + offset < regionInBytesToSearch; + offset += vm.getAddressSize()) { + try { + Address curSP = sp.addOffsetTo(offset); + Frame frame = new RISCV64Frame(curSP, null, pc); + RegisterMap map = thread.newRegisterMap(false); + while (frame != null) { + if (frame.isEntryFrame() && frame.entryFrameIsFirst()) { + // We were able to traverse all the way to the + // bottommost Java frame. + // This sp looks good. Keep it. + if (DEBUG) { + System.out.println("CurrentFrameGuess: Choosing sp = " + curSP + ", pc = " + pc); + } + setValues(curSP, null, pc); + return true; + } + frame = frame.sender(map); + } + } catch (Exception e) { + if (DEBUG) { + System.out.println("CurrentFrameGuess: Exception " + e + " at offset " + offset); + } + // Bad SP. Try another. + } + } + + // Were not able to find a plausible SP to go with this PC. + // Bail out. + return false; + } + } else { + // If the current program counter was not known to us as a Java + // PC, we currently assume that we are in the run-time system + // and attempt to look to thread-local storage for saved SP and + // FP. Note that if these are null (because we were, in fact, + // in Java code, i.e., vtable stubs or similar, and the SA + // didn't have enough insight into the target VM to understand + // that) then we are going to lose the entire stack trace for + // the thread, which is sub-optimal. FIXME. + + if (DEBUG) { + System.out.println("CurrentFrameGuess: choosing last Java frame: sp = " + + thread.getLastJavaSP() + ", fp = " + thread.getLastJavaFP()); + } + if (thread.getLastJavaSP() == null) { + return false; // No known Java frames on stack + } + + // The runtime has a nasty habit of not saving fp in the frame + // anchor, leaving us to grovel about in the stack to find a + // plausible address. Fortunately, this only happens in + // compiled code; there we always have a valid PC, and we always + // push LR and FP onto the stack as a pair, with FP at the lower + // address. + pc = thread.getLastJavaPC(); + fp = thread.getLastJavaFP(); + sp = thread.getLastJavaSP(); + + if (fp == null) { + CodeCache cc = vm.getCodeCache(); + if (cc.contains(pc)) { + CodeBlob cb = cc.findBlob(pc); + if (DEBUG) { + System.out.println("FP is null. Found blob frame size " + cb.getFrameSize()); + } + // See if we can derive a frame pointer from SP and PC + long link_offset = cb.getFrameSize() - 2 * VM.getVM().getAddressSize(); + if (link_offset >= 0) { + fp = sp.addOffsetTo(link_offset); + } + } + } + + // We found a PC in the frame anchor. Check that it's plausible, and + // if it is, use it. + if (vm.isJavaPCDbg(pc)) { + setValues(sp, fp, pc); + } else { + setValues(sp, fp, null); + } + + return true; + } + } + + public Address getSP() { return spFound; } + public Address getFP() { return fpFound; } + /** May be null if getting values from thread-local storage; take + care to call the correct RISCV64Frame constructor to recover this if + necessary */ + public Address getPC() { return pcFound; } + + private void setValues(Address sp, Address fp, Address pc) { + spFound = sp; + fpFound = fp; + pcFound = pc; + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64Frame.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64Frame.java new file mode 100644 index 0000000000000000000000000000000000000000..df280005d7240bb181a451249c10b45ae78ea6e7 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64Frame.java @@ -0,0 +1,556 @@ +/* + * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, Red Hat Inc. + * Copyright (c) 2021, 2022, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.runtime.riscv64; + +import java.util.*; +import sun.jvm.hotspot.code.*; +import sun.jvm.hotspot.compiler.*; +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.oops.*; +import sun.jvm.hotspot.runtime.*; +import sun.jvm.hotspot.types.*; +import sun.jvm.hotspot.utilities.*; +import sun.jvm.hotspot.utilities.Observable; +import sun.jvm.hotspot.utilities.Observer; + +/** Specialization of and implementation of abstract methods of the + Frame class for the riscv64 family of CPUs. */ + +public class RISCV64Frame extends Frame { + private static final boolean DEBUG; + static { + DEBUG = System.getProperty("sun.jvm.hotspot.runtime.RISCV64.RISCV64Frame.DEBUG") != null; + } + + // Java frames + private static final int LINK_OFFSET = -2; + private static final int RETURN_ADDR_OFFSET = -1; + private static final int SENDER_SP_OFFSET = 0; + + // Interpreter frames + private static final int INTERPRETER_FRAME_SENDER_SP_OFFSET = -3; + private static final int INTERPRETER_FRAME_LAST_SP_OFFSET = INTERPRETER_FRAME_SENDER_SP_OFFSET - 1; + private static final int INTERPRETER_FRAME_METHOD_OFFSET = INTERPRETER_FRAME_LAST_SP_OFFSET - 1; + private static int INTERPRETER_FRAME_MDX_OFFSET; // Non-core builds only + private static int INTERPRETER_FRAME_PADDING_OFFSET; + private static int INTERPRETER_FRAME_MIRROR_OFFSET; + private static int INTERPRETER_FRAME_CACHE_OFFSET; + private static int INTERPRETER_FRAME_LOCALS_OFFSET; + private static int INTERPRETER_FRAME_BCX_OFFSET; + private static int INTERPRETER_FRAME_INITIAL_SP_OFFSET; + private static int INTERPRETER_FRAME_MONITOR_BLOCK_TOP_OFFSET; + private static int INTERPRETER_FRAME_MONITOR_BLOCK_BOTTOM_OFFSET; + + // Entry frames + private static int ENTRY_FRAME_CALL_WRAPPER_OFFSET = -10; + + // Native frames + private static final int NATIVE_FRAME_INITIAL_PARAM_OFFSET = 2; + + private static VMReg fp = new VMReg(8); + + static { + VM.registerVMInitializedObserver(new Observer() { + public void update(Observable o, Object data) { + initialize(VM.getVM().getTypeDataBase()); + } + }); + } + + private static synchronized void initialize(TypeDataBase db) { + INTERPRETER_FRAME_MDX_OFFSET = INTERPRETER_FRAME_METHOD_OFFSET - 1; + INTERPRETER_FRAME_PADDING_OFFSET = INTERPRETER_FRAME_MDX_OFFSET - 1; + INTERPRETER_FRAME_MIRROR_OFFSET = INTERPRETER_FRAME_PADDING_OFFSET - 1; + INTERPRETER_FRAME_CACHE_OFFSET = INTERPRETER_FRAME_MIRROR_OFFSET - 1; + INTERPRETER_FRAME_LOCALS_OFFSET = INTERPRETER_FRAME_CACHE_OFFSET - 1; + INTERPRETER_FRAME_BCX_OFFSET = INTERPRETER_FRAME_LOCALS_OFFSET - 1; + INTERPRETER_FRAME_INITIAL_SP_OFFSET = INTERPRETER_FRAME_BCX_OFFSET - 1; + INTERPRETER_FRAME_MONITOR_BLOCK_TOP_OFFSET = INTERPRETER_FRAME_INITIAL_SP_OFFSET; + INTERPRETER_FRAME_MONITOR_BLOCK_BOTTOM_OFFSET = INTERPRETER_FRAME_INITIAL_SP_OFFSET; + } + + + // an additional field beyond sp and pc: + Address raw_fp; // frame pointer + private Address raw_unextendedSP; + + private RISCV64Frame() { + } + + private void adjustForDeopt() { + if ( pc != null) { + // Look for a deopt pc and if it is deopted convert to original pc + CodeBlob cb = VM.getVM().getCodeCache().findBlob(pc); + if (cb != null && cb.isJavaMethod()) { + NMethod nm = (NMethod) cb; + if (pc.equals(nm.deoptHandlerBegin())) { + if (Assert.ASSERTS_ENABLED) { + Assert.that(this.getUnextendedSP() != null, "null SP in Java frame"); + } + // adjust pc if frame is deoptimized. + pc = this.getUnextendedSP().getAddressAt(nm.origPCOffset()); + deoptimized = true; + } + } + } + } + + public RISCV64Frame(Address raw_sp, Address raw_fp, Address pc) { + this.raw_sp = raw_sp; + this.raw_unextendedSP = raw_sp; + this.raw_fp = raw_fp; + this.pc = pc; + adjustUnextendedSP(); + + // Frame must be fully constructed before this call + adjustForDeopt(); + + if (DEBUG) { + System.out.println("RISCV64Frame(sp, fp, pc): " + this); + dumpStack(); + } + } + + public RISCV64Frame(Address raw_sp, Address raw_fp) { + this.raw_sp = raw_sp; + this.raw_unextendedSP = raw_sp; + this.raw_fp = raw_fp; + + // We cannot assume SP[-1] always contains a valid return PC (e.g. if + // the callee is a C/C++ compiled frame). If the PC is not known to + // Java then this.pc is null. + Address savedPC = raw_sp.getAddressAt(-1 * VM.getVM().getAddressSize()); + if (VM.getVM().isJavaPCDbg(savedPC)) { + this.pc = savedPC; + } + + adjustUnextendedSP(); + + // Frame must be fully constructed before this call + adjustForDeopt(); + + if (DEBUG) { + System.out.println("RISCV64Frame(sp, fp): " + this); + dumpStack(); + } + } + + public RISCV64Frame(Address raw_sp, Address raw_unextendedSp, Address raw_fp, Address pc) { + this.raw_sp = raw_sp; + this.raw_unextendedSP = raw_unextendedSp; + this.raw_fp = raw_fp; + this.pc = pc; + adjustUnextendedSP(); + + // Frame must be fully constructed before this call + adjustForDeopt(); + + if (DEBUG) { + System.out.println("RISCV64Frame(sp, unextendedSP, fp, pc): " + this); + dumpStack(); + } + + } + + public Object clone() { + RISCV64Frame frame = new RISCV64Frame(); + frame.raw_sp = raw_sp; + frame.raw_unextendedSP = raw_unextendedSP; + frame.raw_fp = raw_fp; + frame.pc = pc; + frame.deoptimized = deoptimized; + return frame; + } + + public boolean equals(Object arg) { + if (arg == null) { + return false; + } + + if (!(arg instanceof RISCV64Frame)) { + return false; + } + + RISCV64Frame other = (RISCV64Frame) arg; + + return (AddressOps.equal(getSP(), other.getSP()) && + AddressOps.equal(getUnextendedSP(), other.getUnextendedSP()) && + AddressOps.equal(getFP(), other.getFP()) && + AddressOps.equal(getPC(), other.getPC())); + } + + public int hashCode() { + if (raw_sp == null) { + return 0; + } + + return raw_sp.hashCode(); + } + + public String toString() { + return "sp: " + (getSP() == null? "null" : getSP().toString()) + + ", unextendedSP: " + (getUnextendedSP() == null? "null" : getUnextendedSP().toString()) + + ", fp: " + (getFP() == null? "null" : getFP().toString()) + + ", pc: " + (pc == null? "null" : pc.toString()); + } + + // accessors for the instance variables + public Address getFP() { return raw_fp; } + public Address getSP() { return raw_sp; } + public Address getID() { return raw_sp; } + + // FIXME: not implemented yet + public boolean isSignalHandlerFrameDbg() { return false; } + public int getSignalNumberDbg() { return 0; } + public String getSignalNameDbg() { return null; } + + public boolean isInterpretedFrameValid() { + if (Assert.ASSERTS_ENABLED) { + Assert.that(isInterpretedFrame(), "Not an interpreted frame"); + } + + // These are reasonable sanity checks + if (getFP() == null || getFP().andWithMask(0x3) != null) { + return false; + } + + if (getSP() == null || getSP().andWithMask(0x3) != null) { + return false; + } + + if (getFP().addOffsetTo(INTERPRETER_FRAME_INITIAL_SP_OFFSET * VM.getVM().getAddressSize()).lessThan(getSP())) { + return false; + } + + // These are hacks to keep us out of trouble. + // The problem with these is that they mask other problems + if (getFP().lessThanOrEqual(getSP())) { + // this attempts to deal with unsigned comparison above + return false; + } + + if (getFP().minus(getSP()) > 4096 * VM.getVM().getAddressSize()) { + // stack frames shouldn't be large. + return false; + } + + return true; + } + + public Frame sender(RegisterMap regMap, CodeBlob cb) { + RISCV64RegisterMap map = (RISCV64RegisterMap) regMap; + + if (Assert.ASSERTS_ENABLED) { + Assert.that(map != null, "map must be set"); + } + + // Default is we done have to follow them. The sender_for_xxx will + // update it accordingly + map.setIncludeArgumentOops(false); + + if (isEntryFrame()) return senderForEntryFrame(map); + if (isInterpretedFrame()) return senderForInterpreterFrame(map); + + if(cb == null) { + cb = VM.getVM().getCodeCache().findBlob(getPC()); + } else { + if (Assert.ASSERTS_ENABLED) { + Assert.that(cb.equals(VM.getVM().getCodeCache().findBlob(getPC())), "Must be the same"); + } + } + + if (cb != null) { + return senderForCompiledFrame(map, cb); + } + + // Must be native-compiled frame, i.e. the marshaling code for native + // methods that exists in the core system. + return new RISCV64Frame(getSenderSP(), getLink(), getSenderPC()); + } + + private Frame senderForEntryFrame(RISCV64RegisterMap map) { + if (DEBUG) { + System.out.println("senderForEntryFrame"); + } + if (Assert.ASSERTS_ENABLED) { + Assert.that(map != null, "map must be set"); + } + // Java frame called from C; skip all C frames and return top C + // frame of that chunk as the sender + RISCV64JavaCallWrapper jcw = (RISCV64JavaCallWrapper) getEntryFrameCallWrapper(); + if (Assert.ASSERTS_ENABLED) { + Assert.that(!entryFrameIsFirst(), "next Java fp must be non zero"); + Assert.that(jcw.getLastJavaSP().greaterThan(getSP()), "must be above this frame on stack"); + } + RISCV64Frame fr; + if (jcw.getLastJavaPC() != null) { + fr = new RISCV64Frame(jcw.getLastJavaSP(), jcw.getLastJavaFP(), jcw.getLastJavaPC()); + } else { + fr = new RISCV64Frame(jcw.getLastJavaSP(), jcw.getLastJavaFP()); + } + map.clear(); + if (Assert.ASSERTS_ENABLED) { + Assert.that(map.getIncludeArgumentOops(), "should be set by clear"); + } + return fr; + } + + //------------------------------------------------------------------------------ + // frame::adjust_unextended_sp + private void adjustUnextendedSP() { + // If we are returning to a compiled MethodHandle call site, the + // saved_fp will in fact be a saved value of the unextended SP. The + // simplest way to tell whether we are returning to such a call site + // is as follows: + + CodeBlob cb = cb(); + NMethod senderNm = (cb == null) ? null : cb.asNMethodOrNull(); + if (senderNm != null) { + // If the sender PC is a deoptimization point, get the original + // PC. For MethodHandle call site the unextended_sp is stored in + // saved_fp. + if (senderNm.isDeoptMhEntry(getPC())) { + raw_unextendedSP = getFP(); + } + else if (senderNm.isDeoptEntry(getPC())) { + } + else if (senderNm.isMethodHandleReturn(getPC())) { + raw_unextendedSP = getFP(); + } + } + } + + private Frame senderForInterpreterFrame(RISCV64RegisterMap map) { + if (DEBUG) { + System.out.println("senderForInterpreterFrame"); + } + Address unextendedSP = addressOfStackSlot(INTERPRETER_FRAME_SENDER_SP_OFFSET).getAddressAt(0); + Address sp = addressOfStackSlot(SENDER_SP_OFFSET); + // We do not need to update the callee-save register mapping because above + // us is either another interpreter frame or a converter-frame, but never + // directly a compiled frame. + // 11/24/04 SFG. With the removal of adapter frames this is no longer true. + // However c2 no longer uses callee save register for java calls so there + // are no callee register to find. + + if (map.getUpdateMap()) + updateMapWithSavedLink(map, addressOfStackSlot(LINK_OFFSET)); + + return new RISCV64Frame(sp, unextendedSP, getLink(), getSenderPC()); + } + + private void updateMapWithSavedLink(RegisterMap map, Address savedFPAddr) { + map.setLocation(fp, savedFPAddr); + } + + private Frame senderForCompiledFrame(RISCV64RegisterMap map, CodeBlob cb) { + if (DEBUG) { + System.out.println("senderForCompiledFrame"); + } + + // + // NOTE: some of this code is (unfortunately) duplicated RISCV64CurrentFrameGuess + // + + if (Assert.ASSERTS_ENABLED) { + Assert.that(map != null, "map must be set"); + } + + // frame owned by optimizing compiler + if (Assert.ASSERTS_ENABLED) { + Assert.that(cb.getFrameSize() >= 0, "must have non-zero frame size"); + } + Address senderSP = getUnextendedSP().addOffsetTo(cb.getFrameSize()); + + // The return_address is always the word on the stack + Address senderPC = senderSP.getAddressAt(-1 * VM.getVM().getAddressSize()); + + // This is the saved value of FP which may or may not really be an FP. + // It is only an FP if the sender is an interpreter frame. + Address savedFPAddr = senderSP.addOffsetTo(-2 * VM.getVM().getAddressSize()); + + if (map.getUpdateMap()) { + // Tell GC to use argument oopmaps for some runtime stubs that need it. + // For C1, the runtime stub might not have oop maps, so set this flag + // outside of update_register_map. + map.setIncludeArgumentOops(cb.callerMustGCArguments()); + + if (cb.getOopMaps() != null) { + ImmutableOopMapSet.updateRegisterMap(this, cb, map, true); + } + + // Since the prolog does the save and restore of FP there is no oopmap + // for it so we must fill in its location as if there was an oopmap entry + // since if our caller was compiled code there could be live jvm state in it. + updateMapWithSavedLink(map, savedFPAddr); + } + + return new RISCV64Frame(senderSP, savedFPAddr.getAddressAt(0), senderPC); + } + + protected boolean hasSenderPD() { + return true; + } + + public long frameSize() { + return (getSenderSP().minus(getSP()) / VM.getVM().getAddressSize()); + } + + public Address getLink() { + try { + if (DEBUG) { + System.out.println("Reading link at " + addressOfStackSlot(LINK_OFFSET) + + " = " + addressOfStackSlot(LINK_OFFSET).getAddressAt(0)); + } + return addressOfStackSlot(LINK_OFFSET).getAddressAt(0); + } catch (Exception e) { + if (DEBUG) + System.out.println("Returning null"); + return null; + } + } + + public Address getUnextendedSP() { return raw_unextendedSP; } + + // Return address: + public Address getSenderPCAddr() { return addressOfStackSlot(RETURN_ADDR_OFFSET); } + public Address getSenderPC() { return getSenderPCAddr().getAddressAt(0); } + + // return address of param, zero origin index. + public Address getNativeParamAddr(int idx) { + return addressOfStackSlot(NATIVE_FRAME_INITIAL_PARAM_OFFSET + idx); + } + + public Address getSenderSP() { return addressOfStackSlot(SENDER_SP_OFFSET); } + + public Address addressOfInterpreterFrameLocals() { + return addressOfStackSlot(INTERPRETER_FRAME_LOCALS_OFFSET); + } + + private Address addressOfInterpreterFrameBCX() { + return addressOfStackSlot(INTERPRETER_FRAME_BCX_OFFSET); + } + + public int getInterpreterFrameBCI() { + // FIXME: this is not atomic with respect to GC and is unsuitable + // for use in a non-debugging, or reflective, system. Need to + // figure out how to express this. + Address bcp = addressOfInterpreterFrameBCX().getAddressAt(0); + Address methodHandle = addressOfInterpreterFrameMethod().getAddressAt(0); + Method method = (Method)Metadata.instantiateWrapperFor(methodHandle); + return bcpToBci(bcp, method); + } + + public Address addressOfInterpreterFrameMDX() { + return addressOfStackSlot(INTERPRETER_FRAME_MDX_OFFSET); + } + + // expression stack + // (the max_stack arguments are used by the GC; see class FrameClosure) + + public Address addressOfInterpreterFrameExpressionStack() { + Address monitorEnd = interpreterFrameMonitorEnd().address(); + return monitorEnd.addOffsetTo(-1 * VM.getVM().getAddressSize()); + } + + public int getInterpreterFrameExpressionStackDirection() { return -1; } + + // top of expression stack + public Address addressOfInterpreterFrameTOS() { + return getSP(); + } + + /** Expression stack from top down */ + public Address addressOfInterpreterFrameTOSAt(int slot) { + return addressOfInterpreterFrameTOS().addOffsetTo(slot * VM.getVM().getAddressSize()); + } + + public Address getInterpreterFrameSenderSP() { + if (Assert.ASSERTS_ENABLED) { + Assert.that(isInterpretedFrame(), "interpreted frame expected"); + } + return addressOfStackSlot(INTERPRETER_FRAME_SENDER_SP_OFFSET).getAddressAt(0); + } + + // Monitors + public BasicObjectLock interpreterFrameMonitorBegin() { + return new BasicObjectLock(addressOfStackSlot(INTERPRETER_FRAME_MONITOR_BLOCK_BOTTOM_OFFSET)); + } + + public BasicObjectLock interpreterFrameMonitorEnd() { + Address result = addressOfStackSlot(INTERPRETER_FRAME_MONITOR_BLOCK_TOP_OFFSET).getAddressAt(0); + if (Assert.ASSERTS_ENABLED) { + // make sure the pointer points inside the frame + Assert.that(AddressOps.gt(getFP(), result), "result must < than frame pointer"); + Assert.that(AddressOps.lte(getSP(), result), "result must >= than stack pointer"); + } + return new BasicObjectLock(result); + } + + public int interpreterFrameMonitorSize() { + return BasicObjectLock.size(); + } + + // Method + public Address addressOfInterpreterFrameMethod() { + return addressOfStackSlot(INTERPRETER_FRAME_METHOD_OFFSET); + } + + // Constant pool cache + public Address addressOfInterpreterFrameCPCache() { + return addressOfStackSlot(INTERPRETER_FRAME_CACHE_OFFSET); + } + + // Entry frames + public JavaCallWrapper getEntryFrameCallWrapper() { + return new RISCV64JavaCallWrapper(addressOfStackSlot(ENTRY_FRAME_CALL_WRAPPER_OFFSET).getAddressAt(0)); + } + + protected Address addressOfSavedOopResult() { + // offset is 2 for compiler2 and 3 for compiler1 + return getSP().addOffsetTo((VM.getVM().isClientCompiler() ? 2 : 3) * + VM.getVM().getAddressSize()); + } + + protected Address addressOfSavedReceiver() { + return getSP().addOffsetTo(-4 * VM.getVM().getAddressSize()); + } + + private void dumpStack() { + for (Address addr = getSP().addOffsetTo(-4 * VM.getVM().getAddressSize()); + AddressOps.lt(addr, getSP()); + addr = addr.addOffsetTo(VM.getVM().getAddressSize())) { + System.out.println(addr + ": " + addr.getAddressAt(0)); + } + System.out.println("-----------------------"); + for (Address addr = getSP(); + AddressOps.lte(addr, getSP().addOffsetTo(20 * VM.getVM().getAddressSize())); + addr = addr.addOffsetTo(VM.getVM().getAddressSize())) { + System.out.println(addr + ": " + addr.getAddressAt(0)); + } + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64JavaCallWrapper.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64JavaCallWrapper.java new file mode 100644 index 0000000000000000000000000000000000000000..d0ad2b559a63c1711687d8de80002cb3b8c5d91f --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64JavaCallWrapper.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.runtime.riscv64; + +import java.util.*; +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.types.*; +import sun.jvm.hotspot.runtime.*; +import sun.jvm.hotspot.utilities.*; +import sun.jvm.hotspot.utilities.Observable; +import sun.jvm.hotspot.utilities.Observer; + +public class RISCV64JavaCallWrapper extends JavaCallWrapper { + private static AddressField lastJavaFPField; + + static { + VM.registerVMInitializedObserver(new Observer() { + public void update(Observable o, Object data) { + initialize(VM.getVM().getTypeDataBase()); + } + }); + } + + private static synchronized void initialize(TypeDataBase db) { + Type type = db.lookupType("JavaFrameAnchor"); + + lastJavaFPField = type.getAddressField("_last_Java_fp"); + } + + public RISCV64JavaCallWrapper(Address addr) { + super(addr); + } + + public Address getLastJavaFP() { + return lastJavaFPField.getValue(addr.addOffsetTo(anchorField.getOffset())); + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64RegisterMap.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64RegisterMap.java new file mode 100644 index 0000000000000000000000000000000000000000..4aeb1c6f557c48f017cb4e61bb4ee635ba14c168 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64RegisterMap.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Red Hat Inc. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jvm.hotspot.runtime.riscv64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.runtime.*; + +public class RISCV64RegisterMap extends RegisterMap { + + /** This is the only public constructor */ + public RISCV64RegisterMap(JavaThread thread, boolean updateMap) { + super(thread, updateMap); + } + + protected RISCV64RegisterMap(RegisterMap map) { + super(map); + } + + public Object clone() { + RISCV64RegisterMap retval = new RISCV64RegisterMap(this); + return retval; + } + + // no PD state to clear or copy: + protected void clearPD() {} + protected void initializePD() {} + protected void initializeFromPD(RegisterMap map) {} + protected Address getLocationPD(VMReg reg) { return null; } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/MemoryPanel.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/MemoryPanel.java index 76522a6676c19f63bf3107d38c94eced6fb085ad..d1058978eee09da2e7a28ec2832ae24571a48221 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/MemoryPanel.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/MemoryPanel.java @@ -31,12 +31,10 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; import java.math.*; -import java.util.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.table.*; import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.ui.*; import sun.jvm.hotspot.utilities.PointerFinder; import sun.jvm.hotspot.utilities.PointerLocation; @@ -219,8 +217,7 @@ public class MemoryPanel extends JPanel { String str = (String)t.getTransferData(DataFlavor.stringFlavor); handleImport(c, str); return true; - } catch (UnsupportedFlavorException ufe) { - } catch (IOException ioe) { + } catch (UnsupportedFlavorException | IOException e) { } } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/CTypeTreeNodeAdapter.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/CTypeTreeNodeAdapter.java index 42157bcae7ca51366838077290cb5efc6d3f2fbc..114912593ee3ebcd4f08adcc68a8d8108ae9d06a 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/CTypeTreeNodeAdapter.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/CTypeTreeNodeAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -132,11 +132,7 @@ public class CTypeTreeNodeAdapter extends FieldTreeNodeAdapter { try { Oop oop = VM.getVM().getObjectHeap().newOop(handle); return new OopTreeNodeAdapter(oop, cf, getTreeTableMode()); - } catch (AddressException e) { - return new BadAddressTreeNodeAdapter(handle, - new CTypeFieldIdentifier(type, f), - getTreeTableMode()); - } catch (UnknownOopException e) { + } catch (AddressException | UnknownOopException e) { return new BadAddressTreeNodeAdapter(handle, new CTypeFieldIdentifier(type, f), getTreeTableMode()); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/MetadataTreeNodeAdapter.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/MetadataTreeNodeAdapter.java index ba60d08429bef9e903439c97057210795308c8a1..4a5ae3afe9f2f192c15599060cb20d1fee28c030 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/MetadataTreeNodeAdapter.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/MetadataTreeNodeAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -153,9 +153,7 @@ public class MetadataTreeNodeAdapter extends FieldTreeNodeAdapter { if (curField == index) { try { child = new MetadataTreeNodeAdapter(field.getValue(getObj()), field.getID(), getTreeTableMode()); - } catch (AddressException e) { - child = new BadAddressTreeNodeAdapter(getObj().getAddress().getAddressAt(field.getOffset()), field, getTreeTableMode()); - } catch (UnknownOopException e) { + } catch (AddressException | UnknownOopException e) { child = new BadAddressTreeNodeAdapter(getObj().getAddress().getAddressAt(field.getOffset()), field, getTreeTableMode()); } } @@ -166,9 +164,7 @@ public class MetadataTreeNodeAdapter extends FieldTreeNodeAdapter { if (curField == index) { try { child = new OopTreeNodeAdapter(field.getValue(getObj()), field.getID(), getTreeTableMode()); - } catch (AddressException e) { - child = new BadAddressTreeNodeAdapter(field.getValueAsOopHandle(getObj()), field, getTreeTableMode()); - } catch (UnknownOopException e) { + } catch (AddressException | UnknownOopException e) { child = new BadAddressTreeNodeAdapter(field.getValueAsOopHandle(getObj()), field, getTreeTableMode()); } } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java index c1c7fa18beee7bd27ee31283882c81c2b460ae17..3146ffa6636c52ad7e32a20001f1042fed51a657 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -160,9 +160,7 @@ public class OopTreeNodeAdapter extends FieldTreeNodeAdapter { if (curField == index) { try { child = new MetadataTreeNodeAdapter(field.getValue(getObj()), field.getID(), getTreeTableMode()); - } catch (AddressException e) { - child = new BadAddressTreeNodeAdapter(getObj().getHandle().getAddressAt(field.getOffset()), field, getTreeTableMode()); - } catch (UnknownOopException e) { + } catch (AddressException | UnknownOopException e) { child = new BadAddressTreeNodeAdapter(getObj().getHandle().getAddressAt(field.getOffset()), field, getTreeTableMode()); } } @@ -173,9 +171,7 @@ public class OopTreeNodeAdapter extends FieldTreeNodeAdapter { if (curField == index) { try { child = new OopTreeNodeAdapter(field.getValue(getObj()), field.getID(), getTreeTableMode()); - } catch (AddressException e) { - child = new BadAddressTreeNodeAdapter(field.getValueAsOopHandle(getObj()), field, getTreeTableMode()); - } catch (UnknownOopException e) { + } catch (AddressException | UnknownOopException e) { child = new BadAddressTreeNodeAdapter(field.getValueAsOopHandle(getObj()), field, getTreeTableMode()); } } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java index 3e66e24700b94e3a85cf8b2480e3d06c55cfe4a2..f4cd4873207a4bbbdf3aa01139fafe8fb6238fbe 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,7 +50,7 @@ public class PlatformInfo { public static boolean knownCPU(String cpu) { final String[] KNOWN = - new String[] {"i386", "x86", "x86_64", "amd64", "ppc64", "ppc64le", "aarch64"}; + new String[] {"i386", "x86", "x86_64", "amd64", "ppc64", "ppc64le", "aarch64", "riscv64"}; for(String s : KNOWN) { if(s.equals(cpu)) diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java index cd9e8264f28b5c23994fa3a4a9ecaee01fe7355f..f0e7b0997e9f1088cbffe7d140b76f60624e729f 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java @@ -87,6 +87,7 @@ public class PointerFinder { if (heap instanceof GenCollectedHeap) { GenCollectedHeap genheap = (GenCollectedHeap) heap; if (genheap.isIn(a)) { + loc.heap = heap; for (int i = 0; i < genheap.nGens(); i++) { Generation g = genheap.getGen(i); if (g.isIn(a)) { diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java index a7cfa5de983cc74d5fe855a233f8a4de9fab41f6..d474469c56261c34bcc5398689c5c5b70bd26cca 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java @@ -107,22 +107,21 @@ public class PointerLocation { } public boolean isInHeap() { - return (heap != null || (gen != null)); + return (heap != null); } public boolean isInNewGen() { - return ((gen != null) && (gen == ((GenCollectedHeap)heap).getGen(0))); + return ((gen != null) && (gen.equals(((GenCollectedHeap)heap).getGen(0)))); } public boolean isInOldGen() { - return ((gen != null) && (gen == ((GenCollectedHeap)heap).getGen(1))); + return ((gen != null) && (gen.equals(((GenCollectedHeap)heap).getGen(1)))); } public boolean inOtherGen() { return (!isInNewGen() && !isInOldGen()); } - /** Only valid if isInHeap() */ public Generation getGeneration() { return gen; } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java index 34e67140b58a490c2c0961a57a7306419b02f819..ec9a9554b14c7b19917fc45d2efac0bd36895ced 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,6 @@ import sun.jvm.hotspot.gc.shared.*; import sun.jvm.hotspot.memory.*; import sun.jvm.hotspot.oops.*; import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.utilities.*; /** For a set of known roots, descends recursively into the object graph, for each object recording those objects (and their fields) @@ -259,9 +258,6 @@ public class ReversePtrsAnalysis { } } catch (EmptyStackException e) { // Done - } catch (NullPointerException e) { - System.err.println("ReversePtrs: WARNING: " + e + - " during traversal"); } catch (Exception e) { System.err.println("ReversePtrs: WARNING: " + e + " during traversal"); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java index 1b7d4c74c27305fc4ef8e719881ca82e910afc2b..3f701b8d24e49052ae8baced63b9c0a9a607eb83 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,15 +24,10 @@ package sun.jvm.hotspot.utilities; -import java.util.*; import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.memory.*; import sun.jvm.hotspot.oops.Metadata; -import sun.jvm.hotspot.oops.Klass; import sun.jvm.hotspot.runtime.*; import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; /** This class determines to the best of its ability, and in a reasonably robust fashion, whether a given pointer is an intact @@ -77,9 +72,7 @@ public class RobustOopDeterminator { Metadata.instantiateWrapperFor(klassField.getValue(oop)); } return true; - } catch (AddressException e) { - return false; - } catch (WrongTypeException e) { + } catch (AddressException | WrongTypeException e) { return false; } } diff --git a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/resources/simpleserver_de.properties b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/resources/simpleserver_de.properties new file mode 100644 index 0000000000000000000000000000000000000000..e72f53703695a03d71bf719f8e4095f3de39f012 --- /dev/null +++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/resources/simpleserver_de.properties @@ -0,0 +1,54 @@ +# +# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute 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. +# + +usage.java=Verwendung: java -m jdk.httpserver [-b bind address] [-p port] [-d directory]\n [-o none|info|verbose] [-h zum Anzeigen von Optionen]\n [-version zum Anzeigen der Versionsinformationen] + +usage.jwebserver=Verwendung: jwebserver [-b bind address] [-p port] [-d directory]\n [-o none|info|verbose] [-h zum Anzeigen von Optionen]\n [-version zum Anzeigen von Versionsinformationen] + +version={0} {1} + +options=Optionen:\n-b, --bind-address - Adresse, an die das Binding erfolgt. Standard: {0} (Loopback).\n Verwenden Sie f\u00FCr alle Schnittstellen "-b 0.0.0.0" oder "-b ::".\n-d, --directory - Zu bedienendes Verzeichnis. Standard: Aktuelles Verzeichnis.\n-o, --output - Ausgabeformat. none|info|verbose. Standard: info.\n-p, --port - Port, auf dem gehorcht wird. Standard: 8000.\n-h, -?, --help - Gibt diese Hilfemeldung aus und beendet.\n-version, --version - Gibt Versionsinformationen aus und beendet.\nDr\u00FCcken Sie zum Stoppen des Servers Strg+C. + +opt.bindaddress=-b, --bind-address - Adresse, an die das Binding erfolgt. Standard: {0} (Loopback).\n Verwenden Sie f\u00FCr alle Schnittstellen "-b 0.0.0.0" oder "-b ::". +opt.directory=-d, --directory - Zu bedienendes Verzeichnis. Standard: Aktuelles Verzeichnis. +opt.output=-o, --output - Ausgabeformat. none|info|verbose. Standard: info. +opt.port=-p, --port - Port, auf dem gehorcht wird. Standard: 8000. + +loopback.info=Binding an Loopback als Standard. Verwenden Sie f\u00FCr alle Schnittstellen "-b 0.0.0.0" oder "-b ::". + +msg.start.anylocal=Bedient {0} und Unterverzeichnisse auf 0.0.0.0 (alle Schnittstellen) Port {2}\nURL http://{1}:{2}/ + +msg.start.other=Bedient {0} und Unterverzeichnisse auf {1} Port {2}\nURL http://{1}:{2}/ + +error.prefix=Fehler: + +err.unknown.option=unbekannte Option: {0} +err.missing.arg=kein Wert angegeben f\u00FCr {0} +err.invalid.arg=ung\u00FCltiger Wert angegeben f\u00FCr {0}: {1} +err.server.config.failed=Serverkonfiguration nicht erfolgreich: {0} +err.server.handle.failed=Handling des Serveraustauschs nicht erfolgreich: {0} + +html.dir.list=Verzeichnisliste f\u00FCr +html.not.found=Datei wurde nicht gefunden diff --git a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/resources/simpleserver_ja.properties b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/resources/simpleserver_ja.properties new file mode 100644 index 0000000000000000000000000000000000000000..974707493a591a458a231e526468cf5a0588acbf --- /dev/null +++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/resources/simpleserver_ja.properties @@ -0,0 +1,54 @@ +# +# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute 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. +# + +usage.java=\u4F7F\u7528\u65B9\u6CD5: java -m jdk.httpserver [-b bind address] [-p port] [-d directory]\n [-o none|info|verbose] [-h to show options]\n [-version to show version information] + +usage.jwebserver=\u4F7F\u7528\u65B9\u6CD5: jwebserver [-b bind address] [-p port] [-d directory]\n [-o none|info|verbose] [-h to show options]\n [-version to show version information] + +version={0} {1} + +options=\u30AA\u30D7\u30B7\u30E7\u30F3:\n-b, --bind-address - \u30D0\u30A4\u30F3\u30C9\u5148\u30A2\u30C9\u30EC\u30B9\u3002\u30C7\u30D5\u30A9\u30EB\u30C8: {0} (\u30EB\u30FC\u30D7\u30D0\u30C3\u30AF)\u3002\n \u3059\u3079\u3066\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067"-b 0.0.0.0"\u307E\u305F\u306F"-b ::"\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\n-d, --directory - \u4F7F\u7528\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u30C7\u30D5\u30A9\u30EB\u30C8: \u73FE\u5728\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\n-o, --output - \u51FA\u529B\u5F62\u5F0F\u3002none|info|verbose\u3002\u30C7\u30D5\u30A9\u30EB\u30C8: info\u3002\n-p, --port - \u30EA\u30B9\u30CB\u30F3\u30B0\u3059\u308B\u30DD\u30FC\u30C8\u3002\u30C7\u30D5\u30A9\u30EB\u30C8: 8000\u3002\n-h, -?, --help - \u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\u3002\n-version, --version - \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\u3002\n\u30B5\u30FC\u30D0\u30FC\u3092\u505C\u6B62\u3059\u308B\u306B\u306F\u3001[Ctrl]+[C]\u3092\u62BC\u3057\u307E\u3059\u3002 + +opt.bindaddress=-b, --bind-address - \u30D0\u30A4\u30F3\u30C9\u5148\u30A2\u30C9\u30EC\u30B9\u3002\u30C7\u30D5\u30A9\u30EB\u30C8: {0} (\u30EB\u30FC\u30D7\u30D0\u30C3\u30AF).\n \u3059\u3079\u3066\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067"-b 0.0.0.0"\u307E\u305F\u306F"-b ::"\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 +opt.directory=-d, --directory - \u4F7F\u7528\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u30C7\u30D5\u30A9\u30EB\u30C8: \u73FE\u5728\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002 +opt.output=-o, --output - \u51FA\u529B\u5F62\u5F0F\u3002none|info|verbose. \u30C7\u30D5\u30A9\u30EB\u30C8: info\u3002 +opt.port=-p, --port - \u30EA\u30B9\u30CB\u30F3\u30B0\u3059\u308B\u30DD\u30FC\u30C8\u3002\u30C7\u30D5\u30A9\u30EB\u30C8: 8000\u3002 + +loopback.info=\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u30EB\u30FC\u30D7\u30D0\u30C3\u30AF\u306B\u30D0\u30A4\u30F3\u30C9\u3057\u307E\u3059\u3002\u3059\u3079\u3066\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067"-b 0.0.0.0"\u307E\u305F\u306F"-b ::"\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 + +msg.start.anylocal={0}\u304A\u3088\u3073\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30920.0.0.0 (\u3059\u3079\u3066\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9)\u30DD\u30FC\u30C8{2}\u3067\u4F7F\u7528\u3057\u307E\u3059\nURL http://{1}:{2}/ + +msg.start.other={0}\u304A\u3088\u3073\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092{1}\u30DD\u30FC\u30C8{2}\u3067\u4F7F\u7528\u3057\u307E\u3059\nURL http://{1}:{2}/ + +error.prefix=\u30A8\u30E9\u30FC: + +err.unknown.option=\u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0} +err.missing.arg={0}\u306B\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +err.invalid.arg={0}\u306B\u7121\u52B9\u306A\u5024\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F: {1} +err.server.config.failed=\u30B5\u30FC\u30D0\u30FC\u306E\u69CB\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0} +err.server.handle.failed=\u30B5\u30FC\u30D0\u30FC\u4EA4\u63DB\u51E6\u7406\u304C\u5931\u6557\u3057\u307E\u3057\u305F: {0} + +html.dir.list=\u6B21\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FB\u30EA\u30B9\u30C8 +html.not.found=\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F diff --git a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/resources/simpleserver_zh_CN.properties b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/resources/simpleserver_zh_CN.properties new file mode 100644 index 0000000000000000000000000000000000000000..1d35a7ecd1b8eeede638016b8ce80f5858632879 --- /dev/null +++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/resources/simpleserver_zh_CN.properties @@ -0,0 +1,54 @@ +# +# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute 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. +# + +usage.java=\u7528\u6CD5\uFF1Ajava -m jdk.httpserver [-b \u7ED1\u5B9A\u5730\u5740] [-p \u7AEF\u53E3] [-d \u76EE\u5F55]\n [-o none|info|verbose] [-h \u663E\u793A\u9009\u9879]\n [-version \u663E\u793A\u7248\u672C\u4FE1\u606F] + +usage.jwebserver=\u7528\u6CD5\uFF1Ajwebserver [-b \u7ED1\u5B9A\u5730\u5740] [-p \u7AEF\u53E3] [-d \u76EE\u5F55]\n [-o none|info|verbose] [-h \u663E\u793A\u9009\u9879]\n [-version \u663E\u793A\u7248\u672C\u4FE1\u606F] + +version={0} {1} + +options=\u9009\u9879\uFF1A\n-b, --bind-address - \u8981\u7ED1\u5B9A\u5230\u7684\u5730\u5740\u3002\u9ED8\u8BA4\u503C\uFF1A{0}\uFF08\u73AF\u56DE\uFF09\u3002\n \u5982\u679C\u8981\u8868\u793A\u6240\u6709\u63A5\u53E3\uFF0C\u8BF7\u4F7F\u7528 "-b 0.0.0.0" \u6216 "-b ::"\u3002\n-d, --directory - \u8981\u4E3A\u5176\u63D0\u4F9B\u670D\u52A1\u7684\u76EE\u5F55\u3002\u9ED8\u8BA4\u503C\uFF1A\u5F53\u524D\u76EE\u5F55\u3002\n-o, --output - \u8F93\u51FA\u683C\u5F0F\u3002none|info|verbose\u3002\u9ED8\u8BA4\u503C\uFF1Ainfo\u3002\n-p, --port - \u8981\u76D1\u542C\u7684\u7AEF\u53E3\u3002\u9ED8\u8BA4\u503C\uFF1A8000\u3002\n-h, -?, --help - \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F\u5E76\u9000\u51FA\u3002\n-version, --version - \u8F93\u51FA\u7248\u672C\u4FE1\u606F\u5E76\u9000\u51FA\u3002\n\u8981\u505C\u6B62\u670D\u52A1\u5668\uFF0C\u8BF7\u6309 Ctrl + C\u3002 + +opt.bindaddress=-b, --bind-address - \u8981\u7ED1\u5B9A\u5230\u7684\u5730\u5740\u3002\u9ED8\u8BA4\u503C\uFF1A{0}\uFF08\u73AF\u56DE\uFF09\u3002\n \u5982\u679C\u8981\u8868\u793A\u6240\u6709\u63A5\u53E3\uFF0C\u8BF7\u4F7F\u7528 "-b 0.0.0.0" \u6216 "-b ::"\u3002 +opt.directory=-d, --directory - \u8981\u4E3A\u5176\u63D0\u4F9B\u670D\u52A1\u7684\u76EE\u5F55\u3002\u9ED8\u8BA4\u503C\uFF1A\u5F53\u524D\u76EE\u5F55\u3002 +opt.output=-o, --output - \u8F93\u51FA\u683C\u5F0F\u3002none|info|verbose\u3002\u9ED8\u8BA4\u503C\uFF1Ainfo\u3002 +opt.port=-p, --port - \u8981\u76D1\u542C\u7684\u7AEF\u53E3\u3002\u9ED8\u8BA4\u503C\uFF1A8000\u3002 + +loopback.info=\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u7ED1\u5B9A\u5230\u73AF\u56DE\u3002\u5982\u679C\u8981\u8868\u793A\u6240\u6709\u63A5\u53E3\uFF0C\u8BF7\u4F7F\u7528 "-b 0.0.0.0" \u6216 "-b ::"\u3002 + +msg.start.anylocal=\u4E3A 0.0.0.0\uFF08\u6240\u6709\u63A5\u53E3\uFF09\u7AEF\u53E3 {2} \u4E0A\u7684 {0} \u53CA\u5B50\u76EE\u5F55\u63D0\u4F9B\u670D\u52A1\nURL http://{1}:{2}/ + +msg.start.other=\u4E3A {1} \u7AEF\u53E3 {2} \u4E0A\u7684 {0} \u53CA\u5B50\u76EE\u5F55\u63D0\u4F9B\u670D\u52A1\nURL http://{1}:{2}/ + +error.prefix=\u9519\u8BEF: + +err.unknown.option=\u672A\u77E5\u9009\u9879: {0} +err.missing.arg=\u6CA1\u6709\u4E3A{0}\u6307\u5B9A\u503C +err.invalid.arg=\u4E3A {0} \u63D0\u4F9B\u7684\u503C\u65E0\u6548\uFF1A{1} +err.server.config.failed=\u670D\u52A1\u5668\u914D\u7F6E\u5931\u8D25\uFF1A{0} +err.server.handle.failed=\u670D\u52A1\u5668\u4EA4\u6362\u5904\u7406\u5931\u8D25\uFF1A{0} + +html.dir.list=\u4EE5\u4E0B\u9879\u7684\u76EE\u5F55\u5217\u8868 +html.not.found=\u627E\u4E0D\u5230\u6587\u4EF6 diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java index c21fde386b9e9d1a34607a6bfa8b076c40c94340..e878f938c392a02fe13f15c9f311da2c93855aab 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java @@ -573,9 +573,6 @@ public abstract class ByteVector extends AbstractVector { } if (op == NOT) { return broadcast(-1).lanewise(XOR, this); - } else if (op == NEG) { - // FIXME: Support this in the JIT. - return broadcast(0).lanewise(SUB, this); } } int opc = opCode(op); @@ -604,8 +601,6 @@ public abstract class ByteVector extends AbstractVector { } if (op == NOT) { return lanewise(XOR, broadcast(-1), m); - } else if (op == NEG) { - return lanewise(NOT, m).lanewise(ADD, broadcast(1), m); } } int opc = opCode(op); diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java index e5033ac5366a4af671a38665784406a8de34530e..c1d2f41857448992faec1fd2b377241dcf2aa384 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java @@ -573,9 +573,6 @@ public abstract class IntVector extends AbstractVector { } if (op == NOT) { return broadcast(-1).lanewise(XOR, this); - } else if (op == NEG) { - // FIXME: Support this in the JIT. - return broadcast(0).lanewise(SUB, this); } } int opc = opCode(op); @@ -604,8 +601,6 @@ public abstract class IntVector extends AbstractVector { } if (op == NOT) { return lanewise(XOR, broadcast(-1), m); - } else if (op == NEG) { - return lanewise(NOT, m).lanewise(ADD, broadcast(1), m); } } int opc = opCode(op); diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LongVector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LongVector.java index 37ba71896791229a1a3189ae2cdb902f649b20d4..60821caa6bd950ad682526abe289058756e8fa0d 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LongVector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LongVector.java @@ -531,9 +531,6 @@ public abstract class LongVector extends AbstractVector { } if (op == NOT) { return broadcast(-1).lanewise(XOR, this); - } else if (op == NEG) { - // FIXME: Support this in the JIT. - return broadcast(0).lanewise(SUB, this); } } int opc = opCode(op); @@ -562,8 +559,6 @@ public abstract class LongVector extends AbstractVector { } if (op == NOT) { return lanewise(XOR, broadcast(-1), m); - } else if (op == NEG) { - return lanewise(NOT, m).lanewise(ADD, broadcast(1), m); } } int opc = opCode(op); diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java index 8c6dd4718f75a5d022d9d01c83f1a62bfd37b0f0..7558fc6c56a11defbe75a0de6d79f3803ab78e81 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java @@ -573,9 +573,6 @@ public abstract class ShortVector extends AbstractVector { } if (op == NOT) { return broadcast(-1).lanewise(XOR, this); - } else if (op == NEG) { - // FIXME: Support this in the JIT. - return broadcast(0).lanewise(SUB, this); } } int opc = opCode(op); @@ -604,8 +601,6 @@ public abstract class ShortVector extends AbstractVector { } if (op == NOT) { return lanewise(XOR, broadcast(-1), m); - } else if (op == NEG) { - return lanewise(NOT, m).lanewise(ADD, broadcast(1), m); } } int opc = opCode(op); diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template index 6c5ed6b9c13fd6b66c7001c10544e235a89dee43..464cb2853df754a56b72c7b2e8aeee0fe977e99e 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template @@ -596,9 +596,6 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> { #if[BITWISE] if (op == NOT) { return broadcast(-1).lanewise(XOR, this); - } else if (op == NEG) { - // FIXME: Support this in the JIT. - return broadcast(0).lanewise(SUB, this); } #end[BITWISE] } @@ -629,8 +626,6 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> { #if[BITWISE] if (op == NOT) { return lanewise(XOR, broadcast(-1), m); - } else if (op == NEG) { - return lanewise(NOT, m).lanewise(ADD, broadcast(1), m); } #end[BITWISE] } diff --git a/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java b/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java index 08fad553cc9b3defe22121ee957bbda9489c717c..74c687912fe17cc9a09e16017d0a987d10651c0a 100644 --- a/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java +++ b/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -417,29 +417,30 @@ public final class JarSigner { /** * Gets the default digest algorithm. * - * @implNote This implementation returns "SHA-256". The value may + * @implNote This implementation returns "SHA-384". The value may * change in the future. * * @return the default digest algorithm. */ public static String getDefaultDigestAlgorithm() { - return "SHA-256"; + return "SHA-384"; } /** * Gets the default signature algorithm for a private key. - * For example, SHA256withRSA for a 2048-bit RSA key, and + * For example, SHA384withRSA for a 2048-bit RSA key, and * SHA384withECDSA for a 384-bit EC key. * * @implNote This implementation makes use of comparable strengths - * as defined in Tables 2 and 3 of NIST SP 800-57 Part 1-Rev.4. - * Specifically, if a DSA or RSA key with a key size greater than 7680 + * as defined in Tables 2 and 3 of NIST SP 800-57 Part 1-Rev.5 as + * well as NIST recommendations as appropriate. + * Specifically, if an RSA key with a key size greater than 7680 * bits, or an EC key with a key size greater than or equal to 512 bits, * SHA-512 will be used as the hash function for the signature. - * If a DSA or RSA key has a key size greater than 3072 bits, or an - * EC key has a key size greater than or equal to 384 bits, SHA-384 will - * be used. Otherwise, SHA-256 will be used. The value may - * change in the future. + * Otherwise, SHA-384 will be used unless the key size is too small + * for resulting signature algorithm. As for DSA keys, the SHA256withDSA + * signature algorithm is returned regardless of key size. + * The value may change in the future. * * @param key the private key. * @return the default signature algorithm. Returns null if a default diff --git a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java index 750b125f10d8ba6101a09d03e6232d6bef36b2b2..1b9e23f0fde8eace75184933e53e9449e96ca82e 100644 --- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java +++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java @@ -30,6 +30,7 @@ import java.net.UnknownHostException; import java.net.URLClassLoader; import java.security.cert.CertPathValidatorException; import java.security.cert.PKIXBuilderParameters; +import java.security.interfaces.ECKey; import java.util.*; import java.util.stream.Collectors; import java.util.zip.*; @@ -1244,13 +1245,13 @@ public class Main { if ((legacyAlg & 8) == 8) { warnings.add(String.format( rb.getString("The.1.signing.key.has.a.keysize.of.2.which.is.considered.a.security.risk..This.key.size.will.be.disabled.in.a.future.update."), - privateKey.getAlgorithm(), KeyUtil.getKeySize(privateKey))); + KeyUtil.fullDisplayAlgName(privateKey), KeyUtil.getKeySize(privateKey))); } if ((disabledAlg & 8) == 8) { errors.add(String.format( rb.getString("The.1.signing.key.has.a.keysize.of.2.which.is.considered.a.security.risk.and.is.disabled."), - privateKey.getAlgorithm(), KeyUtil.getKeySize(privateKey))); + KeyUtil.fullDisplayAlgName(privateKey), KeyUtil.getKeySize(privateKey))); } } else { if ((legacyAlg & 1) != 0) { @@ -1274,7 +1275,7 @@ public class Main { if ((legacyAlg & 8) == 8) { warnings.add(String.format( rb.getString("The.1.signing.key.has.a.keysize.of.2.which.is.considered.a.security.risk..This.key.size.will.be.disabled.in.a.future.update."), - weakPublicKey.getAlgorithm(), KeyUtil.getKeySize(weakPublicKey))); + KeyUtil.fullDisplayAlgName(weakPublicKey), KeyUtil.getKeySize(weakPublicKey))); } } @@ -1451,7 +1452,12 @@ public class Main { JAR_DISABLED_CHECK.permits(key.getAlgorithm(), jcp, true); } catch (CertPathValidatorException e) { disabledAlgFound = true; - return String.format(rb.getString("key.bit.disabled"), kLen); + if (key instanceof ECKey) { + return String.format(rb.getString("key.bit.eccurve.disabled"), kLen, + KeyUtil.fullDisplayAlgName(key)); + } else { + return String.format(rb.getString("key.bit.disabled"), kLen); + } } try { LEGACY_CHECK.permits(key.getAlgorithm(), jcp, true); @@ -1463,7 +1469,12 @@ public class Main { } catch (CertPathValidatorException e) { weakPublicKey = key; legacyAlg |= 8; - return String.format(rb.getString("key.bit.weak"), kLen); + if (key instanceof ECKey) { + return String.format(rb.getString("key.bit.eccurve.weak"), kLen, + KeyUtil.fullDisplayAlgName(key)); + } else { + return String.format(rb.getString("key.bit.weak"), kLen); + } } } @@ -1516,7 +1527,12 @@ public class Main { try { CERTPATH_DISABLED_CHECK.permits(key.getAlgorithm(), cpcp, true); } catch (CertPathValidatorException e) { - return String.format(rb.getString("key.bit.disabled"), kLen); + if (key instanceof ECKey) { + return String.format(rb.getString("key.bit.eccurve.disabled"), kLen, + KeyUtil.fullDisplayAlgName(key)); + } else { + return String.format(rb.getString("key.bit.disabled"), kLen); + } } try { LEGACY_CHECK.permits(key.getAlgorithm(), cpcp, true); @@ -1526,7 +1542,12 @@ public class Main { return rb.getString("unknown.size"); } } catch (CertPathValidatorException e) { - return String.format(rb.getString("key.bit.weak"), kLen); + if (key instanceof ECKey) { + return String.format(rb.getString("key.bit.eccurve.weak"), kLen, + KeyUtil.fullDisplayAlgName(key)); + } else { + return String.format(rb.getString("key.bit.weak"), kLen); + } } } diff --git a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java index f5a1bb2e3cba6bad22b5f9156392e2170fa44a53..37a1f24f90d018b452ad5482ceee51e4ff389781 100644 --- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java +++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java @@ -181,7 +181,9 @@ public class Resources extends java.util.ListResourceBundle { {"with.algparams.disabled", "%1$s using %2$s (disabled)"}, {"key.bit", "%d-bit key"}, {"key.bit.weak", "%d-bit key (weak)"}, + {"key.bit.eccurve.weak", "%1$d-bit %2$s key (weak)"}, {"key.bit.disabled", "%d-bit key (disabled)"}, + {"key.bit.eccurve.disabled", "%1$d-bit %2$s key (disabled)"}, {"unknown.size", "unknown size"}, {"extra.attributes.detected", "POSIX file permission and/or symlink attributes detected. These attributes are ignored when signing and are not protected by the signature."}, diff --git a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_de.java b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_de.java new file mode 100644 index 0000000000000000000000000000000000000000..b66ce1a4deeeb17ef66eb668d67887afe5a97dff --- /dev/null +++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_de.java @@ -0,0 +1,338 @@ +/* + * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.security.tools.jarsigner; + +/** + *

    This class represents the ResourceBundle + * for JarSigner. + * + */ +public class Resources_de extends java.util.ListResourceBundle { + + private static final Object[][] contents = { + + // shared (from jarsigner) + {"SPACE", " "}, + {"6SPACE", " "}, + {"COMMA", ", "}, + + {"provclass.not.a.provider", "%s kein Provider"}, + {"provider.name.not.found", "Provider namens \"%s\" nicht gefunden"}, + {"provider.class.not.found", "Provider \"%s\" nicht gefunden"}, + {"jarsigner.error.", "jarsigner-Fehler: "}, + {"Illegal.option.", "Unzul\u00E4ssige Option: "}, + {"This.option.is.forremoval", "Diese Option ist veraltet und wird in einem zuk\u00FCnftigen Release entfernt: "}, + {".keystore.must.be.NONE.if.storetype.is.{0}", + "-keystore muss NONE sein, wenn -storetype {0} ist"}, + {".keypass.can.not.be.specified.if.storetype.is.{0}", + "-keypass kann nicht angegeben werden, wenn -storetype \"{0}\" ist"}, + {"If.protected.is.specified.then.storepass.and.keypass.must.not.be.specified", + "Wenn -protected angegeben ist, d\u00FCrfen -storepass und -keypass nicht angegeben werden"}, + {"If.keystore.is.not.password.protected.then.storepass.and.keypass.must.not.be.specified", + "Wenn der Keystore nicht kennwortgesch\u00FCtzt ist, d\u00FCrfen -storepass und -keypass nicht angegeben werden"}, + {"Usage.jarsigner.options.jar.file.alias", + "Verwendung: jarsigner [options] jar-file alias"}, + {".jarsigner.verify.options.jar.file.alias.", + " jarsigner -verify [options] jar-file [alias...]"}, + {".jarsigner.version", + " jarsigner -version"}, + {".keystore.url.keystore.location", + "[-keystore ] Keystore-Speicherort"}, + {".storepass.password.password.for.keystore.integrity", + "[-storepass ] Kennwort f\u00FCr Keystore-Integrit\u00E4t"}, + {".storetype.type.keystore.type", + "[-storetype ] Keystore-Typ"}, + {".keypass.password.password.for.private.key.if.different.", + "[-keypass ] Kennwort f\u00FCr Private Key (falls unterschiedlich)"}, + {".certchain.file.name.of.alternative.certchain.file", + "[-certchain ] Name der alternativen certchain-Datei"}, + {".sigfile.file.name.of.SF.DSA.file", + "[-sigfile ] Name der SF/DSA-Datei"}, + {".signedjar.file.name.of.signed.JAR.file", + "[-signedjar ] Name der signierten JAR-Datei"}, + {".digestalg.algorithm.name.of.digest.algorithm", + "[-digestalg ] Name des Digestalgorithmus"}, + {".sigalg.algorithm.name.of.signature.algorithm", + "[-sigalg ] Name des Signaturalgorithmus"}, + {".verify.verify.a.signed.JAR.file", + "[-verify] Verifiziert eine signierte JAR-Datei"}, + {".version.print.the.program.version", + "[-version] Gibt die Programmversion aus"}, + {".verbose.suboptions.verbose.output.when.signing.verifying.", + "[-verbose[:suboptions]] Verbose-Ausgabe beim Signieren/Verifizieren."}, + {".suboptions.can.be.all.grouped.or.summary", + " Als Unteroptionen sind \"all\", \"grouped\" und \"summary\" m\u00F6glich"}, + {".certs.display.certificates.when.verbose.and.verifying", + "[-certs] Zeigt Zertifikate bei Verbose und Verifizierung an"}, + {".certs.revocation.check", + "[-revCheck] Aktiviert die Zertifikatswiderrufpr\u00FCfung"}, + {".tsa.url.location.of.the.Timestamping.Authority", + "[-tsa ] Ort der Zeitstempelautorit\u00E4t"}, + {".tsacert.alias.public.key.certificate.for.Timestamping.Authority", + "[-tsacert ] Public-Key-Zertifikat f\u00FCr Zeitstempelautorit\u00E4t"}, + {".tsapolicyid.tsapolicyid.for.Timestamping.Authority", + "[-tsapolicyid ] TSAPolicyID f\u00FCr Zeitstempelautorit\u00E4t"}, + {".tsadigestalg.algorithm.of.digest.data.in.timestamping.request", + "[-tsadigestalg ] Algorithmus der Digestdaten in Zeitstempelanforderung"}, + {".altsigner.class.class.name.of.an.alternative.signing.mechanism", + "[-altsigner ] Klassenname eines alternativen Signiermechanismus\n (Diese Option ist veraltet und wird in einem zuk\u00FCnftigen Release entfernt.)"}, + {".altsignerpath.pathlist.location.of.an.alternative.signing.mechanism", + "[-altsignerpath ] Speicherort eines alternativen Signiermechanismus\n (Diese Option ist veraltet und wird in einem zuk\u00FCnftigen Release entfernt.)"}, + {".internalsf.include.the.SF.file.inside.the.signature.block", + "[-internalsf] SF-Datei in Signaturblock aufnehmen"}, + {".sectionsonly.don.t.compute.hash.of.entire.manifest", + "[-sectionsonly] Berechnet nicht den Hash des gesamten Manifests"}, + {".protected.keystore.has.protected.authentication.path", + "[-protected] Keystore hat gesch\u00FCtzten Authentifizierungspfad"}, + {".providerName.name.provider.name", + "[-providerName ] Providername"}, + {".add.provider.option", + "[-addprovider F\u00FCgt einen Sicherheitsprovider nach Name hinzu (z.B. SunPKCS11)"}, + {".providerArg.option.1", + " [-providerArg ]] ... Konfiguriert Argument f\u00FCr -addprovider"}, + {".providerClass.option", + "[-providerClass F\u00FCgt einen Sicherheitsprovider nach vollqualifiziertem Klassennamen hinzu"}, + {".providerArg.option.2", + " [-providerArg ]] ... Konfiguriert Argument f\u00FCr -providerClass"}, + {".strict.treat.warnings.as.errors", + "[-strict] Behandelt Warnungen als Fehler"}, + {".conf.url.specify.a.pre.configured.options.file", + "[-conf ] Vorkonfigurierte Optionsdatei angeben"}, + {".print.this.help.message", + "[-? -h --help] Gibt diese Hilfemeldung aus"}, + {"Option.lacks.argument", "Argument fehlt in Option"}, + {"Please.type.jarsigner.help.for.usage", "Geben Sie jarsigner --help ein, um Verwendungsinformationen anzuzeigen"}, + {"Please.specify.jarfile.name", "Geben Sie den Namen der JAR-Datei an"}, + {"Please.specify.alias.name", "Geben Sie einen Aliasnamen an"}, + {"Only.one.alias.can.be.specified", "Nur ein Alias kann angegeben werden"}, + {"This.jar.contains.signed.entries.which.is.not.signed.by.the.specified.alias.es.", + "Diese JAR-Datei enth\u00E4lt signierte Eintr\u00E4ge, die nicht von den angegebenen Aliasnamen signiert wurden."}, + {"This.jar.contains.signed.entries.that.s.not.signed.by.alias.in.this.keystore.", + "Diese JAR-Datei enth\u00E4lt signierte Eintr\u00E4ge, die nicht vom Alias in diesem Keystore signiert wurden."}, + {"s", "s"}, + {"m", "m"}, + {"k", "k"}, + {"X", "X"}, + {"q", "?"}, + {".and.d.more.", "(und %d mehr)"}, + {".s.signature.was.verified.", + " s = Signatur wurde verifiziert "}, + {".m.entry.is.listed.in.manifest", + " m = Eintrag ist in Manifest aufgef\u00FChrt"}, + {".k.at.least.one.certificate.was.found.in.keystore", + " k = Mindestens ein Zertifikat im Keystore gefunden"}, + {".X.not.signed.by.specified.alias.es.", + " X = Nicht von den angegebenen Aliasnamen signiert"}, + {".q.unsigned.entry", + " ? = Nicht signierter Eintrag"}, + {"no.manifest.", "Kein Manifest."}, + {".Signature.related.entries.","(Signaturbezogene Eintr\u00E4ge)"}, + {".Unsigned.entries.", "(Nicht signierte Eintr\u00E4ge)"}, + {".Directory.entries.", "(Verzeichniseintr\u00E4ge)"}, + {"jar.is.unsigned", + "JAR-Datei ist nicht signiert."}, + {"jar.treated.unsigned", + "Warnung: Signatur kann entweder nicht geparst oder nicht verifiziert werden. Die JAR-Datei wird als nicht signiert behandelt. Weitere Informationen erhalten Sie, indem Sie \"jarsigner\" mit aktiviertem Debugging erneut ausf\u00FChren (-J-Djava.security.debug=jar)."}, + {"jar.treated.unsigned.see.weak", + "Die JAR-Datei wird als nicht signiert behandelt, da sie mit einem schwachen Algorithmus signiert wurde, der jetzt deaktiviert ist.\n\nF\u00FChren Sie \"jarsigner\" mit der Option \"-verbose\" erneut aus, um weitere Einzelheiten zu erhalten."}, + {"jar.treated.unsigned.see.weak.verbose", + "Warnung: Die JAR-Datei wird als nicht signiert behandelt, da sie mit einem schwachen Algorithmus signiert wurde, der mittlerweile von der folgenden Sicherheitseigenschaft deaktiviert wurde:"}, + {"jar.signed.", "JAR-Datei signiert."}, + {"jar.signed.with.signer.errors.", "JAR-Datei signiert, mit Signaturgeberfehlern."}, + {"jar.verified.", "JAR-Datei verifiziert."}, + {"jar.verified.with.signer.errors.", "JAR-Datei verifiziert, mit Signaturgeberfehlern."}, + + {"history.with.ts", "- Von \"%1$s\" signiert\n Digestalgorithmus: %2$s\n Signaturalgorithmus: %3$s, %4$s\n Zeitstempel von \"%6$s\" am %5$tc\n Digestalgorithmus f\u00FCr Zeitstempel: %7$s\n Signaturalgorithmus f\u00FCr Zeitstempel: %8$s, %9$s"}, + {"history.without.ts", "- Von \"%1$s\" signiert\n Digestalgorithmus: %2$s\n Signaturalgorithmus: %3$s, %4$s"}, + {"history.unparsable", "- Signaturbezogene Datei %s kann nicht geparst werden"}, + {"history.nosf", "- Signaturbezogene Datei META-INF/%s.SF fehlt"}, + {"history.nobk", "- Blockdatei f\u00FCr signaturbezogene Datei META-INF/%s.SF fehlt"}, + + {"with.weak", "%s (schwach)"}, + {"with.disabled", "%s (deaktiviert)"}, + {"key.bit", "%d-Bit-Schl\u00FCssel"}, + {"key.bit.weak", "%d-Bit-Schl\u00FCssel (schwach)"}, + {"key.bit.disabled", "%d-Bit-Schl\u00FCssel (deaktiviert)"}, + {"unknown.size", "unbekannte Gr\u00F6\u00DFe"}, + {"extra.attributes.detected", "POSIX-Dateiberechtigung und/oder Symlink-Attribute erkannt. Diese Attribute werden bei der Signatur ignoriert und sind nicht durch die Signatur gesch\u00FCtzt."}, + + {"jarsigner.", "jarsigner: "}, + {"signature.filename.must.consist.of.the.following.characters.A.Z.0.9.or.", + "Signaturdateiname muss aus den folgenden Zeichen bestehen: A-Z, 0-9, _ oder -"}, + {"unable.to.open.jar.file.", "JAR-Datei kann nicht ge\u00F6ffnet werden: "}, + {"unable.to.create.", "Erstellen nicht m\u00F6glich: "}, + {".adding.", " Wird hinzugef\u00FCgt: "}, + {".updating.", " Wird aktualisiert: "}, + {".signing.", " Wird signiert: "}, + {"attempt.to.rename.signedJarFile.to.jarFile.failed", + "Der Versuch, {0} in {1} umzubenennen, war nicht erfolgreich"}, + {"attempt.to.rename.jarFile.to.origJar.failed", + "Der Versuch, {0} in {1} umzubenennen, war nicht erfolgreich"}, + {"unable.to.sign.jar.", "JAR-Datei kann nicht signiert werden: "}, + {"Enter.Passphrase.for.keystore.", "Passphrase f\u00FCr Keystore eingeben: "}, + {"keystore.load.", "Keystore-Ladevorgang: "}, + {"certificate.exception.", "Zertifikatsausnahme: "}, + {"unable.to.instantiate.keystore.class.", + "Keystore-Klasse kann nicht instanziiert werden: "}, + {"Certificate.chain.not.found.for.alias.alias.must.reference.a.valid.KeyStore.key.entry.containing.a.private.key.and", + "Zertifikatskette nicht gefunden f\u00FCr: {0}. {1} muss einen g\u00FCltigen Keystore-Schl\u00FCssel referenzieren, der einen Private Key und eine zugeh\u00F6rige Public-Key-Zertifikatskette enth\u00E4lt."}, + {"File.specified.by.certchain.does.not.exist", + "Von -certchain angegebene Datei ist nicht vorhanden"}, + {"Cannot.restore.certchain.from.file.specified", + "Zertifikatskette kann nicht aus angegebener Datei wiederhergestellt werden"}, + {"Certificate.chain.not.found.in.the.file.specified.", + "Zertifikatskette nicht in der angegebenen Datei gefunden."}, + {"found.non.X.509.certificate.in.signer.s.chain", + "Nicht-X.509-Zertifikat in Kette des Signaturgebers gefunden"}, + {"Enter.key.password.for.alias.", "Schl\u00FCsselkennwort f\u00FCr {0} eingeben: "}, + {"unable.to.recover.key.from.keystore", + "Schl\u00FCssel kann nicht aus Keystore wiederhergestellt werden"}, + {"key.associated.with.alias.not.a.private.key", + "Mit {0} verkn\u00FCpfter Schl\u00FCssel ist kein Private Key"}, + {"you.must.enter.key.password", "Sie m\u00FCssen ein Schl\u00FCsselkennwort eingeben"}, + {"unable.to.read.password.", "Kennwort kann nicht gelesen werden: "}, + {"certificate.is.valid.from", "Zertifikat ist von {0} bis {1} g\u00FCltig"}, + {"certificate.expired.on", "Zertifikat ist am {0} abgelaufen"}, + {"certificate.is.not.valid.until", + "Zertifikat ist erst ab {0} g\u00FCltig"}, + {"certificate.will.expire.on", "Zertifikat l\u00E4uft am {0} ab"}, + {".Invalid.certificate.chain.", "[Ung\u00FCltige Zertifikatskette: "}, + {".Invalid.TSA.certificate.chain.", "[Ung\u00FCltige TSA-Zertifikatskette: "}, + {"requesting.a.signature.timestamp", + "Signaturzeitstempel wird angefordert"}, + {"TSA.location.", "TSA-Ort: "}, + {"TSA.certificate.", "TSA-Zertifikat: "}, + {"no.response.from.the.Timestamping.Authority.", + "Keine Antwort von der Zeitstempelautorit\u00E4t. Bei Verbindungen hinter einer Firewall muss m\u00F6glicherweise ein HTTP- oder HTTPS-Proxy angegeben werden. Geben Sie die folgenden Optionen f\u00FCr \"jarsigner\" an:"}, + {"or", "oder"}, + {"Certificate.not.found.for.alias.alias.must.reference.a.valid.KeyStore.entry.containing.an.X.509.public.key.certificate.for.the", + "Zertifikat nicht gefunden f\u00FCr: {0}. {1} muss einen g\u00FCltigen Keystore-Eintrag referenzieren, der ein X.509-Public-Key-Zertifikat f\u00FCr die Zeitstempelautorit\u00E4t enth\u00E4lt."}, + {"using.an.alternative.signing.mechanism", + "Verwendung eines alternativen Signaturmechanismus"}, + {"entry.was.signed.on", "Eintrag wurde signiert am {0}"}, + {"Warning.", "Warnung: "}, + {"Error.", "Fehler: "}, + {"...Signer", ">>> Signaturgeber"}, + {"...TSA", ">>> TSA"}, + {"trusted.certificate", "vertrauensw\u00FCrdiges Zertifikat"}, + {"This.jar.contains.unsigned.entries.which.have.not.been.integrity.checked.", + "Diese JAR-Datei enth\u00E4lt nicht signierte Eintr\u00E4ge, deren Integrit\u00E4t nicht gepr\u00FCft wurde. "}, + {"This.jar.contains.entries.whose.signer.certificate.has.expired.", + "Diese JAR-Datei enth\u00E4lt Eintr\u00E4ge, deren Signaturgeberzertifikat abgelaufen ist."}, + {"This.jar.contains.entries.whose.signer.certificate.will.expire.within.six.months.", + "Diese JAR-Datei enth\u00E4lt Eintr\u00E4ge, deren Signaturgeberzertifikat innerhalb der n\u00E4chsten sechs Monate abl\u00E4uft. "}, + {"This.jar.contains.entries.whose.signer.certificate.is.not.yet.valid.", + "Diese JAR-Datei enth\u00E4lt Eintr\u00E4ge, deren Signaturgeberzertifikat noch nicht g\u00FCltig ist. "}, + {"This.jar.contains.entries.whose.signer.certificate.is.self.signed.", + "Diese JAR-Datei enth\u00E4lt Eintr\u00E4ge, deren Signaturgeberzertifikat selbstsigniert ist."}, + {"Re.run.with.the.verbose.and.certs.options.for.more.details.", + "F\u00FChren Sie den Befehl erneut mit den Optionen -verbose und -certs aus, um weitere Details zu erhalten."}, + {"The.signer.certificate.has.expired.", + "Das Signaturgeberzertifikat ist abgelaufen."}, + {"The.timestamp.expired.1.but.usable.2", + "Der Zeitstempel ist am %1$tY-%1$tm-%1$td abgelaufen. Die JAR-Datei bleibt aber g\u00FCltig, bis das Signaturgeberzertifikat am %2$tY-%2$tm-%2$td abl\u00E4uft."}, + {"The.timestamp.has.expired.", + "Der Zeitstempel ist abgelaufen."}, + {"The.signer.certificate.will.expire.within.six.months.", + "Das Signaturgeberzertifikat l\u00E4uft innerhalb der n\u00E4chsten sechs Monate ab."}, + {"The.timestamp.will.expire.within.one.year.on.1", + "Der Zeitstempel l\u00E4uft innerhalb des n\u00E4chsten Jahres am %1$tY-%1$tm-%1$td ab."}, + {"The.timestamp.will.expire.within.one.year.on.1.but.2", + "Der Zeitstempel l\u00E4uft innerhalb des n\u00E4chsten Jahres am %1$tY-%1$tm-%1$td ab. Die JAR-Datei bleibt aber g\u00FCltig, bis das Signaturgeberzertifikat am %2$tY-%2$tm-%2$td abl\u00E4uft."}, + {"The.signer.certificate.is.not.yet.valid.", + "Das Signaturgeberzertifikat ist noch nicht g\u00FCltig."}, + {"The.signer.certificate.s.KeyUsage.extension.doesn.t.allow.code.signing.", + "Die KeyUsage-Erweiterung des Signaturgeberzertifikats l\u00E4sst keine Codesignatur zu."}, + {"The.signer.certificate.s.ExtendedKeyUsage.extension.doesn.t.allow.code.signing.", + "Die ExtendedKeyUsage-Erweiterung des Signaturgeberzertifikats l\u00E4sst keine Codesignatur zu."}, + {"The.signer.certificate.s.NetscapeCertType.extension.doesn.t.allow.code.signing.", + "Die NetscapeCertType-Erweiterung des Signaturgeberzertifikats l\u00E4sst keine Codesignatur zu."}, + {"This.jar.contains.entries.whose.signer.certificate.s.KeyUsage.extension.doesn.t.allow.code.signing.", + "Diese JAR-Datei enth\u00E4lt Eintr\u00E4ge, bei denen die KeyUsage-Erweiterung des Signaturgeberzertifikats keine Codesignatur zul\u00E4sst."}, + {"This.jar.contains.entries.whose.signer.certificate.s.ExtendedKeyUsage.extension.doesn.t.allow.code.signing.", + "Diese JAR-Datei enth\u00E4lt Eintr\u00E4ge, bei denen die ExtendedKeyUsage-Erweiterung des Signaturgeberzertifikats keine Codesignatur zul\u00E4sst."}, + {"This.jar.contains.entries.whose.signer.certificate.s.NetscapeCertType.extension.doesn.t.allow.code.signing.", + "Diese JAR-Datei enth\u00E4lt Eintr\u00E4ge, bei denen die NetscapeCertType-Erweiterung des Signaturgeberzertifikats keine Codesignatur zul\u00E4sst."}, + {".{0}.extension.does.not.support.code.signing.", + "[{0}-Erweiterung unterst\u00FCtzt keine Codesignatur]"}, + {"The.signer.s.certificate.chain.is.invalid.reason.1", + "Die Zertifikatskette des Signaturgebers ist ung\u00FCltig. Grund: %s"}, + {"The.tsa.certificate.chain.is.invalid.reason.1", + "Die TSA-Zertifikatskette ist ung\u00FCltig. Grund: %s"}, + {"The.signer.s.certificate.is.self.signed.", + "Das Zertifikat des Signaturgebers ist selbstsigniert."}, + {"The.1.algorithm.specified.for.the.2.option.is.considered.a.security.risk..This.algorithm.will.be.disabled.in.a.future.update.", + "Der f\u00FCr die Option %2$s angegebene %1$s-Algorithmus gilt als Sicherheitsrisiko. Dieser Algorithmus wird in einem zuk\u00FCnftigen Update deaktiviert."}, + {"The.1.algorithm.specified.for.the.2.option.is.considered.a.security.risk.and.is.disabled.", + "Der f\u00FCr die Option %2$s angegebene %1$s-Algorithmus gilt als Sicherheitsrisiko und ist deaktiviert."}, + {"The.timestamp.digest.algorithm.1.is.considered.a.security.risk..This.algorithm.will.be.disabled.in.a.future.update.", + "Der %1$s-Digestalgorithmus des Zeitstempels gilt als Sicherheitsrisiko. Dieser Algorithmus wird in einem zuk\u00FCnftigen Update deaktiviert."}, + {"The.digest.algorithm.1.is.considered.a.security.risk..This.algorithm.will.be.disabled.in.a.future.update.", + "Der %1$s-Digestalgorithmus gilt als Sicherheitsrisiko. Dieser Algorithmus wird in einem zuk\u00FCnftigen Update deaktiviert."}, + {"The.signature.algorithm.1.is.considered.a.security.risk..This.algorithm.will.be.disabled.in.a.future.update.", + "Der %1$s-Signaturalgorithmus gilt als Sicherheitsrisiko. Dieser Algorithmus wird in einem zuk\u00FCnftigen Update deaktiviert."}, + {"The.1.signing.key.has.a.keysize.of.2.which.is.considered.a.security.risk..This.key.size.will.be.disabled.in.a.future.update.", + "Der %1$s-Signaturschl\u00FCssel hat eine Schl\u00FCsselgr\u00F6\u00DFe von %2$d. Das gilt als Sicherheitsrisiko. Diese Schl\u00FCsselgr\u00F6\u00DFe wird in einem zuk\u00FCnftigen Update deaktiviert."}, + {"The.1.signing.key.has.a.keysize.of.2.which.is.considered.a.security.risk.and.is.disabled.", + "Der %1$s-Signaturschl\u00FCssel hat eine Schl\u00FCsselgr\u00F6\u00DFe von %2$d. Das gilt als Sicherheitsrisiko und ist deaktiviert."}, + {"This.jar.contains.entries.whose.certificate.chain.is.invalid.reason.1", + "Diese JAR-Datei enth\u00E4lt Eintr\u00E4ge, deren Zertifikatskette ung\u00FCltig ist. Grund: %s"}, + {"This.jar.contains.entries.whose.tsa.certificate.chain.is.invalid.reason.1", + "Diese JAR-Datei enth\u00E4lt Eintr\u00E4ge, deren TSA-Zertifikatskette ung\u00FCltig ist. Grund: %s"}, + {"no.timestamp.signing", + "Weder -tsa noch -tsacert wurde angegeben, und diese JAR-Datei hat keinen Zeitstempel. Ohne Zeitstempel k\u00F6nnen Benutzer diese JAR-Datei nach dem Ablaufdatum des Signaturgeberzertifikats (%1$tY-%1$tm-%1$td) m\u00F6glicherweise nicht mehr validieren."}, + {"invalid.timestamp.signing", + "Der Zeitstempel ist ung\u00FCltig. Ohne einen g\u00FCltigen Zeitstempel k\u00F6nnen Benutzer diese JAR-Datei nach dem Ablaufdatum des Signaturgeberzertifikats (%1$tY-%1$tm-%1$td) m\u00F6glicherweise nicht mehr validieren."}, + {"no.timestamp.verifying", + "Diese JAR-Datei enth\u00E4lt Signaturen ohne Zeitstempel. Ohne einen Zeitstempel k\u00F6nnen Benutzer diese JAR-Datei nach dem Ablauf eines Signaturgeberzertifikats (fr\u00FChestens %1$tY-%1$tm-%1$td) m\u00F6glicherweise nicht mehr validieren."}, + {"bad.timestamp.verifying", + "Diese JAR-Datei enth\u00E4lt Signaturen mit einem ung\u00FCltigen Zeitstempel. Ohne einen g\u00FCltigen Zeitstempel k\u00F6nnen Benutzer diese JAR-Datei nach dem Ablauf eines Signaturgeberzertifikats (fr\u00FChestens %1$tY-%1$tm-%1$td) m\u00F6glicherweise nicht mehr validieren.\nF\u00FChren Sie \"jarsigner\" mit -J-Djava.security.debug=jar erneut aus, um weitere Informationen zu erhalten."}, + {"The.signer.certificate.will.expire.on.1.", + "Das Signaturgeberzertifikat l\u00E4uft am %1$tY-%1$tm-%1$td ab."}, + {"The.timestamp.will.expire.on.1.", + "Der Zeitstempel l\u00E4uft am %1$tY-%1$tm-%1$td ab."}, + {"signer.cert.expired.1.but.timestamp.good.2.", + "Das Signaturgeberzertifikat ist am %1$tY-%1$tm-%1$td abgelaufen. Die JAR-Datei bleibt aber g\u00FCltig, bis der Zeitstempel am %2$tY-%2$tm-%2$td abl\u00E4uft."}, + {"Unknown.password.type.", "Unbekannter Kennworttyp: "}, + {"Cannot.find.environment.variable.", + "Umgebungsvariable kann nicht gefunden werden: "}, + {"Cannot.find.file.", "Datei kann nicht gefunden werden: "}, + {"event.ocsp.check", "Verbindung zu OCSP-Server bei %s wird hergestellt..."}, + {"event.crl.check", "CRL wird von %s heruntergeladen..."}, + }; + + /** + * Returns the contents of this ResourceBundle. + * + *

    + * + * @return the contents of this ResourceBundle. + */ + @Override + public Object[][] getContents() { + return contents; + } +} diff --git a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java index 65422c0e68647b79bc1e7b0a93387884ecabfa99..aca0727297ca10c0504e63d6e2c3fd56d065772b 100644 --- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java +++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java @@ -57,6 +57,8 @@ public class Resources_ja extends java.util.ListResourceBundle { "\u4F7F\u7528\u65B9\u6CD5: jarsigner [options] jar-file alias"}, {".jarsigner.verify.options.jar.file.alias.", " jarsigner -verify [options] jar-file [alias...]"}, + {".jarsigner.version", + " jarsigner -version"}, {".keystore.url.keystore.location", "[-keystore ] \u30AD\u30FC\u30B9\u30C8\u30A2\u306E\u4F4D\u7F6E"}, {".storepass.password.password.for.keystore.integrity", @@ -77,6 +79,8 @@ public class Resources_ja extends java.util.ListResourceBundle { "[-sigalg ] \u30B7\u30B0\u30CD\u30C1\u30E3\u30FB\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u306E\u540D\u524D"}, {".verify.verify.a.signed.JAR.file", "[-verify] \u7F72\u540D\u4ED8\u304DJAR\u30D5\u30A1\u30A4\u30EB\u306E\u691C\u8A3C"}, + {".version.print.the.program.version", + "[-version] \u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u307E\u3059"}, {".verbose.suboptions.verbose.output.when.signing.verifying.", "[-verbose[:suboptions]] \u7F72\u540D/\u691C\u8A3C\u6642\u306E\u8A73\u7D30\u51FA\u529B\u3002"}, {".suboptions.can.be.all.grouped.or.summary", @@ -131,6 +135,8 @@ public class Resources_ja extends java.util.ListResourceBundle { {"s", "s"}, {"m", "m"}, {"k", "k"}, + {"X", "X"}, + {"q", "?"}, {".and.d.more.", "(\u4ED6\u306B\u3082%d\u500B)"}, {".s.signature.was.verified.", " s=\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F "}, @@ -140,9 +146,12 @@ public class Resources_ja extends java.util.ListResourceBundle { " k=1\u3064\u4EE5\u4E0A\u306E\u8A3C\u660E\u66F8\u304C\u30AD\u30FC\u30B9\u30C8\u30A2\u3067\u691C\u51FA\u3055\u308C\u307E\u3057\u305F"}, {".X.not.signed.by.specified.alias.es.", " X =\u6307\u5B9A\u3057\u305F\u5225\u540D\u3067\u7F72\u540D\u3055\u308C\u3066\u3044\u307E\u305B\u3093"}, + {".q.unsigned.entry", + " ? = \u7F72\u540D\u306A\u3057\u306E\u30A8\u30F3\u30C8\u30EA"}, {"no.manifest.", "\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002"}, {".Signature.related.entries.","(\u30B7\u30B0\u30CD\u30C1\u30E3\u95A2\u9023\u30A8\u30F3\u30C8\u30EA)"}, {".Unsigned.entries.", "(\u7F72\u540D\u306A\u3057\u306E\u30A8\u30F3\u30C8\u30EA)"}, + {".Directory.entries.", "(\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FB\u30A8\u30F3\u30C8\u30EA)"}, {"jar.is.unsigned", "jar\u306F\u7F72\u540D\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"}, {"jar.treated.unsigned", diff --git a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java index 0cdd2b96ceea787814959432e7b9989bb6843549..47dacd6a8a5b501b874e38385812140f4e9a1fd9 100644 --- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java +++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java @@ -57,6 +57,8 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { "\u7528\u6CD5: jarsigner [\u9009\u9879] jar-file \u522B\u540D"}, {".jarsigner.verify.options.jar.file.alias.", " jarsigner -verify [\u9009\u9879] jar-file [\u522B\u540D...]"}, + {".jarsigner.version", + " jarsigner -version"}, {".keystore.url.keystore.location", "[-keystore ] \u5BC6\u94A5\u5E93\u4F4D\u7F6E"}, {".storepass.password.password.for.keystore.integrity", @@ -77,6 +79,8 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { "[-sigalg <\u7B97\u6CD5>] \u7B7E\u540D\u7B97\u6CD5\u7684\u540D\u79F0"}, {".verify.verify.a.signed.JAR.file", "[-verify] \u9A8C\u8BC1\u5DF2\u7B7E\u540D\u7684 JAR \u6587\u4EF6"}, + {".version.print.the.program.version", + "[-version] \u8F93\u51FA\u7A0B\u5E8F\u7248\u672C"}, {".verbose.suboptions.verbose.output.when.signing.verifying.", "[-verbose[:suboptions]] \u7B7E\u540D/\u9A8C\u8BC1\u65F6\u8F93\u51FA\u8BE6\u7EC6\u4FE1\u606F\u3002"}, {".suboptions.can.be.all.grouped.or.summary", @@ -131,6 +135,8 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {"s", "s"}, {"m", "m"}, {"k", "k"}, + {"X", "X"}, + {"q", "?"}, {".and.d.more.", "(%d \u53CA\u4EE5\u4E0A)"}, {".s.signature.was.verified.", " s = \u5DF2\u9A8C\u8BC1\u7B7E\u540D "}, @@ -140,9 +146,12 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { " k = \u5728\u5BC6\u94A5\u5E93\u4E2D\u81F3\u5C11\u627E\u5230\u4E86\u4E00\u4E2A\u8BC1\u4E66"}, {".X.not.signed.by.specified.alias.es.", " X = \u672A\u7531\u6307\u5B9A\u522B\u540D\u7B7E\u540D"}, + {".q.unsigned.entry", + " ? = \u672A\u7B7E\u540D\u6761\u76EE"}, {"no.manifest.", "\u6CA1\u6709\u6E05\u5355\u3002"}, {".Signature.related.entries.","(\u4E0E\u7B7E\u540D\u76F8\u5173\u7684\u6761\u76EE)"}, {".Unsigned.entries.", "(\u672A\u7B7E\u540D\u6761\u76EE)"}, + {".Directory.entries.", "\uFF08\u76EE\u5F55\u6761\u76EE\uFF09"}, {"jar.is.unsigned", "jar \u672A\u7B7E\u540D\u3002"}, {"jar.treated.unsigned", diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/FingerPrint.java b/src/jdk.jartool/share/classes/sun/tools/jar/FingerPrint.java index c1ce47a19453e6848033ddd87968590226b87b4c..e9245430f666b2ee6d1cf2dc2e072546a68a0305 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/FingerPrint.java +++ b/src/jdk.jartool/share/classes/sun/tools/jar/FingerPrint.java @@ -244,7 +244,7 @@ final class FingerPrint { private final Set methods = new HashSet<>(); public ClassAttributes() { - super(Opcodes.ASM7); + super(Opcodes.ASM9); } private boolean isPublic(int access) { diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties index 10f634baa085452f797e1e7c6736be8a0db3b60a..95744421c89829f25f2affab05721082bc44e82c 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties +++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,11 +25,11 @@ error.multiple.main.operations=Es ist nicht m\u00F6glich, mehrere "-cuxtid"-Optionen anzugeben error.cant.open=\u00D6ffnen nicht m\u00F6glich: {0} -error.illegal.option=Ung\u00FCltige Option: {0} +error.illegal.option=Unzul\u00E4ssige Option: {0} error.unrecognized.option=Unbekannte Option: {0} error.missing.arg=F\u00FCr die Option {0} ist ein Argument erforderlich error.bad.file.arg=Fehler beim Parsen der Dateiargumente -error.bad.option=Eine der Optionen -{ctxuid} muss angegeben werden. +error.bad.option=Eine der Optionen -{ctxuid} oder --validate muss angegeben werden. error.bad.cflag=Kennzeichen "c" erfordert Angabe von Manifest oder Eingabedateien. error.bad.uflag=Kennzeichen "u" erfordert Angabe von Manifest, Kennzeichen "e" oder Eingabedateien. error.bad.eflag=Kennzeichen "e" und Manifest mit dem Attribut "Main-Class" k\u00F6nnen nicht zusammen angegeben\nwerden. @@ -43,7 +43,7 @@ error.create.tempfile=Es konnte keine tempor\u00E4re Datei erstellt werden error.hash.dep=Abh\u00E4ngigkeiten bei Hashing-Modul {0}. Modul {1} kann nicht im Modulpfad gefunden werden error.module.options.without.info=--module-version oder --hash-modules ohne module-info.class error.no.operative.descriptor=Kein operativer Deskriptor f\u00FCr Release: {0} -error.no.root.descriptor=Kein Root-Moduldeskriptor. Geben Sie "--release" an +error.no.root.descriptor=Kein Root-Moduldeskriptor. Geben Sie --release an error.unable.derive.automodule=Moduldeskriptor kann nicht abgeleitet werden f\u00FCr: {0} error.unexpected.module-info=Unerwarteter Moduldeskriptor {0} error.module.descriptor.not.found=Moduldeskriptor nicht gefunden @@ -52,6 +52,8 @@ error.missing.provider=Serviceprovider nicht gefunden: {0} error.release.value.notnumber=Release {0} nicht g\u00FCltig error.release.value.toosmall=Release {0} nicht g\u00FCltig, muss >= 9 sein error.release.unexpected.versioned.entry=Unerwarteter versionierte Eintrag {0} f\u00FCr Release {1} +error.date.notvalid=Datum {0} ist keine g\u00FCltige erweiterte Datums-/Uhrzeitangabe mit Zeitunterschied und optionaler Zeitzone nach ISO-8601 +error.date.out.of.range=Datum {0} liegt nicht im g\u00FCltigen Bereich 1980-01-01T00:00:02Z bis 2099-12-31T23:59:59Z error.validator.jarfile.exception={0} kann nicht validiert werden: {1} error.validator.jarfile.invalid=ung\u00FCltige Multi-Release-JAR-Datei {0} gel\u00F6scht error.validator.bad.entry.name=Eintragsname hat das falsche Format, {0} @@ -75,6 +77,7 @@ warn.validator.identical.entry=Warnung: Eintrag {0} enth\u00E4lt eine Klasse, di warn.validator.resources.with.same.name=Warnung: Eintrag {0}, mehrere Ressourcen mit demselben Namen warn.validator.concealed.public.class=Warnung: Eintrag {0} ist eine \u00F6ffentliche Klasse\nin einem verdeckten Package. Wenn Sie diese JAR-Datei in den Classpath einf\u00FCgen, kommt es\nzu nicht kompatiblen \u00F6ffentlichen Schnittstellen warn.release.unexpected.versioned.entry=Unerwarteter versionierter Eintrag {0} +warn.flag.is.deprecated=Warnung: Die Option {0} ist veraltet, und ihre Entfernung in einem k\u00FCnftigen JDK-Release ist geplant\n out.added.manifest=Manifest wurde hinzugef\u00FCgt out.added.module-info=module-info hinzugef\u00FCgt: {0} out.automodule=Kein Moduldeskriptor gefunden. Automatisches Modul wurde abgeleitet. @@ -89,7 +92,7 @@ out.extracted=extrahiert: {0} out.inflated=\ vergr\u00F6\u00DFert: {0} out.size=(ein = {0}) (aus = {1}) -usage.compat=Kompatibilit\u00E4tsschnittstelle:\nVerwendung: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] Dateien] ...\nOptionen:\n -c Neues Archiv erstellen\n -t Inhaltsverzeichnis f\u00FCr Archiv anzeigen\n -x Benannte (oder alle) Dateien aus Archiv extrahieren\n -u Vorhandenes Archiv aktualisieren\n -v Ausgabe im Verbose-Modus aus Standardausgabe generieren\n -f Dateinamen f\u00FCr Archiv angeben\n -m Manifestinformationen aus angegebener Manifestdatei aufnehmen\n -n Pack200-Normalisierung nach Erstellung eines neuen Archivs ausf\u00FChren\n -e Anwendungseinstiegspunkt f\u00FCr in ausf\u00FChrbare JAR-Datei \n geb\u00FCndelte Standalone-Anwendung angeben\n -0 Nur speichern; keine ZIP-Komprimierung verwenden\n -P Komponenten mit vorangestelltem "/" (absoluter Pfad) und ".." (\u00FCbergeordnetes Verzeichnis) aus Dateinamen beibehalten\n -M Keine Manifestdatei f\u00FCr die Eintr\u00E4ge erstellen\n -i Indexinformationen f\u00FCr die angegebenen JAR-Dateien erstellen\n -C Zum angegebenen Verzeichnis wechseln und folgende Datei ber\u00FCcksichtigen\nDateien, die Verzeichnisse sind, werden rekursiv verarbeitet.\nDer Name der Manifestdatei, der Name der Archivdatei und der Name des Einstiegspunktes werden\nin derselben Reihenfolge wie die Kennzeichen "m", "f" und "e" angegeben.\n\nBeispiel 1: Zwei Klassendateien in ein Archiv "classes.jar" archivieren: \n jar cvf classes.jar Foo.class Bar.class \nBeispiel 2: Mit der vorhandenen Manifestdatei "mymanifest" alle\n Dateien im Verzeichnis foo/ in "classes.jar" archivieren: \n jar cvfm classes.jar mymanifest -C foo/ .\n +usage.compat=Kompatibilit\u00E4tsschnittstelle\nVerwendung: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files] ...\nOptionen:\n -c erstellt ein neues Archiv\n -t listet das Inhaltsverzeichnis f\u00FCr das Archiv auf\n -x extrahiert die benannten (oder alle) Dateien aus dem Archiv\n -u aktualisiert ein vorhandenes Archiv\n -v generiert Verbose-Ausgabe zur Standardausgabe\n -f gibt den Archivdateinamen an\n -m schlie\u00DFt Manifestinformationen aus der angegebenen Manifestdatei ein\n -e gibt den Anwendungseinstiegspunkt f\u00FCr Standalone-Anwendungen an,\n die in einer ausf\u00FChrbaren JAR-Datei geb\u00FCndelt sind\n -0 speichert nur, keine ZIP-Komprimierung\n -P beh\u00E4lt die vorangestellten Komponenten "/" (absoluter Pfad) und ".." (\u00FCbergeordnetes Verzeichnis) aus dem Dateinamen bei\n -M generiert keine Manifestdatei f\u00FCr die Eintr\u00E4ge\n -i generiert Indexinformationen f\u00FCr die angegebenen JAR-Dateien\n -C wechselt zum angegebenen Verzeichnis und schlie\u00DFt die folgende Datei ein\nDateien, die Verzeichnisse sind, werden rekursiv verarbeitet.\nDie Namen der Manifestdatei, der Archivdatei und des Einstiegspunkts werden\nin der gleichen Reihenfolge wie die Flags "m", "f" und "e" verarbeitet.\n\nBeispiel 1: Zwei Klassendateien in einem Archiv classes.jar archivieren: \n jar cvf classes.jar Foo.class Bar.class \nBeispiel 2: Eine vorhandene Manifestdatei "mymanifest" verwenden und alle\n Dateien im Verzeichnis foo/ directory in "classes.jar" archivieren: \n jar cvfm classes.jar mymanifest -C foo/ .\n main.usage.summary=Verwendung: jar [OPTION...] [ [--release VERSION] [-C dir] Dateien] ... main.usage.summary.try=Verwenden Sie "jar --help", um weitere Informationen anzuzeigen. @@ -102,11 +105,12 @@ main.help.opt.main.list=\ -t, --list Das Inhaltsverzeichnis f\u main.help.opt.main.update=\ -u, --update Ein vorhandenes JAR-Archiv aktualisieren main.help.opt.main.extract=\ -x, --extract Benannte (oder alle) Dateien aus dem Archiv extrahieren main.help.opt.main.describe-module=\ -d, --describe-module Gibt den Moduldeskriptor oder automatischen Modulnamen aus +main.help.opt.main.validate=\ --validate Validiert den Inhalt des JAR-Archivs. Diese Option\n validiert, dass die von einem Multi-Release-JAR-Archiv\n exportierte API \u00FCber die verschiedenen Releaseversionen\n hinweg konsistent ist. main.help.opt.any=\ In jedem Modus g\u00FCltige Vorgangsmodifikatoren:\n\n -C DIR Zum angegebenen Verzeichnis wechseln und die folgende\n Datei aufnehmen main.help.opt.any.file=\ -f, --file=FILE Der Name der Archivdatei. Wenn Sie dies lauslassen, wird entweder stdin oder\n stdout verwendet, je nach Vorgang\n --release VERSION Speichert alle der folgenden Dateien in einem versionierten Verzeichnis\n der JAR-Datei (d.h. META-INF/versions/VERSION/) main.help.opt.any.verbose=\ -v, --verbose Verbose-Ausgabe bei Standardausgabe generieren main.help.opt.create=\ Vorgangsmodifikatoren, die nur im Erstellungsmodus g\u00FCltig sind:\n -main.help.opt.create.normalize=\ -n, --normalize Normalisiert Informationen im neuen JAR-Archiv\n nach der Erstellung +main.help.opt.create.normalize=\ -n, --normalize Normalisiert Informationen im neuen JAR-Archiv\n nach der Erstellung. Diese Option ist veraltet, und ihre\n Entfernung in einem k\u00FCnftigen JDK-Release ist geplant main.help.opt.create.update=\ Vorgangsmodifikatoren, die nur im Erstellungs- und Aktualisierungsmodus g\u00FCltig sind:\n main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME Der Anwendungseinstiegspunkt f\u00FCr Standalone-\n Anwendungen, die in einem modularen oder ausf\u00FChrbaren\n JAR-Archiv geb\u00FCndelt sind main.help.opt.create.update.manifest=\ -m, --manifest=FILE Die Manifestinformationen aus der angegebenen\n Manifestdatei aufnehmen @@ -118,8 +122,9 @@ main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Hinweis f\u00FCr ein Tool, eine Warnung auszugeben,\n wenn das Modul aufgel\u00F6st wird, entweder "deprecated", "deprecated-for-removal"\n oder "incubating" main.help.opt.create.update.index=\ Vorgangsmodifikatoren, die nur im Erstellungs-, Aktualisierungs- und Indexgenerierungsmodus g\u00FCltig sind:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress Nur speichern, keine ZIP-Komprimierung verwenden +main.help.opt.create.update.index.date=\ --date=TIMESTAMP Zeitstempel im erweiterten Datums-/Uhrzeitformat mit Zeitunterschied\n und optionaler Zeitzone nach ISO-8601, zur Verwendung f\u00FCr die Zeitstempel von\n Eintr\u00E4gen, z.B. "2022-02-12T12:30:00-05:00" main.help.opt.other=\ Weitere Optionen:\n -main.help.opt.other.help=\ -h, --help[:compat] Gibt diese Meldung oder optional die Kompatibilit\u00E4t, Hilfe an +main.help.opt.other.help=\ -?, -h, --help[:compat] Gibt diese Meldung oder optional die Kompatibilit\u00E4t, Hilfe an main.help.opt.other.help-extra=\ --help-extra Hilfe zu zus\u00E4tzlichen Optionen main.help.opt.other.version=\ --version Programmversion ausgeben main.help.postopt=\ Ein Archiv ist ein modulares JAR-Archiv, wenn der Moduldeskriptor "module-info.class"\n in der Root der angegebenen Verzeichnisse oder in der Root des JAR-Archivs selbst\n vorhanden ist. Die folgenden Vorg\u00E4nge sind nur g\u00FCltig, wenn Sie ein modulares JAR-Archiv\n erstellen oder ein vorhandenes nicht modulares JAR-Archiv aktualisieren: "--module-version",\n "--hash-modules" und "--modulepath".\n\n Obligatorische oder optionale Argumente zu langen Optionen sind auch f\u00FCr die jeweils\n zugeh\u00F6rigen kurzen Optionen obligatorisch oder optional. diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties index b17d8c1e08dea4733e3426eb43d9a82806b14327..a4cdec838f8be0b7551f3c4fdb9565cf090854aa 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties +++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,7 @@ error.illegal.option=\u4E0D\u6B63\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0} error.unrecognized.option=\u8A8D\u8B58\u3055\u308C\u306A\u3044\u30AA\u30D7\u30B7\u30E7\u30F3: {0} error.missing.arg=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306B\u306F\u5F15\u6570\u304C\u5FC5\u8981\u3067\u3059\u3002 error.bad.file.arg=\u30D5\u30A1\u30A4\u30EB\u5F15\u6570\u306E\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F -error.bad.option=\u30AA\u30D7\u30B7\u30E7\u30F3-{ctxuid}\u306E\u3046\u3061\u306E1\u3064\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +error.bad.option=\u30AA\u30D7\u30B7\u30E7\u30F3-{ctxuid}\u307E\u305F\u306F--validate\u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 error.bad.cflag=\u30D5\u30E9\u30B0'c'\u3067\u306F\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u307E\u305F\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u304C\u5FC5\u8981\u3067\u3059\u3002 error.bad.uflag=\u30D5\u30E9\u30B0'u'\u3067\u306F\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304B'e'\u30D5\u30E9\u30B0\u3001\u307E\u305F\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u304C\u5FC5\u8981\u3067\u3059\u3002 error.bad.eflag='e'\u30D5\u30E9\u30B0\u3068'Main-Class'\u5C5E\u6027\u3092\u6301\u3064\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u306F\u540C\u6642\u306B\n\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002 @@ -52,6 +52,8 @@ error.missing.provider=\u30B5\u30FC\u30D3\u30B9\u30FB\u30D7\u30ED\u30D0\u30A4\u3 error.release.value.notnumber=\u30EA\u30EA\u30FC\u30B9{0}\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 error.release.value.toosmall=\u30EA\u30EA\u30FC\u30B9{0}\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u30029\u4EE5\u4E0A\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 error.release.unexpected.versioned.entry=\u30EA\u30EA\u30FC\u30B9{1}\u3067\u4E88\u671F\u3057\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u6E08\u30A8\u30F3\u30C8\u30EA{0} +error.date.notvalid=\u65E5\u4ED8{0}\u304C\u3001\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30BF\u30A4\u30E0\u30BE\u30FC\u30F3\u3092\u6307\u5B9A\u3057\u305F\u3001\u6709\u52B9\u306AISO-8601\u306E\u62E1\u5F35\u30AA\u30D5\u30BB\u30C3\u30C8\u306E\u65E5\u6642\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +error.date.out.of.range=\u65E5\u4ED8{0}\u304C\u6709\u52B9\u306A\u7BC4\u56F21980-01-01T00:00:02Z to 2099-12-31T23:59:59Z\u306B\u3042\u308A\u307E\u305B\u3093 error.validator.jarfile.exception={0}\u3092\u691C\u8A3C\u3067\u304D\u307E\u305B\u3093: {1} error.validator.jarfile.invalid=\u7121\u52B9\u306A\u30DE\u30EB\u30C1\u30EA\u30EA\u30FC\u30B9jar\u30D5\u30A1\u30A4\u30EB{0}\u304C\u524A\u9664\u3055\u308C\u307E\u3057\u305F error.validator.bad.entry.name=\u30A8\u30F3\u30C8\u30EA\u540D\u304C\u4E0D\u6B63\u3067\u3059: {0} @@ -103,6 +105,7 @@ main.help.opt.main.list=\ -t\u3001--list \u30A2\u30FC\u30AB\u30 main.help.opt.main.update=\ -u\u3001--update \u65E2\u5B58\u306Ejar\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u66F4\u65B0\u3057\u307E\u3059 main.help.opt.main.extract=\ -x\u3001--extract \u6307\u5B9A\u306E(\u307E\u305F\u306F\u3059\u3079\u3066\u306E)\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u62BD\u51FA\u3057\u307E\u3059 main.help.opt.main.describe-module=\ -d, --describe-module \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u307E\u305F\u306F\u81EA\u52D5\u30E2\u30B8\u30E5\u30FC\u30EB\u540D\u3092\u51FA\u529B\u3057\u307E\u3059 +main.help.opt.main.validate=\ --validate jar\u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u5185\u5BB9\u3092\u691C\u8A3C\u3057\u307E\u3059\u3002\u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\n \u8907\u6570\u30EA\u30EA\u30FC\u30B9\u306Ejar\u30A2\u30FC\u30AB\u30A4\u30D6\u3067\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u305FAPI\u304C\n \u3059\u3079\u3066\u306E\u7570\u306A\u308B\u30EA\u30EA\u30FC\u30B9\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u4E00\u8CAB\u3057\u3066\u3044\u308B\u3053\u3068\u3092\n \u691C\u8A3C\u3057\u307E\u3059\u3002 main.help.opt.any=\ \u3069\u306E\u30E2\u30FC\u30C9\u3067\u3082\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n\n -C DIR \u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u5909\u66F4\u3057\u3001\u6B21\u306E\u30D5\u30A1\u30A4\u30EB\u3092\n \u53D6\u308A\u8FBC\u307F\u307E\u3059 main.help.opt.any.file=\ -f\u3001--file=FILE \u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3002\u7701\u7565\u3057\u305F\u5834\u5408\u3001stdin\u307E\u305F\u306F\n stdout\u306E\u3044\u305A\u308C\u304B\u304C\u64CD\u4F5C\u306B\u57FA\u3065\u3044\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\n --release VERSION \u6B21\u306E\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092jar\u306E\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n (\u3064\u307E\u308A\u3001META-INF/versions/VERSION/)\u306B\u914D\u7F6E\u3057\u307E\u3059 main.help.opt.any.verbose=\ -v\u3001--verbose \u6A19\u6E96\u51FA\u529B\u306B\u8A73\u7D30\u306A\u51FA\u529B\u3092\u751F\u6210\u3057\u307E\u3059 @@ -119,6 +122,7 @@ main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved \u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u89E3\u6C7A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u8B66\u544A\u3092\u767A\u884C\u3059\u308B\n \u30C4\u30FC\u30EB\u306E\u30D2\u30F3\u30C8\u3002\u975E\u63A8\u5968\u3001\u524A\u9664\u4E88\u5B9A\u306E\u975E\u63A8\u5968\u307E\u305F\u306F\n \u5B9F\u9A13\u7684\u306E\u3044\u305A\u308C\u304B main.help.opt.create.update.index=\ \u4F5C\u6210\u3001\u66F4\u65B0\u304A\u3088\u3073\u7D22\u5F15\u751F\u6210\u30E2\u30FC\u30C9\u3067\u306E\u307F\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress \u683C\u7D0D\u306E\u307F\u3002ZIP\u5727\u7E2E\u3092\u4F7F\u7528\u3057\u307E\u305B\u3093 +main.help.opt.create.update.index.date=\ --date=TIMESTAMP \u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30BF\u30A4\u30E0\u30BE\u30FC\u30F3\u5F62\u5F0F\u3092\u6307\u5B9A\u3057\u305FISO-8601\u62E1\u5F35\u30AA\u30D5\u30BB\u30C3\u30C8\n \u306E\u65E5\u6642\u306E\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u3002\u30A8\u30F3\u30C8\u30EA\u306E\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u306E\u4F7F\u7528\u4F8B\u306F\u3001\n "2022-02-12T12:30:00-05:00"\u3067\u3059 main.help.opt.other=\ \u305D\u306E\u4ED6\u306E\u30AA\u30D7\u30B7\u30E7\u30F3:\n main.help.opt.other.help=\ -?\u3001-h\u3001--help[:compat] \u3053\u308C(\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u4E92\u63DB\u6027)\u3092help\u306B\u6307\u5B9A\u3057\u307E\u3059 main.help.opt.other.help-extra=\ --help-extra \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u63D0\u4F9B\u3057\u307E\u3059 diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties index 36889f522cb1ba079045b03131c7aae0a6497587..5a4832d0bd46b307f8dc4e452b15ea64e2292827 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties +++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,7 @@ error.illegal.option=\u975E\u6CD5\u9009\u9879: {0} error.unrecognized.option=\u65E0\u6CD5\u8BC6\u522B\u7684\u9009\u9879: {0} error.missing.arg=\u9009\u9879{0}\u9700\u8981\u53C2\u6570 error.bad.file.arg=\u89E3\u6790\u6587\u4EF6\u53C2\u6570\u65F6\u51FA\u9519 -error.bad.option=\u5FC5\u987B\u6307\u5B9A {ctxuid} \u4E2D\u7684\u4EFB\u4E00\u9009\u9879\u3002 +error.bad.option=\u5FC5\u987B\u6307\u5B9A -{ctxuid} \u6216 --validate \u9009\u9879\u4E4B\u4E00\u3002 error.bad.cflag='c' \u6807\u8BB0\u8981\u6C42\u6307\u5B9A\u6E05\u5355\u6216\u8F93\u5165\u6587\u4EF6! error.bad.uflag='u' \u6807\u8BB0\u8981\u6C42\u6307\u5B9A\u6E05\u5355, 'e' \u6807\u8BB0\u6216\u8F93\u5165\u6587\u4EF6! error.bad.eflag=\u4E0D\u80FD\u540C\u65F6\u6307\u5B9A 'e' \u6807\u8BB0\u548C\u5177\u6709 'Main-Class' \u5C5E\u6027\u7684\n\u6E05\u5355! @@ -52,6 +52,8 @@ error.missing.provider=\u672A\u627E\u5230\u670D\u52A1\u63D0\u4F9B\u65B9: {0} error.release.value.notnumber=\u53D1\u884C\u7248 {0} \u65E0\u6548 error.release.value.toosmall=\u53D1\u884C\u7248 {0} \u65E0\u6548, \u5FC5\u987B >= 9 error.release.unexpected.versioned.entry=\u53D1\u884C\u7248 {1} \u5B58\u5728\u610F\u5916\u7684\u7248\u672C\u5316\u6761\u76EE {0} +error.date.notvalid=\u65E5\u671F {0} \u4E0D\u662F\u5177\u6709\u53EF\u9009\u65F6\u533A\u7684\u6709\u6548 ISO-8601 \u6269\u5C55\u504F\u79FB\u65E5\u671F\u65F6\u95F4 +error.date.out.of.range=\u65E5\u671F {0} \u4E0D\u5728 1980-01-01T00:00:02Z \u5230 2099-12-31T23:59:59Z \u8FD9\u4E00\u6709\u6548\u8303\u56F4\u5185 error.validator.jarfile.exception=\u65E0\u6CD5\u9A8C\u8BC1 {0}: {1} error.validator.jarfile.invalid=\u5220\u9664\u7684\u591A\u53D1\u884C\u7248 jar \u6587\u4EF6 {0} \u65E0\u6548 error.validator.bad.entry.name=\u6761\u76EE\u540D\u79F0\u683C\u5F0F\u9519\u8BEF, {0} @@ -103,6 +105,7 @@ main.help.opt.main.list=\ -t, --list \u5217\u51FA\u6863\u6848\u main.help.opt.main.update=\ -u, --update \u66F4\u65B0\u73B0\u6709 jar \u6863\u6848 main.help.opt.main.extract=\ -x, --extract \u4ECE\u6863\u6848\u4E2D\u63D0\u53D6\u6307\u5B9A\u7684 (\u6216\u5168\u90E8) \u6587\u4EF6 main.help.opt.main.describe-module=\ -d, --describe-module \u8F93\u51FA\u6A21\u5757\u63CF\u8FF0\u7B26\u6216\u81EA\u52A8\u6A21\u5757\u540D\u79F0 +main.help.opt.main.validate=\ --validate \u9A8C\u8BC1 jar \u6863\u6848\u7684\u5185\u5BB9\u3002\u6B64\u9009\u9879\n \u5C06\u9A8C\u8BC1\u7531\u591A\u53D1\u884C\u7248 jar \u6863\u6848\u5BFC\u51FA\n \u7684 API \u5728\u6240\u6709\u4E0D\u540C\u7684\u53D1\u884C\u7248\u672C\u4E2D\n \u662F\u5426\u4E00\u81F4\u3002 main.help.opt.any=\ \u5728\u4EFB\u610F\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n\n -C DIR \u66F4\u6539\u4E3A\u6307\u5B9A\u7684\u76EE\u5F55\u5E76\u5305\u542B\n \u4EE5\u4E0B\u6587\u4EF6 main.help.opt.any.file=\ -f, --file=FILE \u6863\u6848\u6587\u4EF6\u540D\u3002\u7701\u7565\u65F6, \u57FA\u4E8E\u64CD\u4F5C\n \u4F7F\u7528 stdin \u6216 stdout\n --release VERSION \u5C06\u4E0B\u9762\u7684\u6240\u6709\u6587\u4EF6\u90FD\u653E\u5728\n jar \u7684\u7248\u672C\u5316\u76EE\u5F55\u4E2D (\u5373 META-INF/versions/VERSION/) main.help.opt.any.verbose=\ -v, --verbose \u5728\u6807\u51C6\u8F93\u51FA\u4E2D\u751F\u6210\u8BE6\u7EC6\u8F93\u51FA @@ -119,6 +122,7 @@ main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved \u63D0\u793A\u5DE5\u5177\u5728\u89E3\u6790\u6A21\u5757\u540E\u53D1\u51FA\u8B66\u544A\u3002\n \u53EF\u4EE5\u4E3A deprecated, deprecated-for-removal\n \u6216 incubating \u4E4B\u4E00 main.help.opt.create.update.index=\ \u53EA\u5728\u521B\u5EFA, \u66F4\u65B0\u548C\u751F\u6210\u7D22\u5F15\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress \u4EC5\u5B58\u50A8; \u4E0D\u4F7F\u7528 ZIP \u538B\u7F29 +main.help.opt.create.update.index.date=\ --date=TIMESTAMP \u5177\u6709\u53EF\u9009\u65F6\u533A\u7684 ISO-8601 \u6269\u5C55\u504F\u79FB\n \u65E5\u671F\u65F6\u95F4\u683C\u5F0F\u7684\u65F6\u95F4\u6233\uFF08\u7528\u4E8E\u6761\u76EE\u7684\u65F6\u95F4\u6233\uFF09\uFF0C\n \u4F8B\u5982\uFF0C"2022-02-12T12:30:00-05:00" main.help.opt.other=\ \u5176\u4ED6\u9009\u9879:\n main.help.opt.other.help=\ -?, -h, --help[:compat] \u63D0\u4F9B\u6B64\u5E2E\u52A9\uFF0C\u4E5F\u53EF\u4EE5\u9009\u62E9\u6027\u5730\u63D0\u4F9B\u517C\u5BB9\u6027\u5E2E\u52A9 main.help.opt.other.help-extra=\ --help-extra \u63D0\u4F9B\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9 diff --git a/src/jdk.jartool/share/man/jarsigner.1 b/src/jdk.jartool/share/man/jarsigner.1 index bcf457fb6f65603e70b40af8bc5150667766e584..9cf2df33b22b23aba16f78b0b242376e2c17b846 100644 --- a/src/jdk.jartool/share/man/jarsigner.1 +++ b/src/jdk.jartool/share/man/jarsigner.1 @@ -766,7 +766,7 @@ The file can be a sequence of concatenated X.509 certificates, or a single PKCS#7 formatted data block, either in binary encoding format or in printable encoding format (also known as Base64 encoding) as defined by \f[B]Internet RFC 1421 Certificate Encoding Standard\f[R] -[http://tools.ietf.org/html/rfc1421]. +[https://tools.ietf.org/html/rfc1421]. .RS .RE .TP diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java index 944709742471ca183d7f45e748f33082edc06ff6..17bda3896e025edaecc5f61ab86b10480a79209e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,9 +26,9 @@ package jdk.javadoc.internal.api; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Locale; +import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import javax.tools.DocumentationTool.DocumentationTask; @@ -43,11 +43,6 @@ import jdk.javadoc.internal.tool.Start; /** * Provides access to functionality specific to the JDK documentation tool, * javadoc. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own - * risk. This code and its internal interfaces are subject to change - * or deletion without notice.

    */ public class JavadocTaskImpl implements DocumentationTask { private final AtomicBoolean used = new AtomicBoolean(); @@ -67,9 +62,9 @@ public class JavadocTaskImpl implements DocumentationTask { this.context = context; this.docletClass = docletClass; - this.options = (options == null) ? Collections.emptySet() + this.options = (options == null) ? Set.of() : nullCheck(options); - this.fileObjects = (fileObjects == null) ? Collections.emptySet() + this.fileObjects = (fileObjects == null) ? Set.of() : nullCheck(fileObjects); setLocale(Locale.getDefault()); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTool.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTool.java index 3dfd26383d0f4a92e5ddff67a0b700a5b2373464..005ce74a1c28d1b93af8aaef5ab91494a47dd56e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTool.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -55,11 +55,6 @@ import jdk.javadoc.internal.tool.ToolOptions; /** * Provides access to functionality specific to the JDK documentation tool, * javadoc. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own - * risk. This code and its internal interfaces are subject to change - * or deletion without notice.

    */ public class JavadocTool implements DocumentationTool { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/package-info.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/package-info.java index af2913835499163a2ec38f17317ff18070feb96b..3f8437bbfc6b1654fe5ce0dbf71ae5d7e279aa35 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/package-info.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * 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,10 +27,5 @@ * This package provides the javadoc implementation of relevant * public API defined in {@link javax.tools}, which provides an * API alternative to invoking javadoc via the command line. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ package jdk.javadoc.internal.api; diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java index 39c15a8231338ed947b7bafb5ebb5583e7c52bad..19d81d4e310ee496ebb4685d29700e75912ad274 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,11 +54,6 @@ import static jdk.javadoc.internal.doclets.formats.html.HtmlLinkInfo.Kind.THROWS /** * Print method and constructor info. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWriter { @@ -100,52 +95,37 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite member, content, null, false); } - /** - * Add the summary link for the member. - * - * @param context the id of the context where the link will be printed - * @param te the type element being linked to - * @param member the member being linked to - * @param tdSummary the content tree to which the link will be added - */ @Override protected void addSummaryLink(HtmlLinkInfo.Kind context, TypeElement te, Element member, - Content tdSummary) { + Content target) { ExecutableElement ee = (ExecutableElement)member; Content memberLink = writer.getDocLink(context, te, ee, name(ee), HtmlStyle.memberNameLink); - Content code = HtmlTree.CODE(memberLink); + var code = HtmlTree.CODE(memberLink); addParameters(ee, code); - tdSummary.add(code); + target.add(code); } - /** - * Add the inherited summary link for the member. - * - * @param te the type element that we should link to - * @param member the member being linked to - * @param linksTree the content tree to which the link will be added - */ @Override - protected void addInheritedSummaryLink(TypeElement te, Element member, Content linksTree) { - linksTree.add(writer.getDocLink(MEMBER, te, member, name(member))); + protected void addInheritedSummaryLink(TypeElement te, Element member, Content target) { + target.add(writer.getDocLink(MEMBER, te, member, name(member))); } /** * Add the parameter for the executable member. * - * @param param the parameter that needs to be written. + * @param param the parameter that needs to be added. * @param paramType the type of the parameter. * @param isVarArg true if this is a link to var arg. - * @param tree the content tree to which the parameter information will be added. + * @param target the content to which the parameter information will be added. */ protected void addParam(VariableElement param, TypeMirror paramType, boolean isVarArg, - Content tree) { + Content target) { Content link = writer.getLink(new HtmlLinkInfo(configuration, EXECUTABLE_MEMBER_PARAM, paramType).varargs(isVarArg)); - tree.add(link); + target.add(link); if(name(param).length() > 0) { - tree.add(Entity.NO_BREAK_SPACE); - tree.add(name(param)); + target.add(Entity.NO_BREAK_SPACE); + target.add(name(param)); } } @@ -156,18 +136,18 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite * * @param member the member to write receiver annotations for. * @param rcvrType the receiver type. - * @param tree the content tree to which the information will be added. + * @param target the content to which the information will be added. */ - protected void addReceiver(ExecutableElement member, TypeMirror rcvrType, Content tree) { + protected void addReceiver(ExecutableElement member, TypeMirror rcvrType, Content target) { var info = new HtmlLinkInfo(configuration, RECEIVER_TYPE, rcvrType); info.linkToSelf = false; - tree.add(writer.getLink(info)); - tree.add(Entity.NO_BREAK_SPACE); + target.add(writer.getLink(info)); + target.add(Entity.NO_BREAK_SPACE); if (member.getKind() == ElementKind.CONSTRUCTOR) { - tree.add(utils.getTypeName(rcvrType, false)); - tree.add("."); + target.add(utils.getTypeName(rcvrType, false)); + target.add("."); } - tree.add("this"); + target.add("this"); } /** @@ -205,15 +185,15 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite * Add all the parameters for the executable member. * * @param member the member to write parameters for. - * @param htmltree the content tree to which the parameters information will be added. + * @param target the content to which the parameters information will be added. */ - protected void addParameters(ExecutableElement member, Content htmltree) { - Content paramTree = getParameters(member, false); - if (paramTree.charCount() > 2) { + protected void addParameters(ExecutableElement member, Content target) { + Content params = getParameters(member, false); + if (params.charCount() > 2) { // only add for non-empty parameters - htmltree.add(new HtmlTree(TagName.WBR)); + target.add(new HtmlTree(TagName.WBR)); } - htmltree.add(paramTree); + target.add(params); } /** @@ -221,22 +201,22 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite * * @param member the member to write parameters for. * @param includeAnnotations true if annotation information needs to be added. - * @return the content tree containing the parameter information + * @return the parameter information */ protected Content getParameters(ExecutableElement member, boolean includeAnnotations) { - Content paramTree = new ContentBuilder(); - paramTree.add("("); + Content result = new ContentBuilder(); + result.add("("); String sep = ""; List parameters = member.getParameters(); TypeMirror rcvrType = member.getReceiverType(); if (includeAnnotations && rcvrType != null && isAnnotatedReceiver(rcvrType)) { - addReceiver(member, rcvrType, paramTree); + addReceiver(member, rcvrType, result); sep = "," + DocletConstants.NL + " "; } int paramstart; ExecutableType instMeth = utils.asInstantiatedMethodType(typeElement, member); for (paramstart = 0; paramstart < parameters.size(); paramstart++) { - paramTree.add(sep); + result.add(sep); VariableElement param = parameters.get(paramstart); TypeMirror paramType = instMeth.getParameterTypes().get(paramstart); @@ -244,56 +224,56 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite if (includeAnnotations) { Content annotationInfo = writer.getAnnotationInfo(param, false); if (!annotationInfo.isEmpty()) { - paramTree.add(annotationInfo) + result.add(annotationInfo) .add(DocletConstants.NL) .add(" "); } } addParam(param, paramType, - (paramstart == parameters.size() - 1) && member.isVarArgs(), paramTree); + (paramstart == parameters.size() - 1) && member.isVarArgs(), result); break; } } for (int i = paramstart + 1; i < parameters.size(); i++) { - paramTree.add(","); - paramTree.add(DocletConstants.NL); - paramTree.add(" "); + result.add(","); + result.add(DocletConstants.NL); + result.add(" "); if (includeAnnotations) { Content annotationInfo = writer.getAnnotationInfo(parameters.get(i), false); if (!annotationInfo.isEmpty()) { - paramTree.add(annotationInfo) + result.add(annotationInfo) .add(DocletConstants.NL) .add(" "); } } addParam(parameters.get(i), instMeth.getParameterTypes().get(i), (i == parameters.size() - 1) && member.isVarArgs(), - paramTree); + result); } - paramTree.add(")"); - return paramTree; + result.add(")"); + return result; } /** - * Get a content tree containing the exception information for the executable member. + * Get the exception information for the executable member. * - * @param member the member to write exceptions for. - * @return the content tree containing the exceptions information. + * @param member the member to get the exception information for + * @return the exception information */ protected Content getExceptions(ExecutableElement member) { List exceptions = utils.asInstantiatedMethodType(typeElement, member).getThrownTypes(); - Content htmlTree = new ContentBuilder(); + Content result = new ContentBuilder(); for (TypeMirror t : exceptions) { - if (!htmlTree.isEmpty()) { - htmlTree.add(","); - htmlTree.add(DocletConstants.NL); + if (!result.isEmpty()) { + result.add(","); + result.add(DocletConstants.NL); } Content link = writer.getLink(new HtmlLinkInfo(configuration, THROWS_TYPE, t)); - htmlTree.add(link); + result.add(link); } - return htmlTree; + return result; } protected TypeElement implementsMethodInIntfac(ExecutableElement method, diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java index f717cdf2cf4bb276e957dfdcf7e5c420e728af4a..5e86670aa6afb27f1120dbb7358d82ef640a7866 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,11 +51,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.Utils; /** * The base class for member writers. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public abstract class AbstractMemberWriter implements MemberSummaryWriter, MemberWriter { @@ -91,9 +86,9 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter, Membe /** * Adds the summary label for the member. * - * @param memberTree the content tree to which the label will be added + * @param content the content to which the label will be added */ - public abstract void addSummaryLabel(Content memberTree); + public abstract void addSummaryLabel(Content content); /** * Returns the summary table header for the member. @@ -126,28 +121,28 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter, Membe /** * Adds inherited summary label for the member. * - * @param typeElement the type element to which to link to - * @param inheritedTree the content tree to which the inherited summary label will be added + * @param typeElement the type element to which to link to + * @param content the content to which the inherited summary label will be added */ - public abstract void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree); + public abstract void addInheritedSummaryLabel(TypeElement typeElement, Content content); /** * Adds the summary type for the member. * - * @param member the member to be documented - * @param tdSummaryType the content tree to which the type will be added + * @param member the member to be documented + * @param content the content to which the type will be added */ - protected abstract void addSummaryType(Element member, Content tdSummaryType); + protected abstract void addSummaryType(Element member, Content content); /** * Adds the summary link for the member. * * @param typeElement the type element to be documented * @param member the member to be documented - * @param tdSummary the content tree to which the link will be added + * @param content the content to which the link will be added */ - protected void addSummaryLink(TypeElement typeElement, Element member, Content tdSummary) { - addSummaryLink(HtmlLinkInfo.Kind.MEMBER, typeElement, member, tdSummary); + protected void addSummaryLink(TypeElement typeElement, Element member, Content content) { + addSummaryLink(HtmlLinkInfo.Kind.MEMBER, typeElement, member, content); } /** @@ -156,41 +151,41 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter, Membe * @param context the id of the context where the link will be printed * @param typeElement the type element to be documented * @param member the member to be documented - * @param tdSummary the content tree to which the summary link will be added + * @param content the content to which the summary link will be added */ protected abstract void addSummaryLink(HtmlLinkInfo.Kind context, - TypeElement typeElement, Element member, Content tdSummary); + TypeElement typeElement, Element member, Content content); /** * Adds the inherited summary link for the member. * * @param typeElement the type element to be documented * @param member the member to be documented - * @param linksTree the content tree to which the inherited summary link will be added + * @param target the content to which the inherited summary link will be added */ protected abstract void addInheritedSummaryLink(TypeElement typeElement, - Element member, Content linksTree); + Element member, Content target); /** * Returns a link for summary (deprecated, preview) pages. * * @param member the member being linked to * - * @return a content tree representing the link + * @return the link */ protected abstract Content getSummaryLink(Element member); /** - * Adds the modifier and type for the member in the member summary. + * Adds the modifiers and type for the member in the member summary. * - * @param member the member to add the type for - * @param type the type to add - * @param tdSummaryType the content tree to which the modified and type will be added + * @param member the member to add the modifiers and type for + * @param type the type to add + * @param target the content to which the modifiers and type will be added */ - protected void addModifierAndType(Element member, TypeMirror type, - Content tdSummaryType) { - HtmlTree code = new HtmlTree(TagName.CODE); - addModifier(member, code); + protected void addModifiersAndType(Element member, TypeMirror type, + Content target) { + var code = new HtmlTree(TagName.CODE); + addModifiers(member, code); if (type == null) { code.add(switch (member.getKind()) { case ENUM -> "enum"; @@ -219,64 +214,63 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter, Membe writer.getLink(new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.SUMMARY_RETURN_TYPE, type))); } - tdSummaryType.add(code); + target.add(code); } /** - * Adds the modifier for the member. + * Adds the modifiers for the member. * - * @param member the member to add the type for - * @param code the content tree to which the modifier will be added + * @param member the member to add the modifiers for + * @param target the content to which the modifiers will be added */ - private void addModifier(Element member, Content code) { + private void addModifiers(Element member, Content target) { if (utils.isProtected(member)) { - code.add("protected "); + target.add("protected "); } else if (utils.isPrivate(member)) { - code.add("private "); + target.add("private "); } else if (!utils.isPublic(member)) { // Package private - code.add(resources.getText("doclet.Package_private")); - code.add(" "); + target.add(resources.getText("doclet.Package_private")); + target.add(" "); } - boolean isAnnotatedTypeElement = utils.isAnnotationType(member.getEnclosingElement()); - if (!isAnnotatedTypeElement && utils.isMethod(member)) { - if (!utils.isInterface(member.getEnclosingElement()) && utils.isAbstract(member)) { - code.add("abstract "); + if (!utils.isAnnotationInterface(member.getEnclosingElement()) && utils.isMethod(member)) { + if (!utils.isPlainInterface(member.getEnclosingElement()) && utils.isAbstract(member)) { + target.add("abstract "); } if (utils.isDefault(member)) { - code.add("default "); + target.add("default "); } } if (utils.isStatic(member)) { - code.add("static "); + target.add("static "); } if (!utils.isEnum(member) && utils.isFinal(member)) { - code.add("final "); + target.add("final "); } } /** * Adds the deprecated information for the given member. * - * @param member the member being documented. - * @param contentTree the content tree to which the deprecated information will be added. + * @param member the member being documented. + * @param target the content to which the deprecated information will be added. */ - protected void addDeprecatedInfo(Element member, Content contentTree) { + protected void addDeprecatedInfo(Element member, Content target) { Content output = (new DeprecatedTaglet()).getAllBlockTagOutput(member, writer.getTagletWriterInstance(false)); if (!output.isEmpty()) { - contentTree.add(HtmlTree.DIV(HtmlStyle.deprecationBlock, output)); + target.add(HtmlTree.DIV(HtmlStyle.deprecationBlock, output)); } } /** * Adds the comment for the given member. * - * @param member the member being documented. - * @param htmlTree the content tree to which the comment will be added. + * @param member the member being documented. + * @param content the content to which the comment will be added. */ - protected void addComment(Element member, Content htmlTree) { + protected void addComment(Element member, Content content) { if (!utils.getFullBody(member).isEmpty()) { - writer.addInlineComment(member, htmlTree); + writer.addInlineComment(member, content); } } @@ -284,10 +278,10 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter, Membe * Add the preview information for the given member. * * @param member the member being documented. - * @param contentTree the content tree to which the preview information will be added. + * @param content the content to which the preview information will be added. */ - protected void addPreviewInfo(Element member, Content contentTree) { - writer.addPreviewInfo(member, contentTree); + protected void addPreviewInfo(Element member, Content content) { + writer.addPreviewInfo(member, content); } protected String name(Element member) { @@ -295,13 +289,13 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter, Membe } /** - * Adds use information to the documentation tree. + * Adds use information to the documentation. * - * @param members list of program elements for which the use information will be added - * @param heading the section heading - * @param contentTree the content tree to which the use information will be added + * @param members list of program elements for which the use information will be added + * @param heading the section heading + * @param content the content to which the use information will be added */ - protected void addUseInfo(List members, Content heading, Content contentTree) { + protected void addUseInfo(List members, Content heading, Content content) { if (members == null || members.isEmpty()) { return; } @@ -322,15 +316,13 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter, Membe Content typeContent = new ContentBuilder(); if (te != null && !utils.isConstructor(element) - && !utils.isClass(element) - && !utils.isInterface(element) - && !utils.isAnnotationType(element)) { - HtmlTree name = new HtmlTree(TagName.SPAN); + && !utils.isTypeElement(element)) { + var name = new HtmlTree(TagName.SPAN); name.setStyle(HtmlStyle.typeNameLabel); name.add(name(te) + "."); typeContent.add(name); } - addSummaryLink(utils.isClass(element) || utils.isInterface(element) + addSummaryLink(utils.isClass(element) || utils.isPlainInterface(element) ? HtmlLinkInfo.Kind.CLASS_USE : HtmlLinkInfo.Kind.MEMBER, te, element, typeContent); @@ -338,7 +330,7 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter, Membe writer.addSummaryLinkComment(element, desc); useTable.addRow(summaryType, typeContent, desc); } - contentTree.add(useTable); + content.add(useTable); } protected void serialWarning(Element e, String key, String a1, String a2) { @@ -371,24 +363,24 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter, Membe @Override public void addInheritedMemberSummary(TypeElement tElement, Element nestedClass, boolean isFirst, boolean isLast, - Content linksTree) { - writer.addInheritedMemberSummary(this, tElement, nestedClass, isFirst, linksTree); + Content content) { + writer.addInheritedMemberSummary(this, tElement, nestedClass, isFirst, content); } @Override public Content getInheritedSummaryHeader(TypeElement tElement) { - Content inheritedTree = writer.getMemberInheritedTree(); - writer.addInheritedSummaryHeader(this, tElement, inheritedTree); - return inheritedTree; + Content c = writer.getMemberInherited(); + writer.addInheritedSummaryHeader(this, tElement, c); + return c; } @Override - public Content getInheritedSummaryLinksTree() { + public Content getInheritedSummaryLinks() { return new HtmlTree(TagName.CODE); } @Override - public Content getSummaryTableTree(TypeElement tElement) { + public Content getSummaryTable(TypeElement tElement) { if (tElement != typeElement) { throw new IllegalStateException(); } @@ -400,8 +392,8 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter, Membe } @Override - public Content getMemberTree(Content memberTree) { - return writer.getMemberTree(memberTree); + public Content getMember(Content memberContent) { + return writer.getMember(memberContent); } @Override @@ -410,8 +402,8 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter, Membe } @Override - public Content getMemberListItem(Content memberTree) { - return writer.getMemberListItem(memberTree); + public Content getMemberListItem(Content memberContent) { + return writer.getMemberListItem(memberContent); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractOverviewIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractOverviewIndexWriter.java index 40100d6fd278846308f6d52e5ec91ec9318c2a60..211ba7b1fb7f728acd8a4a631bdf8c335dcae18b 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractOverviewIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractOverviewIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. * 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,12 +37,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPath; /** * Abstract class to generate the overview files. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - * */ public abstract class AbstractOverviewIndexWriter extends HtmlDocletWriter { @@ -62,35 +56,34 @@ public abstract class AbstractOverviewIndexWriter extends HtmlDocletWriter { * summary at the top of the page and generate a link to the description, * which is added at the end of this page. * - * @param main the documentation tree to which the overview header will be added + * @param target the content to which the overview header will be added */ - protected void addOverviewHeader(Content main) { - addConfigurationTitle(main); - addOverviewComment(main); - addOverviewTags(main); + protected void addOverviewHeader(Content target) { + addConfigurationTitle(target); + addOverviewComment(target); + addOverviewTags(target); } /** * Adds the overview comment as provided in the file specified by the * "-overview" option on the command line. * - * @param htmltree the documentation tree to which the overview comment will - * be added + * @param content the content to which the overview comment will be added */ - protected void addOverviewComment(Content htmltree) { + protected void addOverviewComment(Content content) { if (!utils.getFullBody(configuration.overviewElement).isEmpty()) { - addInlineComment(configuration.overviewElement, htmltree); + addInlineComment(configuration.overviewElement, content); } } /** * Adds the block tags provided in the file specified by the "-overview" option. * - * @param htmlTree the content tree to which the tags will be added + * @param content the content to which the tags will be added */ - protected void addOverviewTags(Content htmlTree) { + protected void addOverviewTags(Content content) { if (!utils.getFullBody(configuration.overviewElement).isEmpty()) { - addTagsInfo(configuration.overviewElement, htmlTree); + addTagsInfo(configuration.overviewElement, content); } } @@ -118,25 +111,25 @@ public abstract class AbstractOverviewIndexWriter extends HtmlDocletWriter { } /** - * Adds the index to the documentation tree. + * Adds the index to the documentation. * - * @param main the document tree to which the packages/modules list will be added + * @param target the content to which the packages/modules list will be added */ - protected abstract void addIndex(Content main); + protected abstract void addIndex(Content target); /** - * Adds the doctitle to the documentation tree, if it is specified on the command line. + * Adds the doctitle to the documentation, if it is specified on the command line. * - * @param body the document tree to which the title will be added + * @param target the content to which the title will be added */ - protected void addConfigurationTitle(Content body) { + protected void addConfigurationTitle(Content target) { String doctitle = configuration.getOptions().docTitle(); if (!doctitle.isEmpty()) { - Content title = new RawHtml(doctitle); - Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, + var title = new RawHtml(doctitle); + var heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, title); - Content div = HtmlTree.DIV(HtmlStyle.header, heading); - body.add(div); + var div = HtmlTree.DIV(HtmlStyle.header, heading); + target.add(div); } } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java index 96ee6251a4e1e63b02b2db01de69b1675ed21f94..26995d031f2d720c9806e647e9d23bc0a36bf6d1 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,11 +42,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPath; * is sub-classed by {@link PackageTreeWriter} and {@link TreeWriter} to * generate the Package Tree and global Tree(for all the classes and packages) * pages. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public abstract class AbstractTreeWriter extends HtmlDocletWriter { @@ -77,14 +72,14 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter { * @param parent the superclass or superinterface of the sset * @param collection a collection of the sub-classes at this level * @param isEnum true if we are generating a tree for enums - * @param contentTree the content tree to which the level information will be added + * @param content the content to which the level information will be added */ protected void addLevelInfo(TypeElement parent, Collection collection, - boolean isEnum, Content contentTree) { + boolean isEnum, Content content) { if (!collection.isEmpty()) { - Content ul = new HtmlTree(TagName.UL); + var ul = new HtmlTree(TagName.UL); for (TypeElement local : collection) { - HtmlTree li = new HtmlTree(TagName.LI); + var li = new HtmlTree(TagName.LI); li.setStyle(HtmlStyle.circle); addPartialInfo(local, li); addExtendsImplements(parent, local, li); @@ -92,7 +87,7 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter { isEnum, li); // Recurse ul.add(li); } - contentTree.add(ul); + content.add(ul); } } @@ -103,7 +98,7 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter { * @param sset classes which are at the most base level, all the * other classes in this run will derive from these classes * @param heading heading for the tree - * @param content the content tree to which the tree will be added + * @param content the content to which the tree will be added */ protected void addTree(SortedSet sset, String heading, Content content) { addTree(sset, heading, content, false); @@ -114,12 +109,12 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter { if (!sset.isEmpty()) { TypeElement firstTypeElement = sset.first(); Content headingContent = contents.getContent(heading); - Content sectionHeading = HtmlTree.HEADING_TITLE(Headings.CONTENT_HEADING, + var sectionHeading = HtmlTree.HEADING_TITLE(Headings.CONTENT_HEADING, headingContent); - HtmlTree htmlTree = HtmlTree.SECTION(HtmlStyle.hierarchy, sectionHeading); - addLevelInfo(!utils.isInterface(firstTypeElement) ? firstTypeElement : null, - sset, isEnums, htmlTree); - content.add(htmlTree); + var section = HtmlTree.SECTION(HtmlStyle.hierarchy, sectionHeading); + addLevelInfo(!utils.isPlainInterface(firstTypeElement) ? firstTypeElement : null, + sset, isEnums, section); + content.add(section); } } @@ -129,37 +124,37 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter { * * @param parent the parent class of the class being documented * @param typeElement the TypeElement under consideration - * @param contentTree the content tree to which the information will be added + * @param content the content to which the information will be added */ protected void addExtendsImplements(TypeElement parent, TypeElement typeElement, - Content contentTree) + Content content) { SortedSet interfaces = new TreeSet<>(comparators.makeGeneralPurposeComparator()); typeElement.getInterfaces().forEach(t -> interfaces.add(utils.asTypeElement(t))); - if (interfaces.size() > (utils.isInterface(typeElement) ? 1 : 0)) { + if (interfaces.size() > (utils.isPlainInterface(typeElement) ? 1 : 0)) { boolean isFirst = true; for (TypeElement intf : interfaces) { if (parent != intf) { if (utils.isPublic(intf) || utils.isLinkable(intf)) { if (isFirst) { isFirst = false; - if (utils.isInterface(typeElement)) { - contentTree.add(" ("); - contentTree.add(contents.also); - contentTree.add(" extends "); + if (utils.isPlainInterface(typeElement)) { + content.add(" ("); + content.add(contents.also); + content.add(" extends "); } else { - contentTree.add(" (implements "); + content.add(" (implements "); } } else { - contentTree.add(", "); + content.add(", "); } - addPreQualifiedClassLink(HtmlLinkInfo.Kind.TREE, intf, contentTree); + addPreQualifiedClassLink(HtmlLinkInfo.Kind.TREE, intf, content); } } } if (!isFirst) { - contentTree.add(")"); + content.add(")"); } } } @@ -168,9 +163,9 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter { * Add information about the class kind, if it's a "class" or "interface". * * @param typeElement the class being documented - * @param contentTree the content tree to which the information will be added + * @param content the content to which the information will be added */ - protected void addPartialInfo(TypeElement typeElement, Content contentTree) { - addPreQualifiedStrongClassLink(HtmlLinkInfo.Kind.TREE, typeElement, contentTree); + protected void addPartialInfo(TypeElement typeElement, Content content) { + addPreQualifiedStrongClassLink(HtmlLinkInfo.Kind.TREE, typeElement, content); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java index a2d4f51e45eb7d63379178ca24db77553fde7bfe..79c01e1a8716eeae33b332438a5586bab2083e88 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -97,31 +97,31 @@ public class AllClassesIndexWriter extends HtmlDocletWriter { addContents(allClassesContent); Content mainContent = new ContentBuilder(); mainContent.add(allClassesContent); - HtmlTree bodyTree = getBody(getWindowTitle(label)); - bodyTree.add(new BodyContents() + HtmlTree body = getBody(getWindowTitle(label)); + body.add(new BodyContents() .setHeader(getHeader(PageMode.ALL_CLASSES)) .addMainContent(mainContent) .setFooter(getFooter())); - printHtmlDocument(null, "class index", bodyTree); + printHtmlDocument(null, "class index", body); } /** - * Add all types to the content tree. + * Add all types to the content. * - * @param content HtmlTree content to which the links will be added + * @param target the content to which the links will be added */ - protected void addContents(Content content) { + protected void addContents(Content target) { Table table = new Table(HtmlStyle.summaryTable) .setHeader(new TableHeader(contents.classLabel, contents.descriptionLabel)) .setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast) .setId(HtmlIds.ALL_CLASSES_TABLE) .setDefaultTab(contents.allClassesAndInterfacesLabel) - .addTab(contents.interfaces, utils::isInterface) - .addTab(contents.classes, e -> utils.isOrdinaryClass((TypeElement)e)) + .addTab(contents.interfaces, utils::isPlainInterface) + .addTab(contents.classes, e -> utils.isNonThrowableClass((TypeElement)e)) .addTab(contents.enums, utils::isEnum) .addTab(contents.records, e -> utils.isRecord((TypeElement)e)) .addTab(contents.exceptionClasses, e -> utils.isThrowable((TypeElement)e)) - .addTab(contents.annotationTypes, utils::isAnnotationType); + .addTab(contents.annotationTypes, utils::isAnnotationInterface); for (Character unicode : indexBuilder.getFirstCharacters()) { for (IndexItem indexItem : indexBuilder.getItems(unicode)) { TypeElement typeElement = (TypeElement) indexItem.getElement(); @@ -131,12 +131,12 @@ public class AllClassesIndexWriter extends HtmlDocletWriter { } } Content titleContent = contents.allClassesAndInterfacesLabel; - Content pHeading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, + var pHeading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, titleContent); - Content headerDiv = HtmlTree.DIV(HtmlStyle.header, pHeading); - content.add(headerDiv); + var headerDiv = HtmlTree.DIV(HtmlStyle.header, pHeading); + target.add(headerDiv); if (!table.isEmpty()) { - content.add(table); + target.add(table); if (table.needsScript()) { getMainBodyScript().append(table.getScript()); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllPackagesIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllPackagesIndexWriter.java index f4ad3387b966ddd9b927f2bd3b7cff2c05ccae26..9c0ebe887ac285655a580e16bb0c03ab9bb5c5c7 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllPackagesIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllPackagesIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -76,24 +76,24 @@ public class AllPackagesIndexWriter extends HtmlDocletWriter { Content mainContent = new ContentBuilder(); addPackages(mainContent); Content titleContent = contents.allPackagesLabel; - Content pHeading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, + var pHeading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, titleContent); - Content headerDiv = HtmlTree.DIV(HtmlStyle.header, pHeading); - HtmlTree bodyTree = getBody(getWindowTitle(label)); - bodyTree.add(new BodyContents() + var headerDiv = HtmlTree.DIV(HtmlStyle.header, pHeading); + HtmlTree body = getBody(getWindowTitle(label)); + body.add(new BodyContents() .setHeader(getHeader(PageMode.ALL_PACKAGES)) .addMainContent(headerDiv) .addMainContent(mainContent) .setFooter(getFooter())); - printHtmlDocument(null, "package index", bodyTree); + printHtmlDocument(null, "package index", body); } /** - * Add all the packages to the content tree. + * Add all the packages to the content. * - * @param content HtmlTree content to which the links will be added + * @param target the content to which the links will be added */ - protected void addPackages(Content content) { + protected void addPackages(Content target) { Table table = new Table(HtmlStyle.summaryTable) .setCaption(Text.of(contents.packageSummaryLabel.toString())) .setHeader(new TableHeader(contents.packageLabel, contents.descriptionLabel)) @@ -106,6 +106,6 @@ public class AllPackagesIndexWriter extends HtmlDocletWriter { table.addRow(pkg, packageLinkContent, summaryContent); } } - content.add(table); + target.add(table); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeMemberWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeMemberWriterImpl.java index 5ae2ffcf84ab20abda5c3607aafb2b6075b29fa5..ee8084d6f394148c8737a73b633cb7272b0b1c82 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeMemberWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeMemberWriterImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,11 +44,6 @@ import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter; /** * Writes annotation interface member documentation in HTML format. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class AnnotationTypeMemberWriterImpl extends AbstractMemberWriter implements AnnotationTypeMemberWriter, MemberSummaryWriter { @@ -92,24 +87,24 @@ public class AnnotationTypeMemberWriterImpl extends AbstractMemberWriter @Override public Content getMemberSummaryHeader(TypeElement typeElement, - Content memberSummaryTree) { + Content content) { switch (kind) { - case OPTIONAL -> memberSummaryTree.add(selectComment( + case OPTIONAL -> content.add(selectComment( MarkerComments.START_OF_ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY, MarkerComments.START_OF_ANNOTATION_INTERFACE_OPTIONAL_MEMBER_SUMMARY)); - case REQUIRED -> memberSummaryTree.add(selectComment( + case REQUIRED -> content.add(selectComment( MarkerComments.START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY, MarkerComments.START_OF_ANNOTATION_INTERFACE_REQUIRED_MEMBER_SUMMARY)); case ANY -> throw new UnsupportedOperationException("unsupported member kind"); } - Content memberTree = new ContentBuilder(); - writer.addSummaryHeader(this, memberTree); - return memberTree; + Content c = new ContentBuilder(); + writer.addSummaryHeader(this, c); + return c; } @Override - public Content getMemberTreeHeader() { - return writer.getMemberTreeHeader(); + public Content getMemberHeader() { + return writer.getMemberHeader(); } @Override @@ -131,21 +126,21 @@ public class AnnotationTypeMemberWriterImpl extends AbstractMemberWriter } @Override - public Content getAnnotationDetailsTreeHeader() { - Content memberDetailsTree = new ContentBuilder(); - Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, + public Content getAnnotationDetailsHeader() { + Content memberDetails = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, contents.annotationTypeDetailsLabel); - memberDetailsTree.add(heading); - return memberDetailsTree; + memberDetails.add(heading); + return memberDetails; } @Override - public Content getAnnotationDocTreeHeader(Element member) { - Content annotationDocTree = new ContentBuilder(); - Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, + public Content getAnnotationHeaderContent(Element member) { + Content content = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, Text.of(name(member))); - annotationDocTree.add(heading); - return HtmlTree.SECTION(HtmlStyle.detail, annotationDocTree) + content.add(heading); + return HtmlTree.SECTION(HtmlStyle.detail, content) .setId(htmlIds.forMember(typeElement, (ExecutableElement) member)); } @@ -158,40 +153,40 @@ public class AnnotationTypeMemberWriterImpl extends AbstractMemberWriter } @Override - public void addDeprecated(Element member, Content annotationDocTree) { - addDeprecatedInfo(member, annotationDocTree); + public void addDeprecated(Element member, Content target) { + addDeprecatedInfo(member, target); } @Override - public void addPreview(Element member, Content contentTree) { - addPreviewInfo(member, contentTree); + public void addPreview(Element member, Content content) { + addPreviewInfo(member, content); } @Override - public void addComments(Element member, Content annotationDocTree) { - addComment(member, annotationDocTree); + public void addComments(Element member, Content annotationContent) { + addComment(member, annotationContent); } @Override - public void addTags(Element member, Content annotationDocTree) { - writer.addTagsInfo(member, annotationDocTree); + public void addTags(Element member, Content annotationContent) { + writer.addTagsInfo(member, annotationContent); } @Override - public Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree) { - Content annotationDetails = new ContentBuilder(annotationDetailsTreeHeader, annotationDetailsTree); - return getMemberTree(HtmlTree.SECTION(HtmlStyle.memberDetails, annotationDetails)); + public Content getAnnotationDetails(Content annotationDetailsHeader, Content annotationDetails) { + Content c = new ContentBuilder(annotationDetailsHeader, annotationDetails); + return getMember(HtmlTree.SECTION(HtmlStyle.memberDetails, c)); } @Override - public void addSummaryLabel(Content memberTree) { - HtmlTree label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, + public void addSummaryLabel(Content content) { + var label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, switch (kind) { case REQUIRED -> contents.annotateTypeRequiredMemberSummaryLabel; case OPTIONAL -> contents.annotateTypeOptionalMemberSummaryLabel; case ANY -> throw new UnsupportedOperationException("unsupported member kind"); }); - memberTree.add(label); + content.add(label); } /** @@ -227,27 +222,27 @@ public class AnnotationTypeMemberWriterImpl extends AbstractMemberWriter } @Override - public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) { + public void addInheritedSummaryLabel(TypeElement typeElement, Content content) { } @Override protected void addSummaryLink(HtmlLinkInfo.Kind context, TypeElement typeElement, Element member, - Content tdSummary) { + Content content) { Content memberLink = writer.getDocLink(context, utils.getEnclosingTypeElement(member), member, name(member), HtmlStyle.memberNameLink); - Content code = HtmlTree.CODE(memberLink); - tdSummary.add(code); + var code = HtmlTree.CODE(memberLink); + content.add(code); } @Override protected void addInheritedSummaryLink(TypeElement typeElement, - Element member, Content linksTree) { + Element member, Content target) { //Not applicable. } @Override - protected void addSummaryType(Element member, Content tdSummaryType) { - addModifierAndType(member, getType(member), tdSummaryType); + protected void addSummaryType(Element member, Content content) { + addModifiersAndType(member, getType(member), content); } @Override @@ -268,15 +263,15 @@ public class AnnotationTypeMemberWriterImpl extends AbstractMemberWriter : member.asType(); } - public void addDefaultValueInfo(Element member, Content annotationDocTree) { - if (utils.isAnnotationType(member)) { + public void addDefaultValueInfo(Element member, Content annotationContent) { + if (utils.isAnnotationInterface(member.getEnclosingElement())) { ExecutableElement ee = (ExecutableElement) member; AnnotationValue value = ee.getDefaultValue(); if (value != null) { - Content dl = HtmlTree.DL(HtmlStyle.notes); + var dl = HtmlTree.DL(HtmlStyle.notes); dl.add(HtmlTree.DT(contents.default_)); dl.add(HtmlTree.DD(Text.of(value.toString()))); - annotationDocTree.add(dl); + annotationContent.add(dl); } } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java index 840676e875cab6ec486a4f948ddd24605c8e2004..c1d5246a2e6e4b7a5084e4c7911dac1389b0df26 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java @@ -54,11 +54,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.Utils; /** * Generate class usage information. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class ClassUseWriter extends SubWriterHolderWriter { @@ -230,24 +225,24 @@ public class ClassUseWriter extends SubWriterHolderWriter { /** * Add the class use documentation. * - * @param contentTree the content tree to which the class use information will be added + * @param content the content to which the class use information will be added */ - protected void addClassUse(Content contentTree) { - Content content = new ContentBuilder(); + protected void addClassUse(Content content) { + Content c = new ContentBuilder(); if (configuration.packages.size() > 1) { - addPackageList(content); - addPackageAnnotationList(content); + addPackageList(c); + addPackageAnnotationList(c); } - addClassList(content); - contentTree.add(content); + addClassList(c); + content.add(c); } /** * Add the packages elements that use the given class. * - * @param contentTree the content tree to which the packages elements will be added + * @param content the content to which the packages elements will be added */ - protected void addPackageList(Content contentTree) { + protected void addPackageList(Content content) { Content caption = contents.getContent( "doclet.ClassUse_Packages.that.use.0", getLink(new HtmlLinkInfo(configuration, @@ -259,16 +254,16 @@ public class ClassUseWriter extends SubWriterHolderWriter { for (PackageElement pkg : pkgSet) { addPackageUse(pkg, table); } - contentTree.add(table); + content.add(table); } /** * Add the package annotation elements. * - * @param contentTree the content tree to which the package annotation elements will be added + * @param content the content to which the package annotation elements will be added */ - protected void addPackageAnnotationList(Content contentTree) { - if (!utils.isAnnotationType(typeElement) || + protected void addPackageAnnotationList(Content content) { + if (!utils.isAnnotationInterface(typeElement) || pkgToPackageAnnotations == null || pkgToPackageAnnotations.isEmpty()) { return; @@ -287,30 +282,30 @@ public class ClassUseWriter extends SubWriterHolderWriter { addSummaryComment(pkg, summary); table.addRow(getPackageLink(pkg, getLocalizedPackageName(pkg)), summary); } - contentTree.add(table); + content.add(table); } /** * Add the class elements that use the given class. * - * @param contentTree the content tree to which the class elements will be added + * @param content the content to which the class elements will be added */ - protected void addClassList(Content contentTree) { - HtmlTree ul = HtmlTree.UL(HtmlStyle.blockList); + protected void addClassList(Content content) { + var ul = HtmlTree.UL(HtmlStyle.blockList); for (PackageElement pkg : pkgSet) { - HtmlTree htmlTree = HtmlTree.SECTION(HtmlStyle.detail) + var section = HtmlTree.SECTION(HtmlStyle.detail) .setId(htmlIds.forPackage(pkg)); Content link = contents.getContent("doclet.ClassUse_Uses.of.0.in.1", getLink(new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.CLASS_USE_HEADER, typeElement)), getPackageLink(pkg, getLocalizedPackageName(pkg))); - Content heading = HtmlTree.HEADING(Headings.TypeUse.SUMMARY_HEADING, link); - htmlTree.add(heading); - addClassUse(pkg, htmlTree); - ul.add(HtmlTree.LI(htmlTree)); + var heading = HtmlTree.HEADING(Headings.TypeUse.SUMMARY_HEADING, link); + section.add(heading); + addClassUse(pkg, section); + ul.add(HtmlTree.LI(section)); } - Content li = HtmlTree.SECTION(HtmlStyle.classUses, ul); - contentTree.add(li); + var li = HtmlTree.SECTION(HtmlStyle.classUses, ul); + content.add(li); } /** @@ -331,81 +326,81 @@ public class ClassUseWriter extends SubWriterHolderWriter { * Add the class use information. * * @param pkg the package that uses the given class - * @param contentTree the content tree to which the class use information will be added + * @param content the content to which the class use information will be added */ - protected void addClassUse(PackageElement pkg, Content contentTree) { + protected void addClassUse(PackageElement pkg, Content content) { Content classLink = getLink(new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.CLASS_USE_HEADER, typeElement)); Content pkgLink = getPackageLink(pkg, getLocalizedPackageName(pkg)); classSubWriter.addUseInfo(pkgToClassAnnotations.get(pkg), contents.getContent("doclet.ClassUse_Annotation", classLink, - pkgLink), contentTree); + pkgLink), content); classSubWriter.addUseInfo(pkgToClassTypeParameter.get(pkg), contents.getContent("doclet.ClassUse_TypeParameter", classLink, - pkgLink), contentTree); + pkgLink), content); classSubWriter.addUseInfo(pkgToSubclass.get(pkg), contents.getContent("doclet.ClassUse_Subclass", classLink, - pkgLink), contentTree); + pkgLink), content); classSubWriter.addUseInfo(pkgToSubinterface.get(pkg), contents.getContent("doclet.ClassUse_Subinterface", classLink, - pkgLink), contentTree); + pkgLink), content); classSubWriter.addUseInfo(pkgToImplementingClass.get(pkg), contents.getContent("doclet.ClassUse_ImplementingClass", classLink, - pkgLink), contentTree); + pkgLink), content); fieldSubWriter.addUseInfo(pkgToField.get(pkg), contents.getContent("doclet.ClassUse_Field", classLink, - pkgLink), contentTree); + pkgLink), content); fieldSubWriter.addUseInfo(pkgToFieldAnnotations.get(pkg), contents.getContent("doclet.ClassUse_FieldAnnotations", classLink, - pkgLink), contentTree); + pkgLink), content); fieldSubWriter.addUseInfo(pkgToFieldTypeParameter.get(pkg), contents.getContent("doclet.ClassUse_FieldTypeParameter", classLink, - pkgLink), contentTree); + pkgLink), content); methodSubWriter.addUseInfo(pkgToMethodAnnotations.get(pkg), contents.getContent("doclet.ClassUse_MethodAnnotations", classLink, - pkgLink), contentTree); + pkgLink), content); methodSubWriter.addUseInfo(pkgToMethodParameterAnnotations.get(pkg), contents.getContent("doclet.ClassUse_MethodParameterAnnotations", classLink, - pkgLink), contentTree); + pkgLink), content); methodSubWriter.addUseInfo(pkgToMethodTypeParameter.get(pkg), contents.getContent("doclet.ClassUse_MethodTypeParameter", classLink, - pkgLink), contentTree); + pkgLink), content); methodSubWriter.addUseInfo(pkgToMethodReturn.get(pkg), contents.getContent("doclet.ClassUse_MethodReturn", classLink, - pkgLink), contentTree); + pkgLink), content); methodSubWriter.addUseInfo(pkgToMethodReturnTypeParameter.get(pkg), contents.getContent("doclet.ClassUse_MethodReturnTypeParameter", classLink, - pkgLink), contentTree); + pkgLink), content); methodSubWriter.addUseInfo(pkgToMethodArgs.get(pkg), contents.getContent("doclet.ClassUse_MethodArgs", classLink, - pkgLink), contentTree); + pkgLink), content); methodSubWriter.addUseInfo(pkgToMethodArgTypeParameter.get(pkg), contents.getContent("doclet.ClassUse_MethodArgsTypeParameters", classLink, - pkgLink), contentTree); + pkgLink), content); methodSubWriter.addUseInfo(pkgToMethodThrows.get(pkg), contents.getContent("doclet.ClassUse_MethodThrows", classLink, - pkgLink), contentTree); + pkgLink), content); constrSubWriter.addUseInfo(pkgToConstructorAnnotations.get(pkg), contents.getContent("doclet.ClassUse_ConstructorAnnotations", classLink, - pkgLink), contentTree); + pkgLink), content); constrSubWriter.addUseInfo(pkgToConstructorParameterAnnotations.get(pkg), contents.getContent("doclet.ClassUse_ConstructorParameterAnnotations", classLink, - pkgLink), contentTree); + pkgLink), content); constrSubWriter.addUseInfo(pkgToConstructorArgs.get(pkg), contents.getContent("doclet.ClassUse_ConstructorArgs", classLink, - pkgLink), contentTree); + pkgLink), content); constrSubWriter.addUseInfo(pkgToConstructorArgTypeParameter.get(pkg), contents.getContent("doclet.ClassUse_ConstructorArgsTypeParameters", classLink, - pkgLink), contentTree); + pkgLink), content); constrSubWriter.addUseInfo(pkgToConstructorThrows.get(pkg), contents.getContent("doclet.ClassUse_ConstructorThrows", classLink, - pkgLink), contentTree); + pkgLink), content); } /** - * Get the header for the class use Listing. + * Get the header for the class use listing. * - * @return a content tree representing the class use header + * @return the class use header */ protected HtmlTree getClassUseHeader() { String cltype = resources.getText(switch (typeElement.getKind()) { @@ -418,16 +413,16 @@ public class ClassUseWriter extends SubWriterHolderWriter { String clname = utils.getFullyQualifiedName(typeElement); String title = resources.getText("doclet.Window_ClassUse_Header", cltype, clname); - HtmlTree bodyTree = getBody(getWindowTitle(title)); + HtmlTree body = getBody(getWindowTitle(title)); ContentBuilder headingContent = new ContentBuilder(); headingContent.add(contents.getContent("doclet.ClassUse_Title", cltype)); headingContent.add(new HtmlTree(TagName.BR)); headingContent.add(clname); - Content heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, + var heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, headingContent); - Content div = HtmlTree.DIV(HtmlStyle.header, heading); + var div = HtmlTree.DIV(HtmlStyle.header, heading); bodyContents.setHeader(getHeader(PageMode.USE, typeElement)).addMainContent(div); - return bodyTree; + return body; } @Override diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java index 45b10dc89e16241d7c5519a26b94d211c98487e0..ff56256aa7743e6888d39540ba20270c4624cd48 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java @@ -27,7 +27,6 @@ package jdk.javadoc.internal.doclets.formats.html; import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.List; import java.util.Set; import java.util.SortedSet; @@ -62,16 +61,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable; /** * Generate the Class Information Page. * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - * * @see javax.lang.model.element.TypeElement - * @see java.util.Collections - * @see java.util.List - * @see java.util.ArrayList - * @see java.util.HashMap */ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWriter { @@ -104,12 +94,12 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite @Override public Content getHeader(String header) { - HtmlTree bodyTree = getBody(getWindowTitle(utils.getSimpleName(typeElement))); - HtmlTree div = HtmlTree.DIV(HtmlStyle.header); + HtmlTree body = getBody(getWindowTitle(utils.getSimpleName(typeElement))); + var div = HtmlTree.DIV(HtmlStyle.header); if (configuration.showModules) { ModuleElement mdle = configuration.docEnv.getElementUtils().getModuleOf(typeElement); - Content classModuleLabel = HtmlTree.SPAN(HtmlStyle.moduleLabelInType, contents.moduleLabel); - Content moduleNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classModuleLabel); + var classModuleLabel = HtmlTree.SPAN(HtmlStyle.moduleLabelInType, contents.moduleLabel); + var moduleNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classModuleLabel); moduleNameDiv.add(Entity.NO_BREAK_SPACE); moduleNameDiv.add(getModuleLink(mdle, Text.of(mdle.getQualifiedName()))); @@ -117,8 +107,8 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite } PackageElement pkg = utils.containingPackage(typeElement); if (!pkg.isUnnamed()) { - Content classPackageLabel = HtmlTree.SPAN(HtmlStyle.packageLabelInType, contents.packageLabel); - Content pkgNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classPackageLabel); + var classPackageLabel = HtmlTree.SPAN(HtmlStyle.packageLabelInType, contents.packageLabel); + var pkgNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classPackageLabel); pkgNameDiv.add(Entity.NO_BREAK_SPACE); Content pkgNameContent = getPackageLink(pkg, getLocalizedPackageName(pkg)); pkgNameDiv.add(pkgNameContent); @@ -128,14 +118,14 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite HtmlLinkInfo.Kind.CLASS_HEADER, typeElement); //Let's not link to ourselves in the header. linkInfo.linkToSelf = false; - Content heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, + var heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, Text.of(header)); heading.add(getTypeParameterLinks(linkInfo)); div.add(heading); bodyContents.setHeader(getHeader(PageMode.CLASS, typeElement)) .addMainContent(MarkerComments.START_OF_CLASS_DATA) .addMainContent(div); - return bodyTree; + return body; } @Override @@ -169,23 +159,18 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite } @Override - public void printDocument(Content contentTree) throws DocFileIOException { + public void printDocument(Content content) throws DocFileIOException { String description = getDescription("declaration", typeElement); PackageElement pkg = utils.containingPackage(typeElement); List localStylesheets = getLocalStylesheets(pkg); - contentTree.add(bodyContents); + content.add(bodyContents); printHtmlDocument(configuration.metakeywords.getMetaKeywords(typeElement), - description, localStylesheets, contentTree); + description, localStylesheets, content); } @Override - public Content getClassInfoTreeHeader() { - return getMemberTreeHeader(); - } - - @Override - public Content getClassInfo(Content classInfoTree) { - return getMemberTree(HtmlIds.CLASS_DESCRIPTION, HtmlStyle.classDescription, classInfoTree); + public Content getClassInfo(Content classInfo) { + return getMember(HtmlIds.CLASS_DESCRIPTION, HtmlStyle.classDescription, classInfo); } @Override @@ -194,51 +179,51 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite } @Override - public void addClassSignature(Content classInfoTree) { - classInfoTree.add(new HtmlTree(TagName.HR)); - classInfoTree.add(new Signatures.TypeSignature(typeElement, this) + public void addClassSignature(Content classInfo) { + classInfo.add(new HtmlTree(TagName.HR)); + classInfo.add(new Signatures.TypeSignature(typeElement, this) .toContent()); } @Override - public void addClassDescription(Content classInfoTree) { - addPreviewInfo(classInfoTree); + public void addClassDescription(Content classInfo) { + addPreviewInfo(classInfo); if (!options.noComment()) { // generate documentation for the class. if (!utils.getFullBody(typeElement).isEmpty()) { - addInlineComment(typeElement, classInfoTree); + addInlineComment(typeElement, classInfo); } } } - private void addPreviewInfo(Content classInfoTree) { - addPreviewInfo(typeElement, classInfoTree); + private void addPreviewInfo(Content content) { + addPreviewInfo(typeElement, content); } @Override - public void addClassTagInfo(Content classInfoTree) { + public void addClassTagInfo(Content classInfo) { if (!options.noComment()) { // Print Information about all the tags here - addTagsInfo(typeElement, classInfoTree); + addTagsInfo(typeElement, classInfo); } } /** - * Get the class hierarchy tree for the given class. + * Get the class inheritance tree for the given class. * - * @param type the class to print the hierarchy for - * @return a content tree for class inheritance + * @param type the class to get the inheritance tree for + * @return the class inheritance tree */ - private Content getClassInheritanceTree(TypeMirror type) { + private Content getClassInheritanceTreeContent(TypeMirror type) { TypeMirror sup; HtmlTree classTree = null; do { sup = utils.getFirstVisibleSuperClass(type); - HtmlTree htmlElement = HtmlTree.DIV(HtmlStyle.inheritance, getTreeForClassHelper(type)); + var entry = HtmlTree.DIV(HtmlStyle.inheritance, getClassHelperContent(type)); if (classTree != null) - htmlElement.add(classTree); - classTree = htmlElement; + entry.add(classTree); + classTree = entry; type = sup; } while (sup != null); classTree.put(HtmlAttr.TITLE, contents.getContent("doclet.Inheritance_Tree").toString()); @@ -246,54 +231,54 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite } /** - * Get the class helper tree for the given class. + * Get the class helper for the given class. * - * @param type the class to print the helper for - * @return a content tree for class helper + * @param type the class to get the helper for + * @return the class helper */ - private Content getTreeForClassHelper(TypeMirror type) { - Content content = new ContentBuilder(); + private Content getClassHelperContent(TypeMirror type) { + Content result = new ContentBuilder(); if (utils.typeUtils.isSameType(type, typeElement.asType())) { Content typeParameters = getTypeParameterLinks( new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.TREE, typeElement)); if (configuration.shouldExcludeQualifier(utils.containingPackage(typeElement).toString())) { - content.add(utils.asTypeElement(type).getSimpleName()); - content.add(typeParameters); + result.add(utils.asTypeElement(type).getSimpleName()); + result.add(typeParameters); } else { - content.add(utils.asTypeElement(type).getQualifiedName()); - content.add(typeParameters); + result.add(utils.asTypeElement(type).getQualifiedName()); + result.add(typeParameters); } } else { Content link = getLink(new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.CLASS_TREE_PARENT, type) .label(configuration.getClassName(utils.asTypeElement(type)))); - content.add(link); + result.add(link); } - return content; + return result; } @Override - public void addClassTree(Content classContentTree) { + public void addClassTree(Content target) { if (!utils.isClass(typeElement)) { return; } - classContentTree.add(getClassInheritanceTree(typeElement.asType())); + target.add(getClassInheritanceTreeContent(typeElement.asType())); } @Override - public void addParamInfo(Content classInfoTree) { + public void addParamInfo(Content target) { if (utils.hasBlockTag(typeElement, DocTree.Kind.PARAM)) { Content paramInfo = (new ParamTaglet()).getAllBlockTagOutput(typeElement, getTagletWriterInstance(false)); if (!paramInfo.isEmpty()) { - classInfoTree.add(HtmlTree.DL(HtmlStyle.notes, paramInfo)); + target.add(HtmlTree.DL(HtmlStyle.notes, paramInfo)); } } } @Override - public void addSubClassInfo(Content classInfoTree) { + public void addSubClassInfo(Content target) { if (utils.isClass(typeElement)) { for (String s : suppressSubtypesSet) { if (typeElement.getQualifiedName().contentEquals(s)) { @@ -302,30 +287,30 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite } Set subclasses = classtree.directSubClasses(typeElement, false); if (!subclasses.isEmpty()) { - HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); + var dl = HtmlTree.DL(HtmlStyle.notes); dl.add(HtmlTree.DT(contents.subclassesLabel)); dl.add(HtmlTree.DD(getClassLinks(HtmlLinkInfo.Kind.SUBCLASSES, subclasses))); - classInfoTree.add(dl); + target.add(dl); } } } @Override - public void addSubInterfacesInfo(Content classInfoTree) { - if (utils.isInterface(typeElement)) { + public void addSubInterfacesInfo(Content target) { + if (utils.isPlainInterface(typeElement)) { Set subInterfaces = classtree.allSubClasses(typeElement, false); if (!subInterfaces.isEmpty()) { - Content dl = HtmlTree.DL(HtmlStyle.notes); + var dl = HtmlTree.DL(HtmlStyle.notes); dl.add(HtmlTree.DT(contents.subinterfacesLabel)); dl.add(HtmlTree.DD(getClassLinks(HtmlLinkInfo.Kind.SUBINTERFACES, subInterfaces))); - classInfoTree.add(dl); + target.add(dl); } } } @Override - public void addInterfaceUsageInfo (Content classInfoTree) { - if (!utils.isInterface(typeElement)) { + public void addInterfaceUsageInfo(Content target) { + if (!utils.isPlainInterface(typeElement)) { return; } for (String s : suppressImplementingSet) { @@ -335,67 +320,67 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite } Set implcl = classtree.implementingClasses(typeElement); if (!implcl.isEmpty()) { - HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); + var dl = HtmlTree.DL(HtmlStyle.notes); dl.add(HtmlTree.DT(contents.implementingClassesLabel)); dl.add(HtmlTree.DD(getClassLinks(HtmlLinkInfo.Kind.IMPLEMENTED_CLASSES, implcl))); - classInfoTree.add(dl); + target.add(dl); } } @Override - public void addImplementedInterfacesInfo(Content classInfoTree) { + public void addImplementedInterfacesInfo(Content target) { SortedSet interfaces = new TreeSet<>(comparators.makeTypeMirrorClassUseComparator()); interfaces.addAll(utils.getAllInterfaces(typeElement)); if (utils.isClass(typeElement) && !interfaces.isEmpty()) { - HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); + var dl = HtmlTree.DL(HtmlStyle.notes); dl.add(HtmlTree.DT(contents.allImplementedInterfacesLabel)); dl.add(HtmlTree.DD(getClassLinks(HtmlLinkInfo.Kind.IMPLEMENTED_INTERFACES, interfaces))); - classInfoTree.add(dl); + target.add(dl); } } @Override - public void addSuperInterfacesInfo(Content classInfoTree) { + public void addSuperInterfacesInfo(Content target) { SortedSet interfaces = new TreeSet<>(comparators.makeTypeMirrorIndexUseComparator()); interfaces.addAll(utils.getAllInterfaces(typeElement)); - if (utils.isInterface(typeElement) && !interfaces.isEmpty()) { - HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); + if (utils.isPlainInterface(typeElement) && !interfaces.isEmpty()) { + var dl = HtmlTree.DL(HtmlStyle.notes); dl.add(HtmlTree.DT(contents.allSuperinterfacesLabel)); dl.add(HtmlTree.DD(getClassLinks(HtmlLinkInfo.Kind.SUPER_INTERFACES, interfaces))); - classInfoTree.add(dl); + target.add(dl); } } @Override - public void addNestedClassInfo(final Content classInfoTree) { + public void addNestedClassInfo(final Content target) { Element outerClass = typeElement.getEnclosingElement(); if (outerClass == null) return; new SimpleElementVisitor8() { @Override public Void visitType(TypeElement e, Void p) { - HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); - dl.add(HtmlTree.DT(utils.isInterface(e) + var dl = HtmlTree.DL(HtmlStyle.notes); + dl.add(HtmlTree.DT(utils.isPlainInterface(e) ? contents.enclosingInterfaceLabel : contents.enclosingClassLabel)); dl.add(HtmlTree.DD(getClassLinks(HtmlLinkInfo.Kind.CLASS, List.of(e)))); - classInfoTree.add(dl); + target.add(dl); return null; } }.visit(outerClass); } @Override - public void addFunctionalInterfaceInfo (Content classInfoTree) { + public void addFunctionalInterfaceInfo (Content target) { if (isFunctionalInterface()) { - HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); + var dl = HtmlTree.DL(HtmlStyle.notes); dl.add(HtmlTree.DT(contents.functionalInterface)); - Content dd = new HtmlTree(TagName.DD); + var dd = new HtmlTree(TagName.DD); dd.add(contents.functionalInterfaceMessage); dl.add(dd); - classInfoTree.add(dl); + target.add(dl); } } @@ -411,11 +396,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite @Override - public void addClassDeprecationInfo(Content classInfoTree) { + public void addClassDeprecationInfo(Content classInfo) { List deprs = utils.getDeprecatedTrees(typeElement); if (utils.isDeprecated(typeElement)) { - Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(typeElement)); - Content div = HtmlTree.DIV(HtmlStyle.deprecationBlock, deprLabel); + var deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(typeElement)); + var div = HtmlTree.DIV(HtmlStyle.deprecationBlock, deprLabel); if (!deprs.isEmpty()) { CommentHelper ch = utils.getCommentHelper(typeElement); DocTree dt = deprs.get(0); @@ -424,16 +409,16 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite addInlineDeprecatedComment(typeElement, deprs.get(0), div); } } - classInfoTree.add(div); + classInfo.add(div); } } /** - * Get links to the given classes. + * Get the links to the given classes. * - * @param context the id of the context where the link will be printed - * @param list the list of classes - * @return a content tree for the class list + * @param context the id of the context where the links will be added + * @param list the classes + * @return the links */ private Content getClassLinks(HtmlLinkInfo.Kind context, Collection list) { Content content = new ContentBuilder(); @@ -468,16 +453,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite return typeElement; } - /** - * Get the member details tree - * - * @param contentTree the tree used to generate the member details tree - * @return a content tree for the member details - */ - public Content getMemberDetailsTree(Content contentTree) { - HtmlTree section = HtmlTree.SECTION(HtmlStyle.details, contentTree); + @Override + public Content getMemberDetails(Content content) { + var section = HtmlTree.SECTION(HtmlStyle.details, content); // The following id is required by the Navigation bar - if (utils.isAnnotationType(typeElement)) { + if (utils.isAnnotationInterface(typeElement)) { section.setId(HtmlIds.ANNOTATION_TYPE_ELEMENT_DETAIL); } return section; diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java index 1723bc6ecfd5a93650116abae9618c3b4c8947ef..b37604550f366d024897b57419769ed6183474af 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java @@ -52,11 +52,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.IndexItem; /** * Write the Constants Summary Page in HTML format. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements ConstantsSummaryWriter { @@ -68,9 +63,9 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons private final TableHeader constantsTableHeader; /** - * The HTML tree for constant values summary. + * The HTML tree for constant values summary currently being written. */ - private HtmlTree summaryTree; + private HtmlTree summarySection; private final BodyContents bodyContents = new BodyContents(); @@ -91,9 +86,9 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons @Override public Content getHeader() { String label = resources.getText("doclet.Constants_Summary"); - HtmlTree bodyTree = getBody(getWindowTitle(label)); + HtmlTree body = getBody(getWindowTitle(label)); bodyContents.setHeader(getHeader(PageMode.CONSTANT_VALUES)); - return bodyTree; + return body; } @Override @@ -103,7 +98,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons @Override public void addLinkToPackageContent(PackageElement pkg, - Set printedPackageHeaders, Content contentListTree) { + Set printedPackageHeaders, Content content) { //add link to summary Content link; if (pkg.isUnnamed()) { @@ -117,20 +112,20 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons PackageElement abbrevPkg = configuration.workArounds.getAbbreviatedPackageElement(pkg); printedPackageHeaders.add(abbrevPkg); } - contentListTree.add(HtmlTree.LI(link)); + content.add(HtmlTree.LI(link)); } @Override - public void addContentsList(Content contentListTree) { + public void addContentsList(Content content) { Content titleContent = contents.constantsSummaryTitle; - Content pHeading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, + var pHeading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, titleContent); - Content div = HtmlTree.DIV(HtmlStyle.header, pHeading); + var div = HtmlTree.DIV(HtmlStyle.header, pHeading); Content headingContent = contents.contentsHeading; - Content heading = HtmlTree.HEADING_TITLE(Headings.CONTENT_HEADING, + var heading = HtmlTree.HEADING_TITLE(Headings.CONTENT_HEADING, headingContent); - HtmlTree section = HtmlTree.SECTION(HtmlStyle.packages, heading); - section.add(contentListTree); + var section = HtmlTree.SECTION(HtmlStyle.packages, heading); + section.add(content); div.add(section); bodyContents.addMainContent(div); } @@ -141,11 +136,11 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons } @Override - public void addPackageName(PackageElement pkg, Content summariesTree, boolean first) { + public void addPackageName(PackageElement pkg, Content toContent, boolean first) { Content pkgNameContent; HtmlId anchorName; if (!first) { - summariesTree.add(summaryTree); + toContent.add(summarySection); } if (pkg.isUnnamed()) { anchorName = HtmlIds.UNNAMED_PACKAGE_ANCHOR; @@ -155,11 +150,11 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons anchorName = htmlIds.forPackage(pkg); pkgNameContent = getPackageLabel(parsedPackageName); } - Content headingContent = Text.of(".*"); - Content heading = HtmlTree.HEADING_TITLE(Headings.ConstantsSummary.PACKAGE_HEADING, + var headingContent = Text.of(".*"); + var heading = HtmlTree.HEADING_TITLE(Headings.ConstantsSummary.PACKAGE_HEADING, pkgNameContent); heading.add(headingContent); - summaryTree = HtmlTree.SECTION(HtmlStyle.constantsSummary, heading) + summarySection = HtmlTree.SECTION(HtmlStyle.constantsSummary, heading) .setId(anchorName); } @@ -169,14 +164,14 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons } @Override - public void addClassConstant(Content summariesTree, Content classConstantTree) { - summaryTree.add(classConstantTree); + public void addClassConstant(Content fromClassConstant) { + summarySection.add(fromClassConstant); hasConstants = true; } @Override public void addConstantMembers(TypeElement typeElement, Collection fields, - Content classConstantTree) { + Content target) { currentTypeElement = typeElement; //generate links backward only to public classes. @@ -201,7 +196,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons for (VariableElement field : fields) { table.addRow(getTypeColumn(field), getNameColumn(field), getValue(field)); } - classConstantTree.add(HtmlTree.LI(table)); + target.add(HtmlTree.LI(table)); } /** @@ -212,7 +207,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons */ private Content getTypeColumn(VariableElement member) { Content typeContent = new ContentBuilder(); - Content code = new HtmlTree(TagName.CODE) + var code = new HtmlTree(TagName.CODE) .setId(htmlIds.forMember(currentTypeElement, member)); for (Modifier mod : member.getModifiers()) { code.add(Text.of(mod.toString())) @@ -249,11 +244,11 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons } @Override - public void addConstantSummaries(Content summariesTree) { - if (summaryTree != null) { - summariesTree.add(summaryTree); + public void addConstantSummaries(Content content) { + if (summarySection != null) { + content.add(summarySection); } - bodyContents.addMainContent(summariesTree); + bodyContents.addMainContent(content); } @Override @@ -262,9 +257,9 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons } @Override - public void printDocument(Content contentTree) throws DocFileIOException { - contentTree.add(bodyContents); - printHtmlDocument(null, "summary of constants", contentTree); + public void printDocument(Content content) throws DocFileIOException { + content.add(bodyContents); + printHtmlDocument(null, "summary of constants", content); if (hasConstants && configuration.mainIndex != null) { configuration.mainIndex.add(IndexItem.of(IndexItem.Category.TAGS, diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java index ed5c0220732ce888758b74586fed8a12ad1dd5cd..e7825249248424b6665fb64da6c85482d9f80f20 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -49,11 +49,6 @@ import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind. /** * Writes constructor documentation. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter implements ConstructorWriter, MemberSummaryWriter { @@ -90,11 +85,11 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter @Override public Content getMemberSummaryHeader(TypeElement typeElement, - Content memberSummaryTree) { - memberSummaryTree.add(MarkerComments.START_OF_CONSTRUCTOR_SUMMARY); - Content memberTree = new ContentBuilder(); - writer.addSummaryHeader(this, memberTree); - return memberTree; + Content content) { + content.add(MarkerComments.START_OF_CONSTRUCTOR_SUMMARY); + Content c = new ContentBuilder(); + writer.addSummaryHeader(this, c); + return c; } @Override @@ -104,26 +99,26 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter } @Override - public Content getConstructorDetailsTreeHeader(Content memberDetailsTree) { - memberDetailsTree.add(MarkerComments.START_OF_CONSTRUCTOR_DETAILS); - Content constructorDetailsTree = new ContentBuilder(); - Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, + public Content getConstructorDetailsHeader(Content content) { + content.add(MarkerComments.START_OF_CONSTRUCTOR_DETAILS); + Content constructorDetails = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, contents.constructorDetailsLabel); - constructorDetailsTree.add(heading); - return constructorDetailsTree; + constructorDetails.add(heading); + return constructorDetails; } @Override - public Content getConstructorDocTreeHeader(ExecutableElement constructor) { - Content constructorDocTree = new ContentBuilder(); - HtmlTree heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, + public Content getConstructorHeaderContent(ExecutableElement constructor) { + Content content = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, Text.of(name(constructor))); HtmlId erasureAnchor = htmlIds.forErasure(constructor); if (erasureAnchor != null) { heading.setId(erasureAnchor); } - constructorDocTree.add(heading); - return HtmlTree.SECTION(HtmlStyle.detail, constructorDocTree) + content.add(heading); + return HtmlTree.SECTION(HtmlStyle.detail, content) .setId(htmlIds.forMember(constructor)); } @@ -137,32 +132,32 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter } @Override - public void addDeprecated(ExecutableElement constructor, Content constructorDocTree) { - addDeprecatedInfo(constructor, constructorDocTree); + public void addDeprecated(ExecutableElement constructor, Content constructorContent) { + addDeprecatedInfo(constructor, constructorContent); } @Override - public void addPreview(ExecutableElement constructor, Content constructorDocTree) { - addPreviewInfo(constructor, constructorDocTree); + public void addPreview(ExecutableElement constructor, Content content) { + addPreviewInfo(constructor, content); } @Override - public void addComments(ExecutableElement constructor, Content constructorDocTree) { - addComment(constructor, constructorDocTree); + public void addComments(ExecutableElement constructor, Content constructorContent) { + addComment(constructor, constructorContent); } @Override - public void addTags(ExecutableElement constructor, Content constructorDocTree) { - writer.addTagsInfo(constructor, constructorDocTree); + public void addTags(ExecutableElement constructor, Content constructorContent) { + writer.addTagsInfo(constructor, constructorContent); } @Override - public Content getConstructorDetails(Content constructorDetailsTreeHeader, Content constructorDetailsTree) { + public Content getConstructorDetails(Content memberDetailsHeader, Content memberDetails) { return writer.getDetailsListItem( HtmlTree.SECTION(HtmlStyle.constructorDetails) .setId(HtmlIds.CONSTRUCTOR_DETAIL) - .add(constructorDetailsTreeHeader) - .add(constructorDetailsTree)); + .add(memberDetailsHeader) + .add(memberDetails)); } @Override @@ -171,10 +166,10 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter } @Override - public void addSummaryLabel(Content memberTree) { - Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, + public void addSummaryLabel(Content content) { + var label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, contents.constructorSummaryLabel); - memberTree.add(label); + content.add(label); } @Override @@ -206,13 +201,13 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter } @Override - public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) { + public void addInheritedSummaryLabel(TypeElement typeElement, Content content) { } @Override - protected void addSummaryType(Element member, Content tdSummaryType) { + protected void addSummaryType(Element member, Content content) { if (foundNonPubConstructor) { - Content code = new HtmlTree(TagName.CODE); + var code = new HtmlTree(TagName.CODE); if (utils.isProtected(member)) { code.add("protected "); } else if (utils.isPrivate(member)) { @@ -223,12 +218,12 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter code.add( resources.getText("doclet.Package_private")); } - tdSummaryType.add(code); + content.add(code); } } @Override - public Content getMemberTreeHeader(){ - return writer.getMemberTreeHeader(); + public Content getMemberHeader(){ + return writer.getMemberHeader(); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Contents.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Contents.java index 1b18aa4293c2ee1d2bf08d2e74324652612573a5..1c0be973c307f119f678b2c900c54c4c521e0551 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Contents.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Contents.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -343,7 +343,7 @@ public class Contents { * a given key in the doclet's resources. * * @param key the key for the desired string - * @return a content tree for the string + * @return the string */ public Content getContent(String key) { return Text.of(resources.getText(key)); @@ -356,7 +356,7 @@ public class Contents { * * @param key the key for the desired string * @param o0 string or content argument to be formatted into the result - * @return a content tree for the text + * @return the string */ public Content getContent(String key, Object o0) { return getContent(key, o0, null, null); @@ -370,7 +370,7 @@ public class Contents { * @param key the key for the desired string * @param o0 string or content argument to be formatted into the result * @param o1 string or content argument to be formatted into the result - * @return a content tree for the text + * @return the string */ public Content getContent(String key, Object o0, Object o1) { return getContent(key, o0, o1, null); @@ -385,7 +385,7 @@ public class Contents { * @param o0 string or content argument to be formatted into the result * @param o1 string or content argument to be formatted into the result * @param o2 string or content argument to be formatted into the result - * @return a content tree for the text + * @return the string */ public Content getContent(String key, Object o0, Object o1, Object o2) { Content c = new ContentBuilder(); @@ -423,7 +423,7 @@ public class Contents { * * @param separator the separator * @param items the items - * @return the content + * @return the composition */ public Content join(Content separator, Collection items) { Content result = new ContentBuilder(); @@ -446,7 +446,7 @@ public class Contents { * the named resource string. * * @param key the key for the desired string - * @return a content tree for the string + * @return the string */ private Content getNonBreakResource(String key) { return getNonBreakString(resources.getText(key)); @@ -458,7 +458,7 @@ public class Contents { * the named resource string. * * @param text the string - * @return a content tree for the string + * @return the string content */ public Content getNonBreakString(String text) { Content c = new ContentBuilder(); @@ -474,9 +474,9 @@ public class Contents { } /** - * Returns a content for a visible member kind. + * {@return a label that describes the VisibleMemberTable kind} + * * @param kind the visible member table kind. - * @return the string content */ public Content getNavLinkLabelContent(VisibleMemberTable.Kind kind) { return Objects.requireNonNull(navLinkLabels.get(kind)); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java index 271a21ecf734ccb9e054e85e8fc3fed269c5005c..031dfccdc0ab74b44b6a286eb4ad71093289df0e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,11 +43,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; /** * Generate File to list all the deprecated classes and class members with the * appropriate links. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class DeprecatedListWriter extends SummaryListWriter { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java index 652e53a3075f71bfec9926689a8d58568d02e654..ba1e5eb001358ef723d3ae375b962a66c77b0261 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,7 +52,6 @@ import javax.tools.JavaFileManager.Location; import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode; @@ -213,7 +212,7 @@ public class DocFilesHandlerImpl implements DocFilesHandler { .setHeader(docletWriter.getHeader(PageMode.DOC_FILE, element)) .addMainContent(pageContent) .setFooter(docletWriter.getFooter())); - docletWriter.printHtmlDocument(Collections.emptyList(), null, localTagsContent, Collections.emptyList(), htmlContent); + docletWriter.printHtmlDocument(List.of(), null, localTagsContent, List.of(), htmlContent); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java index 3fbd13d0189e004246efe1345a82c7ec9ac8a08c..aa9fa7f193111037fb381437dc60af75c3d87eb5 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,6 @@ import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter; /** * Writes enum constant documentation in HTML format. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class EnumConstantWriterImpl extends AbstractMemberWriter implements EnumConstantWriter, MemberSummaryWriter { @@ -59,11 +54,11 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter @Override public Content getMemberSummaryHeader(TypeElement typeElement, - Content memberSummaryTree) { - memberSummaryTree.add(MarkerComments.START_OF_ENUM_CONSTANT_SUMMARY); - Content memberTree = new ContentBuilder(); - writer.addSummaryHeader(this, memberTree); - return memberTree; + Content content) { + content.add(MarkerComments.START_OF_ENUM_CONSTANT_SUMMARY); + Content memberContent = new ContentBuilder(); + writer.addSummaryHeader(this, memberContent); + return memberContent; } @Override @@ -73,24 +68,24 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter } @Override - public Content getEnumConstantsDetailsTreeHeader(TypeElement typeElement, - Content memberDetailsTree) { - memberDetailsTree.add(MarkerComments.START_OF_ENUM_CONSTANT_DETAILS); - Content enumConstantsDetailsTree = new ContentBuilder(); - Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, + public Content getEnumConstantsDetailsHeader(TypeElement typeElement, + Content memberDetails) { + memberDetails.add(MarkerComments.START_OF_ENUM_CONSTANT_DETAILS); + var enumConstantsDetailsContent = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, contents.enumConstantDetailLabel); - enumConstantsDetailsTree.add(heading); - return enumConstantsDetailsTree; + enumConstantsDetailsContent.add(heading); + return enumConstantsDetailsContent; } @Override - public Content getEnumConstantsTreeHeader(VariableElement enumConstant, - Content enumConstantsDetailsTree) { - Content enumConstantsTree = new ContentBuilder(); - HtmlTree heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, + public Content getEnumConstantsHeader(VariableElement enumConstant, + Content enumConstantsDetails) { + Content enumConstantsContent = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, Text.of(name(enumConstant))); - enumConstantsTree.add(heading); - return HtmlTree.SECTION(HtmlStyle.detail, enumConstantsTree) + enumConstantsContent.add(heading); + return HtmlTree.SECTION(HtmlStyle.detail, enumConstantsContent) .setId(htmlIds.forMember(enumConstant)); } @@ -103,40 +98,40 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter } @Override - public void addDeprecated(VariableElement enumConstant, Content enumConstantsTree) { - addDeprecatedInfo(enumConstant, enumConstantsTree); + public void addDeprecated(VariableElement enumConstant, Content content) { + addDeprecatedInfo(enumConstant, content); } @Override - public void addPreview(VariableElement enumConstant, Content enumConstantsTree) { - addPreviewInfo(enumConstant, enumConstantsTree); + public void addPreview(VariableElement enumConstant, Content content) { + addPreviewInfo(enumConstant, content); } @Override - public void addComments(VariableElement enumConstant, Content enumConstantsTree) { - addComment(enumConstant, enumConstantsTree); + public void addComments(VariableElement enumConstant, Content enumConstants) { + addComment(enumConstant, enumConstants); } @Override - public void addTags(VariableElement enumConstant, Content enumConstantsTree) { - writer.addTagsInfo(enumConstant, enumConstantsTree); + public void addTags(VariableElement enumConstant, Content content) { + writer.addTagsInfo(enumConstant, content); } @Override - public Content getEnumConstantsDetails(Content enumConstantsDetailsTreeHeader, - Content enumConstantsDetailsTree) { + public Content getEnumConstantsDetails(Content memberDetailsHeader, + Content content) { return writer.getDetailsListItem( HtmlTree.SECTION(HtmlStyle.constantDetails) .setId(HtmlIds.ENUM_CONSTANT_DETAIL) - .add(enumConstantsDetailsTreeHeader) - .add(enumConstantsDetailsTree)); + .add(memberDetailsHeader) + .add(content)); } @Override - public void addSummaryLabel(Content memberTree) { - Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, + public void addSummaryLabel(Content content) { + var label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, contents.enumConstantSummary); - memberTree.add(label); + content.add(label); } @Override @@ -153,24 +148,24 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter } @Override - public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) { + public void addInheritedSummaryLabel(TypeElement typeElement, Content content) { } @Override protected void addSummaryLink(HtmlLinkInfo.Kind context, TypeElement typeElement, Element member, - Content tdSummary) { + Content content) { Content memberLink = writer.getDocLink(context, utils.getEnclosingTypeElement(member), member, name(member), HtmlStyle.memberNameLink); - Content code = HtmlTree.CODE(memberLink); - tdSummary.add(code); + var code = HtmlTree.CODE(memberLink); + content.add(code); } @Override - protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) { + protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content target) { } @Override - protected void addSummaryType(Element member, Content tdSummaryType) { + protected void addSummaryType(Element member, Content content) { //Not applicable. } @@ -181,7 +176,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter } @Override - public Content getMemberTreeHeader(){ - return writer.getMemberTreeHeader(); + public Content getMemberHeader(){ + return writer.getMemberHeader(); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java index 2402c18608d828681cf2d856ce7a6c7c197de427..acf3af347f1f2382264c6988678f3f0395d3a003 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,11 +43,6 @@ import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter; /** * Writes field documentation in HTML format. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class FieldWriterImpl extends AbstractMemberWriter implements FieldWriter, MemberSummaryWriter { @@ -62,11 +57,11 @@ public class FieldWriterImpl extends AbstractMemberWriter @Override public Content getMemberSummaryHeader(TypeElement typeElement, - Content memberSummaryTree) { - memberSummaryTree.add(MarkerComments.START_OF_FIELD_SUMMARY); - Content memberTree = new ContentBuilder(); - writer.addSummaryHeader(this, memberTree); - return memberTree; + Content content) { + content.add(MarkerComments.START_OF_FIELD_SUMMARY); + Content memberContent = new ContentBuilder(); + writer.addSummaryHeader(this, memberContent); + return memberContent; } @Override @@ -76,22 +71,22 @@ public class FieldWriterImpl extends AbstractMemberWriter } @Override - public Content getFieldDetailsTreeHeader(Content memberDetailsTree) { - memberDetailsTree.add(MarkerComments.START_OF_FIELD_DETAILS); - Content fieldDetailsTree = new ContentBuilder(); - Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, + public Content getFieldDetailsHeader(Content content) { + content.add(MarkerComments.START_OF_FIELD_DETAILS); + Content fieldDetailsContent = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, contents.fieldDetailsLabel); - fieldDetailsTree.add(heading); - return fieldDetailsTree; + fieldDetailsContent.add(heading); + return fieldDetailsContent; } @Override - public Content getFieldDocTreeHeader(VariableElement field) { - Content fieldTree = new ContentBuilder(); - Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, + public Content getFieldHeaderContent(VariableElement field) { + Content content = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, Text.of(name(field))); - fieldTree.add(heading); - return HtmlTree.SECTION(HtmlStyle.detail, fieldTree) + content.add(heading); + return HtmlTree.SECTION(HtmlStyle.detail, content) .setId(htmlIds.forMember(field)); } @@ -104,41 +99,41 @@ public class FieldWriterImpl extends AbstractMemberWriter } @Override - public void addDeprecated(VariableElement field, Content fieldTree) { - addDeprecatedInfo(field, fieldTree); + public void addDeprecated(VariableElement field, Content fieldContent) { + addDeprecatedInfo(field, fieldContent); } @Override - public void addPreview(VariableElement field, Content fieldTree) { - addPreviewInfo(field, fieldTree); + public void addPreview(VariableElement field, Content content) { + addPreviewInfo(field, content); } @Override - public void addComments(VariableElement field, Content fieldTree) { + public void addComments(VariableElement field, Content fieldContent) { if (!utils.getFullBody(field).isEmpty()) { - writer.addInlineComment(field, fieldTree); + writer.addInlineComment(field, fieldContent); } } @Override - public void addTags(VariableElement field, Content fieldTree) { - writer.addTagsInfo(field, fieldTree); + public void addTags(VariableElement field, Content fieldContent) { + writer.addTagsInfo(field, fieldContent); } @Override - public Content getFieldDetails(Content fieldDetailsTreeHeader, Content fieldDetailsTree) { + public Content getFieldDetails(Content memberDetailsHeaderContent, Content memberContent) { return writer.getDetailsListItem( HtmlTree.SECTION(HtmlStyle.fieldDetails) .setId(HtmlIds.FIELD_DETAIL) - .add(fieldDetailsTreeHeader) - .add(fieldDetailsTree)); + .add(memberDetailsHeaderContent) + .add(memberContent)); } @Override - public void addSummaryLabel(Content memberTree) { - Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, + public void addSummaryLabel(Content content) { + var label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, contents.fieldSummaryLabel); - memberTree.add(label); + content.add(label); } @Override @@ -159,7 +154,7 @@ public class FieldWriterImpl extends AbstractMemberWriter } @Override - public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) { + public void addInheritedSummaryLabel(TypeElement typeElement, Content content) { Content classLink = writer.getPreQualifiedClassLink( HtmlLinkInfo.Kind.MEMBER, typeElement); Content label; @@ -172,32 +167,32 @@ public class FieldWriterImpl extends AbstractMemberWriter ? resources.getText("doclet.Fields_Inherited_From_Class") : resources.getText("doclet.Fields_Inherited_From_Interface")); } - HtmlTree labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING, + var labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING, label); labelHeading.setId(htmlIds.forInheritedFields(typeElement)); labelHeading.add(Entity.NO_BREAK_SPACE); labelHeading.add(classLink); - inheritedTree.add(labelHeading); + content.add(labelHeading); } @Override protected void addSummaryLink(HtmlLinkInfo.Kind context, TypeElement typeElement, Element member, - Content tdSummary) { + Content content) { Content memberLink = writer.getDocLink(context, typeElement , member, name(member), HtmlStyle.memberNameLink); - Content code = HtmlTree.CODE(memberLink); - tdSummary.add(code); + var code = HtmlTree.CODE(memberLink); + content.add(code); } @Override - protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) { - linksTree.add( + protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content target) { + target.add( writer.getDocLink(HtmlLinkInfo.Kind.MEMBER, typeElement, member, name(member))); } @Override - protected void addSummaryType(Element member, Content tdSummaryType) { - addModifierAndType(member, utils.asInstantiatedFieldType(typeElement, (VariableElement)member), tdSummaryType); + protected void addSummaryType(Element member, Content content) { + addModifiersAndType(member, utils.asInstantiatedFieldType(typeElement, (VariableElement)member), content); } @Override @@ -207,7 +202,7 @@ public class FieldWriterImpl extends AbstractMemberWriter } @Override - public Content getMemberTreeHeader(){ - return writer.getMemberTreeHeader(); + public Content getMemberHeader(){ + return writer.getMemberHeader(); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Headings.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Headings.java index 0aed442460edeb91d78b8154da07117b42ebda95..4725c8eb903110816a761a0e880abab38f39db76 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Headings.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Headings.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,11 +29,6 @@ import jdk.javadoc.internal.doclets.formats.html.markup.TagName; /** * Aliases for HTML heading tags (H1..H6) for different kinds of pages. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ class Headings { /** diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java index 11ed54c2d864f4eb9c6873b3533ea921a0194238..24406a4bb7e780d87c3287c65510b1bc8a7f83d6 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java @@ -46,11 +46,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; /** * Generate the Help File for the generated API documentation. The help file * contents are helpful for browsing the generated documentation. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class HelpWriter extends HtmlDocletWriter { @@ -117,8 +112,8 @@ public class HelpWriter extends HtmlDocletWriter { } /** - * Adds the help file contents from the resource file to the content tree. While adding the - * help file contents it also keeps track of user options. + * Adds the help file contents from the resource file to the content. + * While adding the help file contents it also keeps track of user options. * * The general organization is: *

      @@ -127,10 +122,10 @@ public class HelpWriter extends HtmlDocletWriter { *
    • Page-specific help *
    */ - protected void addHelpFileContents(Content contentTree) { - HtmlTree mainTOC = HtmlTree.UL(HtmlStyle.helpTOC); + protected void addHelpFileContents(Content content) { + var mainTOC = HtmlTree.UL(HtmlStyle.helpTOC); - contentTree.add(HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, + content.add(HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, getContent("doclet.help.main_heading"))) .add(mainTOC) .add(new HtmlTree(TagName.HR)) @@ -168,7 +163,7 @@ public class HelpWriter extends HtmlDocletWriter { Content content = new ContentBuilder(); Content navHeading = contents.getContent("doclet.help.navigation.head"); - HtmlTree navSection = HtmlTree.DIV(HtmlStyle.subTitle) + var navSection = HtmlTree.DIV(HtmlStyle.subTitle) .add(HtmlTree.HEADING(Headings.CONTENT_HEADING, navHeading).setId(HtmlIds.HELP_NAVIGATION)) .add(contents.getContent("doclet.help.navigation.intro", overviewLink)); if (options.createIndex()) { @@ -183,24 +178,24 @@ public class HelpWriter extends HtmlDocletWriter { } content.add(navSection); - HtmlTree subTOC = HtmlTree.UL(HtmlStyle.helpSubTOC); + var subTOC = HtmlTree.UL(HtmlStyle.helpSubTOC); HtmlTree section; // Search if (options.createIndex()) { section = newHelpSection(getContent("doclet.help.search.head"), subTOC, HtmlIds.HELP_SEARCH); - Content searchIntro = HtmlTree.P(getContent("doclet.help.search.intro")); - Content searchExamples = HtmlTree.UL(HtmlStyle.helpSectionList); + var searchIntro = HtmlTree.P(getContent("doclet.help.search.intro")); + var searchExamples = HtmlTree.UL(HtmlStyle.helpSectionList); for (String[] example : SEARCH_EXAMPLES) { searchExamples.add(HtmlTree.LI( getContent("doclet.help.search.example", HtmlTree.CODE(Text.of(example[0])), example[1]))); } - Content searchSpecLink = HtmlTree.A( + var searchSpecLink = HtmlTree.A( resources.getText("doclet.help.search.spec.url", configuration.getDocletVersion().feature()), getContent("doclet.help.search.spec.title")); - Content searchRefer = HtmlTree.P(getContent("doclet.help.search.refer", searchSpecLink)); + var searchRefer = HtmlTree.P(getContent("doclet.help.search.refer", searchSpecLink)); section.add(searchIntro) .add(searchExamples) .add(searchRefer); @@ -234,11 +229,11 @@ public class HelpWriter extends HtmlDocletWriter { */ private Content getPageKindSection(HtmlTree mainTOC) { Content pageKindsHeading = contents.getContent("doclet.help.page_kinds.head"); - HtmlTree pageKindsSection = HtmlTree.DIV(HtmlStyle.subTitle) + var pageKindsSection = HtmlTree.DIV(HtmlStyle.subTitle) .add(HtmlTree.HEADING(Headings.CONTENT_HEADING, pageKindsHeading).setId(HtmlIds.HELP_PAGES)) .add(contents.getContent("doclet.help.page_kinds.intro")); - HtmlTree subTOC = HtmlTree.UL(HtmlStyle.helpSubTOC); + var subTOC = HtmlTree.UL(HtmlStyle.helpSubTOC); HtmlTree section; @@ -256,7 +251,7 @@ public class HelpWriter extends HtmlDocletWriter { if (configuration.showModules) { section = newHelpSection(contents.moduleLabel, PageMode.MODULE, subTOC); Content moduleIntro = getContent("doclet.help.module.intro"); - Content modulePara = HtmlTree.P(moduleIntro); + var modulePara = HtmlTree.P(moduleIntro); section.add(modulePara) .add(newHelpSectionList( contents.packagesLabel, @@ -451,7 +446,7 @@ public class HelpWriter extends HtmlDocletWriter { } private HtmlTree newHelpSectionList(Content first, Content... rest) { - HtmlTree list = HtmlTree.UL(HtmlStyle.helpSectionList, HtmlTree.LI(first)); + var list = HtmlTree.UL(HtmlStyle.helpSectionList, HtmlTree.LI(first)); List.of(rest).forEach(i -> list.add(HtmlTree.LI(i))); return list; } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java index a11ad5db0446d0d9d7fad9d113a4540736bd1e7e..d09f6c7d5a6f23e044a3e7e2de6cd4d777383ef5 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java @@ -76,11 +76,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.PreviewAPIListBuilder; * Also do the error checking on the options used. For example it is illegal to * use "-helpfile" option when already "-nohelp" option is used. *

    - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class HtmlConfiguration extends BaseConfiguration { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java index b33c39005447de519c637160a8e0dc87d7761039..a566cec31ae7bbc793429ac0a5c215d8591b357c 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,11 +58,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.PreviewAPIListBuilder; /** * The class with "start" method, calls individual Writers. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class HtmlDoclet extends AbstractDoclet { @@ -313,7 +308,7 @@ public class HtmlDoclet extends AbstractDoclet { private void copyJqueryFiles() throws DocletException { List files = Arrays.asList( - "jquery-3.5.1.min.js", + "jquery-3.6.0.min.js", "jquery-ui.min.js", "jquery-ui.min.css", "jquery-ui.structure.min.css", diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java index ac6d395cb25b761355ab0a61310acc131e95df29..1ec7b293677ccfecc9894f06f947a2671ee62666 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java @@ -26,7 +26,6 @@ package jdk.javadoc.internal.doclets.formats.html; import java.util.ArrayList; -import java.util.Collections; import java.util.Comparator; import java.util.EnumSet; import java.util.HashMap; @@ -126,11 +125,6 @@ import static jdk.javadoc.internal.doclets.toolkit.util.CommentHelper.SPACER; * Class for the Html Format Code Generation specific to JavaDoc. * This Class contains methods related to the Html Code Generation which * are used extensively while generating the entire documentation. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class HtmlDocletWriter { @@ -292,7 +286,7 @@ public class HtmlDocletWriter { * Add method information. * * @param method the method to be documented - * @param dl the content tree to which the method information will be added + * @param dl the content to which the method information will be added */ private void addMethodInfo(ExecutableElement method, Content dl) { TypeElement enclosing = utils.getEnclosingTypeElement(method); @@ -319,19 +313,19 @@ public class HtmlDocletWriter { * Adds the tags information. * * @param e the Element for which the tags will be generated - * @param htmlTree the documentation tree to which the tags will be added + * @param content the content to which the tags will be added */ - protected void addTagsInfo(Element e, Content htmlTree) { + protected void addTagsInfo(Element e, Content content) { if (options.noComment()) { return; } - HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); - if (utils.isExecutableElement(e) && !utils.isConstructor(e)) { + var dl = HtmlTree.DL(HtmlStyle.notes); + if (utils.isMethod(e)) { addMethodInfo((ExecutableElement)e, dl); } Content output = getBlockTagOutput(e); dl.add(output); - htmlTree.add(dl); + content.add(dl); } /** @@ -390,7 +384,7 @@ public class HtmlDocletWriter { /** * Returns a TagletWriter that knows how to write HTML. * - * @param context the enclosing context for the trees + * @param context the enclosing context * @return a TagletWriter */ public TagletWriter getTagletWriterInstance(TagletWriterImpl.Context context) { @@ -411,7 +405,7 @@ public class HtmlDocletWriter { String description, Content body) throws DocFileIOException { - printHtmlDocument(metakeywords, description, new ContentBuilder(), Collections.emptyList(), body); + printHtmlDocument(metakeywords, description, new ContentBuilder(), List.of(), body); } /** @@ -485,7 +479,7 @@ public class HtmlDocletWriter { /** * Returns a {@code

    } element, containing the user "top" text, if any, - * amd the main navigation bar. + * and the main navigation bar. * * @param pageMode the pageMode used to configure the navigation bar * @@ -497,7 +491,7 @@ public class HtmlDocletWriter { /** * Returns a {@code
    } element, containing the user "top" text, if any, - * amd the main navigation bar. + * and the main navigation bar. * * @param pageMode the page mode used to configure the navigation bar * @param element the element used to configure the navigation bar @@ -542,24 +536,24 @@ public class HtmlDocletWriter { } /** - * Get the overview tree link for the main tree. + * {@return an "overview tree" link for a navigation bar} * * @param label the label for the link - * @return a content tree for the link */ - protected Content getNavLinkMainTree(String label) { - Content mainTreeContent = links.createLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE), + protected Content getNavLinkToOverviewTree(String label) { + Content link = links.createLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE), Text.of(label)); - return HtmlTree.LI(mainTreeContent); + return HtmlTree.LI(link); } /** - * Returns a content object containing the package name. A localized content object is - * returned for an unnamed package. Use {@link Utils#getPackageName(PackageElement)} to - * get a static string for the unnamed package instead. + * {@return a package name} + * + * A localized name is returned for an unnamed package. + * Use {@link Utils#getPackageName(PackageElement)} to get a static string + * for the unnamed package instead. * - * @param packageElement the package to check - * @return package name content + * @param packageElement the package to get the name for */ public Content getLocalizedPackageName(PackageElement packageElement) { return packageElement == null || packageElement.isUnnamed() @@ -601,11 +595,10 @@ public class HtmlDocletWriter { } /** - * Return the link to the given package. + * {@return the link to the given package} * * @param packageElement the package to link to. * @param label the label for the link. - * @return a content tree for the package link. */ public Content getPackageLink(PackageElement packageElement, Content label) { boolean included = packageElement != null && utils.isIncluded(packageElement); @@ -650,11 +643,10 @@ public class HtmlDocletWriter { } /** - * Get Module link. + * {@return a link to module} * * @param mdle the module being documented * @param label tag for the link - * @return a content for the module link */ public Content getModuleLink(ModuleElement mdle, Content label) { Set flags = mdle != null ? utils.elementFlags(mdle) @@ -682,13 +674,13 @@ public class HtmlDocletWriter { } /** - * Add the link to the content tree. + * Add the link to the content. * * @param element program element for which the link will be added * @param label label for the link - * @param htmltree the content tree to which the link will be added + * @param target the content to which the link will be added */ - public void addSrcLink(Element element, Content label, Content htmltree) { + public void addSrcLink(Element element, Content label, Content target) { if (element == null) { return; } @@ -703,9 +695,9 @@ public class HtmlDocletWriter { .resolve(docPaths.forClass(te)); Content content = links.createLink(href .fragment(SourceToHTMLConverter.getAnchorName(utils, element).name()), label, ""); - htmltree.add(content); + target.add(content); } else { - htmltree.add(label); + target.add(label); } } @@ -783,11 +775,10 @@ public class HtmlDocletWriter { } /** - * Get the class link. + * {@return a link to the given class} * * @param context the id of the context where the link will be added - * @param element to link to - * @return a content tree for the link + * @param element the class to link to */ public Content getQualifiedClassLink(HtmlLinkInfo.Kind context, Element element) { HtmlLinkInfo htmlLinkInfo = new HtmlLinkInfo(configuration, context, (TypeElement)element); @@ -795,14 +786,14 @@ public class HtmlDocletWriter { } /** - * Add the class link. + * Adds a link to the given class. * * @param context the id of the context where the link will be added - * @param typeElement to link to - * @param contentTree the content tree to which the link will be added + * @param typeElement the class to link to + * @param target the content to which the link will be added */ - public void addPreQualifiedClassLink(HtmlLinkInfo.Kind context, TypeElement typeElement, Content contentTree) { - addPreQualifiedClassLink(context, typeElement, null, contentTree); + public void addPreQualifiedClassLink(HtmlLinkInfo.Kind context, TypeElement typeElement, Content target) { + addPreQualifiedClassLink(context, typeElement, null, target); } /** @@ -832,19 +823,19 @@ public class HtmlDocletWriter { * @param context the id of the context where the link will be added * @param typeElement the class to link to * @param style optional style for the link - * @param contentTree the content tree to which the link with be added + * @param target the content to which the link with be added */ public void addPreQualifiedClassLink(HtmlLinkInfo.Kind context, - TypeElement typeElement, HtmlStyle style, Content contentTree) { + TypeElement typeElement, HtmlStyle style, Content target) { PackageElement pkg = utils.containingPackage(typeElement); if(pkg != null && ! configuration.shouldExcludeQualifier(pkg.getSimpleName().toString())) { - contentTree.add(getEnclosingPackageName(typeElement)); + target.add(getEnclosingPackageName(typeElement)); } HtmlLinkInfo linkinfo = new HtmlLinkInfo(configuration, context, typeElement) .label(utils.getSimpleName(typeElement)) .style(style); Content link = getLink(linkinfo); - contentTree.add(link); + target.add(link); } /** @@ -874,19 +865,18 @@ public class HtmlDocletWriter { * * @param context the id of the context where the link will be added * @param typeElement the class to link to - * @param contentTree the content tree to which the link with be added + * @param content the content to which the link with be added */ - public void addPreQualifiedStrongClassLink(HtmlLinkInfo.Kind context, TypeElement typeElement, Content contentTree) { - addPreQualifiedClassLink(context, typeElement, HtmlStyle.typeNameLink, contentTree); + public void addPreQualifiedStrongClassLink(HtmlLinkInfo.Kind context, TypeElement typeElement, Content content) { + addPreQualifiedClassLink(context, typeElement, HtmlStyle.typeNameLink, content); } /** - * Get the link for the given member. + * {@return a link to the given member} * * @param context the id of the context where the link will be added * @param element the member being linked to * @param label the label for the link - * @return a content tree for the element link */ public Content getDocLink(HtmlLinkInfo.Kind context, Element element, CharSequence label) { return getDocLink(context, utils.getEnclosingTypeElement(element), element, @@ -1284,21 +1274,21 @@ public class HtmlDocletWriter { * * @param element the Element for which the inline comment will be added * @param tag the inline tag to be added - * @param htmltree the content tree to which the comment will be added + * @param target the content to which the comment will be added */ - public void addInlineComment(Element element, DocTree tag, Content htmltree) { + public void addInlineComment(Element element, DocTree tag, Content target) { CommentHelper ch = utils.getCommentHelper(element); List description = ch.getDescription(tag); - addCommentTags(element, description, false, false, false, htmltree); + addCommentTags(element, description, false, false, false, target); } /** - * Get the deprecated phrase as content. + * {@return a phrase describing the type of deprecation} * * @param e the Element for which the inline deprecated comment will be added - * @return a content tree for the deprecated phrase. */ public Content getDeprecatedPhrase(Element e) { + // TODO e should be checked to being deprecated return (utils.isDeprecatedForRemoval(e)) ? contents.deprecatedForRemovalPhrase : contents.deprecatedPhrase; @@ -1309,21 +1299,21 @@ public class HtmlDocletWriter { * * @param e the Element for which the inline deprecated comment will be added * @param tag the inline tag to be added - * @param htmltree the content tree to which the comment will be added + * @param target the content to which the comment will be added */ - public void addInlineDeprecatedComment(Element e, DeprecatedTree tag, Content htmltree) { + public void addInlineDeprecatedComment(Element e, DeprecatedTree tag, Content target) { CommentHelper ch = utils.getCommentHelper(e); - addCommentTags(e, ch.getBody(tag), true, false, false, htmltree); + addCommentTags(e, ch.getBody(tag), true, false, false, target); } /** * Adds the summary content. * * @param element the Element for which the summary will be generated - * @param htmltree the documentation tree to which the summary will be added + * @param target the content to which the summary will be added */ - public void addSummaryComment(Element element, Content htmltree) { - addSummaryComment(element, utils.getFirstSentenceTrees(element), htmltree); + public void addSummaryComment(Element element, Content target) { + addSummaryComment(element, utils.getFirstSentenceTrees(element), target); } /** @@ -1331,10 +1321,10 @@ public class HtmlDocletWriter { * * @param element the Element for which the summary will be generated * @param firstSentenceTags the first sentence tags for the doc - * @param htmltree the documentation tree to which the summary will be added + * @param target the content to which the summary will be added */ - public void addPreviewComment(Element element, List firstSentenceTags, Content htmltree) { - addCommentTags(element, firstSentenceTags, false, true, true, htmltree); + public void addPreviewComment(Element element, List firstSentenceTags, Content target) { + addCommentTags(element, firstSentenceTags, false, true, true, target); } /** @@ -1342,26 +1332,26 @@ public class HtmlDocletWriter { * * @param element the Element for which the summary will be generated * @param firstSentenceTags the first sentence tags for the doc - * @param htmltree the documentation tree to which the summary will be added + * @param target the content to which the summary will be added */ - public void addSummaryComment(Element element, List firstSentenceTags, Content htmltree) { - addCommentTags(element, firstSentenceTags, false, true, true, htmltree); + public void addSummaryComment(Element element, List firstSentenceTags, Content target) { + addCommentTags(element, firstSentenceTags, false, true, true, target); } - public void addSummaryDeprecatedComment(Element element, DeprecatedTree tag, Content htmltree) { + public void addSummaryDeprecatedComment(Element element, DeprecatedTree tag, Content target) { CommentHelper ch = utils.getCommentHelper(element); List body = ch.getBody(tag); - addCommentTags(element, ch.getFirstSentenceTrees(body), true, true, true, htmltree); + addCommentTags(element, ch.getFirstSentenceTrees(body), true, true, true, target); } /** * Adds the full-body content of the given element. * * @param element the element for which the content will be added - * @param htmltree the documentation tree to which the content will be added + * @param target the content to which the content will be added */ - public void addInlineComment(Element element, Content htmltree) { - addCommentTags(element, utils.getFullBody(element), false, false, false, htmltree); + public void addInlineComment(Element element, Content target) { + addCommentTags(element, utils.getFullBody(element), false, false, false, target); } /** @@ -1372,10 +1362,10 @@ public class HtmlDocletWriter { * @param depr true if it is deprecated * @param first true if the first sentence tags should be added * @param inSummary true if the comment tags are added into the summary section - * @param htmltree the documentation tree to which the comment tags will be added + * @param target the content to which the comment tags will be added */ private void addCommentTags(Element element, List tags, boolean depr, - boolean first, boolean inSummary, Content htmltree) { + boolean first, boolean inSummary, Content target) { if (options.noComment()) { return; } @@ -1383,13 +1373,13 @@ public class HtmlDocletWriter { Content result = commentTagsToContent(null, element, tags, first, inSummary); if (depr) { div = HtmlTree.DIV(HtmlStyle.deprecationComment, result); - htmltree.add(div); + target.add(div); } else { div = HtmlTree.DIV(HtmlStyle.block, result); - htmltree.add(div); + target.add(div); } if (tags.isEmpty()) { - htmltree.add(Entity.NO_BREAK_SPACE); + target.add(Entity.NO_BREAK_SPACE); } } @@ -1907,35 +1897,33 @@ public class HtmlDocletWriter { } /** - * Return a content tree containing the annotation types for the given element. + * {@return the annotation types info for the given element} * * @param element an Element * @param lineBreak if true add new line between each member value - * @return the documentation tree containing the annotation info */ Content getAnnotationInfo(Element element, boolean lineBreak) { return getAnnotationInfo(element.getAnnotationMirrors(), lineBreak); } /** - * Return a content tree containing the annotation types for the given element. + * {@return the description for the given annotations} * * @param descList a list of annotation mirrors * @param lineBreak if true add new line between each member value - * @return the documentation tree containing the annotation info */ Content getAnnotationInfo(List descList, boolean lineBreak) { List annotations = getAnnotations(descList, lineBreak); String sep = ""; - ContentBuilder builder = new ContentBuilder(); + ContentBuilder result = new ContentBuilder(); for (Content annotation: annotations) { - builder.add(sep); - builder.add(annotation); + result.add(sep); + result.add(annotation); if (!lineBreak) { sep = " "; } } - return builder; + return result; } /** @@ -2249,19 +2237,19 @@ public class HtmlDocletWriter { } /** - * Returns an HtmlTree for the BODY tag. + * Returns an HtmlTree for the BODY element. * * @param title title for the window * @return an HtmlTree for the BODY tag */ public HtmlTree getBody(String title) { - HtmlTree body = new HtmlTree(TagName.BODY).setStyle(getBodyStyle()); + var body = new HtmlTree(TagName.BODY).setStyle(getBodyStyle()); this.winTitle = title; // Don't print windowtitle script for overview-frame, allclasses-frame // and package-frame body.add(mainBodyScript.asContent()); - Content noScript = HtmlTree.NOSCRIPT(HtmlTree.DIV(contents.noScriptMessage)); + var noScript = HtmlTree.NOSCRIPT(HtmlTree.DIV(contents.noScriptMessage)); body.add(noScript); return body; } @@ -2328,7 +2316,7 @@ public class HtmlDocletWriter { public void addPreviewSummary(Element forWhat, Content target) { if (utils.isPreviewAPI(forWhat)) { - Content div = HtmlTree.DIV(HtmlStyle.block); + var div = HtmlTree.DIV(HtmlStyle.block); div.add(HtmlTree.SPAN(HtmlStyle.previewLabel, contents.previewPhrase)); target.add(div); } @@ -2337,7 +2325,7 @@ public class HtmlDocletWriter { public void addPreviewInfo(Element forWhat, Content target) { if (utils.isPreviewAPI(forWhat)) { //in Java platform: - HtmlTree previewDiv = HtmlTree.DIV(HtmlStyle.previewBlock); + var previewDiv = HtmlTree.DIV(HtmlStyle.previewBlock); previewDiv.setId(htmlIds.forPreviewSection(forWhat)); String name = (switch (forWhat.getKind()) { case PACKAGE, MODULE -> @@ -2346,7 +2334,7 @@ public class HtmlDocletWriter { ((TypeElement) forWhat.getEnclosingElement()).getSimpleName(); default -> forWhat.getSimpleName(); }).toString(); - Content nameCode = HtmlTree.CODE(Text.of(name)); + var nameCode = HtmlTree.CODE(Text.of(name)); boolean isReflectivePreview = utils.isReflectivePreviewAPI(forWhat); String leadingNoteKey = !isReflectivePreview ? "doclet.PreviewPlatformLeadingNote" @@ -2367,13 +2355,13 @@ public class HtmlDocletWriter { List previewNotes = getPreviewNotes((TypeElement) forWhat); if (!previewNotes.isEmpty()) { Name name = forWhat.getSimpleName(); - Content nameCode = HtmlTree.CODE(Text.of(name)); - HtmlTree previewDiv = HtmlTree.DIV(HtmlStyle.previewBlock); + var nameCode = HtmlTree.CODE(Text.of(name)); + var previewDiv = HtmlTree.DIV(HtmlStyle.previewBlock); previewDiv.setId(htmlIds.forPreviewSection(forWhat)); Content leadingNote = contents.getContent("doclet.PreviewLeadingNote", nameCode); previewDiv.add(HtmlTree.SPAN(HtmlStyle.previewLabel, leadingNote)); - HtmlTree ul = HtmlTree.UL(HtmlStyle.previewComment); + var ul = HtmlTree.UL(HtmlStyle.previewComment); for (Content note : previewNotes) { ul.add(HtmlTree.LI(note)); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlIndexBuilder.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlIndexBuilder.java index bf50e696c4897193b41ff56f117429c9266caf9f..604bcf434ee815b0bf327a733bb6fbad18fef9ab 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlIndexBuilder.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlIndexBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,11 +50,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.Utils; * in index items: {@code containingModule}, {@code containingPackage}, * {@code containingClass}, and {@code url}, and to write out the * JavaScript files. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class HtmlIndexBuilder extends IndexBuilder { private final HtmlConfiguration configuration; diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java index 3956987baa9f8beeaaba1893aa4ae2554b6a189c..19e2208705038b7c22d9a161e66819bbd56b3967 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java @@ -51,11 +51,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.links.LinkInfo; /** * A factory that returns a link given the information about it. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class HtmlLinkFactory extends LinkFactory { @@ -258,10 +253,10 @@ public class HtmlLinkFactory extends LinkFactory { if (isTypeLink) { return resources.getText("doclet.Href_Type_Param_Title", utils.getSimpleName(typeElement)); - } else if (utils.isInterface(typeElement)){ + } else if (utils.isPlainInterface(typeElement)){ return resources.getText("doclet.Href_Interface_Title", m_writer.getLocalizedPackageName(utils.containingPackage(typeElement))); - } else if (utils.isAnnotationType(typeElement)) { + } else if (utils.isAnnotationInterface(typeElement)) { return resources.getText("doclet.Href_Annotation_Title", m_writer.getLocalizedPackageName(utils.containingPackage(typeElement))); } else if (utils.isEnum(typeElement)) { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkInfo.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkInfo.java index 9b15968040d7f50b03f8fc9bd1ea27b8076eff7b..2d4508c22903aabd39597bf1bc6cb7d2c9e5f0c1 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkInfo.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,10 +39,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.links.LinkInfo; /** - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class HtmlLinkInfo extends LinkInfo { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java index 7278ac8e3155a030914e5c3e29a23a79f92ea423..5963b76bac54103c1284935e52b24b627b612240 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,11 +47,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper; * Generate serialized form for serializable fields. * Documentation denoted by the tags serial and * serialField is processed. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class HtmlSerialFieldWriter extends FieldWriterImpl implements SerializedFormWriter.SerialFieldWriter { @@ -64,86 +59,67 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl return utils.serializableFields(te); } - /** - * Return the header for serializable fields section. - * - * @return a content tree for the header - */ @Override public Content getSerializableFieldsHeader() { return HtmlTree.UL(HtmlStyle.blockList); } - /** - * Return the header for serializable fields content section. - * - * @param isLastContent true if the content being documented is the last content. - * @return a content tree for the header - */ @Override public Content getFieldsContentHeader(boolean isLastContent) { return new HtmlTree(TagName.LI).setStyle(HtmlStyle.blockList); } - /** - * Add serializable fields. - * - * @param heading the heading for the section - * @param serializableFieldsTree the tree to be added to the serializable fields - * content tree - * @return a content tree for the serializable fields content - */ @Override - public Content getSerializableFields(String heading, Content serializableFieldsTree) { - HtmlTree section = HtmlTree.SECTION(HtmlStyle.detail); - if (serializableFieldsTree.isValid()) { + public Content getSerializableFields(String heading, Content source) { + var section = HtmlTree.SECTION(HtmlStyle.detail); + if (source.isValid()) { Content headingContent = Text.of(heading); - Content serialHeading = HtmlTree.HEADING(Headings.SerializedForm.CLASS_SUBHEADING, headingContent); + var serialHeading = HtmlTree.HEADING(Headings.SerializedForm.CLASS_SUBHEADING, headingContent); section.add(serialHeading); - section.add(serializableFieldsTree); + section.add(source); } return HtmlTree.LI(section); } @Override - public void addMemberHeader(TypeMirror fieldType, String fieldName, Content contentTree) { + public void addMemberHeader(TypeMirror fieldType, String fieldName, Content content) { Content nameContent = Text.of(fieldName); - Content heading = HtmlTree.HEADING(Headings.SerializedForm.MEMBER_HEADING, nameContent); - contentTree.add(heading); - Content pre = new HtmlTree(TagName.PRE); + var heading = HtmlTree.HEADING(Headings.SerializedForm.MEMBER_HEADING, nameContent); + content.add(heading); + var pre = new HtmlTree(TagName.PRE); Content fieldContent = writer.getLink(new HtmlLinkInfo( configuration, HtmlLinkInfo.Kind.SERIAL_MEMBER, fieldType)); pre.add(fieldContent); pre.add(" "); pre.add(fieldName); - contentTree.add(pre); + content.add(pre); } /** * Add the deprecated information for this member. * * @param field the field to document. - * @param contentTree the tree to which the deprecated info will be added + * @param content the content to which the deprecated info will be added */ @Override - public void addMemberDeprecatedInfo(VariableElement field, Content contentTree) { - addDeprecatedInfo(field, contentTree); + public void addMemberDeprecatedInfo(VariableElement field, Content content) { + addDeprecatedInfo(field, content); } /** * Add the description text for this member. * * @param field the field to document. - * @param contentTree the tree to which the deprecated info will be added + * @param content the content to which the deprecated info will be added */ @Override - public void addMemberDescription(VariableElement field, Content contentTree) { + public void addMemberDescription(VariableElement field, Content content) { if (!utils.getFullBody(field).isEmpty()) { - writer.addInlineComment(field, contentTree); + writer.addInlineComment(field, content); } List tags = utils.getSerialTrees(field); if (!tags.isEmpty() && !tags.get(0).getDescription().isEmpty()) { - writer.addInlineComment(field, tags.get(0), contentTree); + writer.addInlineComment(field, tags.get(0), content); } } @@ -151,16 +127,16 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl * Add the description text for this member represented by the tag. * * @param serialFieldTag the field to document (represented by tag) - * @param contentTree the tree to which the deprecated info will be added + * @param content the content to which the deprecated info will be added */ @Override - public void addMemberDescription(VariableElement field, DocTree serialFieldTag, Content contentTree) { + public void addMemberDescription(VariableElement field, DocTree serialFieldTag, Content content) { CommentHelper ch = utils.getCommentHelper(field); List description = ch.getDescription(serialFieldTag); if (!description.isEmpty()) { Content serialFieldContent = new RawHtml(ch.getText(description)); - Content div = HtmlTree.DIV(HtmlStyle.block, serialFieldContent); - contentTree.add(div); + var div = HtmlTree.DIV(HtmlStyle.block, serialFieldContent); + content.add(div); } } @@ -168,15 +144,15 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl * Add the tag information for this member. * * @param field the field to document. - * @param contentTree the tree to which the member tags info will be added + * @param content the content to which the member tags info will be added */ @Override - public void addMemberTags(VariableElement field, Content contentTree) { + public void addMemberTags(VariableElement field, Content content) { Content tagContent = writer.getBlockTagOutput(field); if (!tagContent.isEmpty()) { - HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); + var dl = HtmlTree.DL(HtmlStyle.notes); dl.add(tagContent); - contentTree.add(dl); + content.add(dl); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java index 8b2bed47a00593cba96ab8b275e7a7b9ae1b13e8..8c0c41eaeb504a64ca35baa6220c7de1644e463d 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java @@ -40,11 +40,6 @@ import jdk.javadoc.internal.doclets.toolkit.taglets.TagletManager; /** * Generate serialized form for Serializable/Externalizable methods. * Documentation denoted by the serialData tag is processed. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class HtmlSerialMethodWriter extends MethodWriterImpl implements SerializedFormWriter.SerialMethodWriter { @@ -53,22 +48,11 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements super(writer, typeElement); } - /** - * Return the header for serializable methods section. - * - * @return a content tree for the header - */ @Override public Content getSerializableMethodsHeader() { return HtmlTree.UL(HtmlStyle.blockList); } - /** - * Return the header for serializable methods content section. - * - * @param isLastContent true if the content being documented is the last content. - * @return a content tree for the header - */ @Override public Content getMethodsContentHeader(boolean isLastContent) { return new HtmlTree(TagName.LI); @@ -78,16 +62,16 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements * Add serializable methods. * * @param heading the heading for the section - * @param serializableMethodContent the tree to be added to the serializable methods - * content tree - * @return a content tree for the serializable methods content + * @param source the content to be added to the serializable methods + * content + * @return a content for the serializable methods content */ @Override - public Content getSerializableMethods(String heading, Content serializableMethodContent) { + public Content getSerializableMethods(String heading, Content source) { Content headingContent = Text.of(heading); - Content serialHeading = HtmlTree.HEADING(Headings.SerializedForm.CLASS_SUBHEADING, headingContent); - Content section = HtmlTree.SECTION(HtmlStyle.detail, serialHeading); - section.add(serializableMethodContent); + var serialHeading = HtmlTree.HEADING(Headings.SerializedForm.CLASS_SUBHEADING, headingContent); + var section = HtmlTree.SECTION(HtmlStyle.detail, serialHeading); + section.add(source); return HtmlTree.LI(section); } @@ -106,51 +90,51 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements * Add the member header. * * @param member the method document to be listed - * @param methodsContentTree the content tree to which the member header will be added + * @param methodsContent the content to which the member header will be added */ @Override - public void addMemberHeader(ExecutableElement member, Content methodsContentTree) { + public void addMemberHeader(ExecutableElement member, Content methodsContent) { Content memberContent = Text.of(name(member)); - Content heading = HtmlTree.HEADING(Headings.SerializedForm.MEMBER_HEADING, memberContent); - methodsContentTree.add(heading); - methodsContentTree.add(getSignature(member)); + var heading = HtmlTree.HEADING(Headings.SerializedForm.MEMBER_HEADING, memberContent); + methodsContent.add(heading); + methodsContent.add(getSignature(member)); } /** * Add the deprecated information for this member. * * @param member the method to document. - * @param methodsContentTree the tree to which the deprecated info will be added + * @param methodsContent the content to which the deprecated info will be added */ @Override - public void addDeprecatedMemberInfo(ExecutableElement member, Content methodsContentTree) { - addDeprecatedInfo(member, methodsContentTree); + public void addDeprecatedMemberInfo(ExecutableElement member, Content methodsContent) { + addDeprecatedInfo(member, methodsContent); } /** * Add the description text for this member. * * @param member the method to document. - * @param methodsContentTree the tree to which the deprecated info will be added + * @param methodsContent the content to which the deprecated info will be added */ @Override - public void addMemberDescription(ExecutableElement member, Content methodsContentTree) { - addComment(member, methodsContentTree); + public void addMemberDescription(ExecutableElement member, Content methodsContent) { + addComment(member, methodsContent); } /** * Add the tag information for this member. * * @param member the method to document. - * @param methodsContentTree the tree to which the member tags info will be added + * @param methodsContent the content to which the member tags info will be added */ @Override - public void addMemberTags(ExecutableElement member, Content methodsContentTree) { + public void addMemberTags(ExecutableElement member, Content methodsContent) { TagletManager tagletManager = configuration.tagletManager; Content tagContent = writer.getBlockTagOutput(member, tagletManager.getSerializedFormTaglets()); - HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); + var dl = HtmlTree.DL(HtmlStyle.notes); dl.add(tagContent); - methodsContentTree.add(dl); + methodsContent.add(dl); if (name(member).equals("writeExternal") && utils.getSerialDataTrees(member).isEmpty()) { serialWarning(member, "doclet.MissingSerialDataTag", diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java index 299e565a65782735981e105330e9a7a8ee329675..976b78ad23b86144584e56ecc7c834ed03986172 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java @@ -25,7 +25,7 @@ package jdk.javadoc.internal.doclets.formats.html; -import java.util.Collections; +import java.util.List; import jdk.javadoc.internal.doclets.formats.html.markup.Head; import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; @@ -78,7 +78,7 @@ public class IndexRedirectWriter extends HtmlDocletWriter { .setTimestamp(!options.noTimestamp()) .setDescription("index redirect") .setGenerator(getGenerator(getClass())) - .setStylesheets(configuration.getMainStylesheet(), Collections.emptyList()) // avoid reference to default stylesheet + .setStylesheets(configuration.getMainStylesheet(), List.of()) // avoid reference to default stylesheet .addDefaultScript(false); String title = (options.windowTitle().length() > 0) @@ -93,7 +93,7 @@ public class IndexRedirectWriter extends HtmlDocletWriter { Script script = new Script("window.location.replace(") .appendStringLiteral(targetPath, '\'') .append(")"); - HtmlTree metaRefresh = new HtmlTree(TagName.META) + var metaRefresh = new HtmlTree(TagName.META) .put(HtmlAttr.HTTP_EQUIV, "Refresh") .put(HtmlAttr.CONTENT, "0;" + targetPath); head.addContent(script.asContent(), HtmlTree.NOSCRIPT(metaRefresh)); @@ -104,8 +104,8 @@ public class IndexRedirectWriter extends HtmlDocletWriter { bodyContent.add(HtmlTree.P(HtmlTree.A(targetPath, Text.of(targetPath)))); - Content body = new HtmlTree(TagName.BODY).setStyle(HtmlStyle.indexRedirectPage); - HtmlTree main = HtmlTree.MAIN(bodyContent); + var body = new HtmlTree(TagName.BODY).setStyle(HtmlStyle.indexRedirectPage); + var main = HtmlTree.MAIN(bodyContent); body.add(main); HtmlDocument htmlDocument = new HtmlDocument( diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexWriter.java index 9e486b74ab9af8a8021a9ee8a75eccb2ad31d728..28f1a21a4b372ed71c6f9a0a07752f647c782363 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexWriter.java @@ -59,11 +59,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.IndexItem; * documented elements, terms defined in some documentation comments, * and summary pages. * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - * * @see IndexBuilder */ public class IndexWriter extends HtmlDocletWriter { @@ -144,31 +139,31 @@ public class IndexWriter extends HtmlDocletWriter { /** * Adds a set of items to the page. * - * @param ch the first character of the names of the items - * @param items the items - * @param contentTree the tree to which to add the items + * @param ch the first character of the names of the items + * @param items the items + * @param content the content to which to add the items */ - protected void addContents(char ch, SortedSet items, Content contentTree) { - addHeading(ch, contentTree); + protected void addContents(char ch, SortedSet items, Content content) { + addHeading(ch, content); - HtmlTree dl = HtmlTree.DL(HtmlStyle.index); + var dl = HtmlTree.DL(HtmlStyle.index); for (IndexItem item : items) { addDescription(item, dl); } - contentTree.add(dl); + content.add(dl); } /** * Adds a heading containing the first character for a set of items. * - * @param ch the first character of the names of the items - * @param contentTree the tree to which to add the items + * @param ch the first character of the names of the items + * @param content the content to which to add the items */ - protected void addHeading(char ch, Content contentTree) { + protected void addHeading(char ch, Content content) { Content headContent = Text.of(String.valueOf(ch)); - HtmlTree heading = HtmlTree.HEADING(Headings.CONTENT_HEADING, HtmlStyle.title, headContent) + var heading = HtmlTree.HEADING(Headings.CONTENT_HEADING, HtmlStyle.title, headContent) .setId(HtmlIds.forIndexChar(ch)); - contentTree.add(heading); + content.add(heading); } /** @@ -189,9 +184,9 @@ public class IndexWriter extends HtmlDocletWriter { * Add one line summary comment for the item. * * @param item the item to be documented - * @param dlTree the content tree to which the description will be added + * @param target the content to which the description will be added */ - protected void addElementDescription(IndexItem item, Content dlTree) { + protected void addElementDescription(IndexItem item, Content target) { Content dt; Element element = item.getElement(); String label = item.getLabel(); @@ -234,24 +229,24 @@ public class IndexWriter extends HtmlDocletWriter { default: throw new Error(); } - dlTree.add(dt); - Content dd = new HtmlTree(TagName.DD); + target.add(dt); + var dd = new HtmlTree(TagName.DD); if (element.getKind() == ElementKind.MODULE || element.getKind() == ElementKind.PACKAGE) { addSummaryComment(element, dd); } else { addComment(element, dd); } - dlTree.add(dd); + target.add(dd); } /** * Adds information for the given type element. * - * @param te the element - * @param contentTree the content tree to which the class info will be added + * @param te the element + * @param content the content to which the class info will be added */ - protected void addClassInfo(TypeElement te, Content contentTree) { - contentTree.add(contents.getContent("doclet.in", + protected void addClassInfo(TypeElement te, Content content) { + content.add(contents.getContent("doclet.in", utils.getTypeElementKindName(te, false), getPackageLink(utils.containingPackage(te), getLocalizedPackageName(utils.containingPackage(te))) @@ -262,23 +257,23 @@ public class IndexWriter extends HtmlDocletWriter { * Adds a description for an item found in a documentation comment. * * @param item the item - * @param dlTree the list to which to add the description + * @param target the list to which to add the description */ - protected void addTagDescription(IndexItem item, Content dlTree) { + protected void addTagDescription(IndexItem item, Content target) { String itemPath = pathToRoot.isEmpty() ? "" : pathToRoot.getPath() + "/"; itemPath += item.getUrl(); - HtmlTree labelLink = HtmlTree.A(itemPath, Text.of(item.getLabel())); - Content dt = HtmlTree.DT(labelLink.setStyle(HtmlStyle.searchTagLink)); + var labelLink = HtmlTree.A(itemPath, Text.of(item.getLabel())); + var dt = HtmlTree.DT(labelLink.setStyle(HtmlStyle.searchTagLink)); dt.add(" - "); dt.add(contents.getContent("doclet.Search_tag_in", item.getHolder())); - dlTree.add(dt); - Content dd = new HtmlTree(TagName.DD); + target.add(dt); + var dd = new HtmlTree(TagName.DD); if (item.getDescription().isEmpty()) { dd.add(Entity.NO_BREAK_SPACE); } else { dd.add(item.getDescription()); } - dlTree.add(dd); + target.add(dd); } /** @@ -288,39 +283,39 @@ public class IndexWriter extends HtmlDocletWriter { * the start and then print the normal comment. * * @param element the element - * @param contentTree the content tree to which the comment will be added + * @param content the content to which the comment will be added */ - protected void addComment(Element element, Content contentTree) { - Content span = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(element)); - HtmlTree div = HtmlTree.DIV(HtmlStyle.deprecationBlock); + protected void addComment(Element element, Content content) { + var span = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(element)); + var div = HtmlTree.DIV(HtmlStyle.deprecationBlock); if (utils.isDeprecated(element)) { div.add(span); List tags = utils.getDeprecatedTrees(element); if (!tags.isEmpty()) addInlineDeprecatedComment(element, tags.get(0), div); - contentTree.add(div); + content.add(div); } else { TypeElement encl = utils.getEnclosingTypeElement(element); while (encl != null) { if (utils.isDeprecated(encl)) { div.add(span); - contentTree.add(div); + content.add(div); break; } encl = utils.getEnclosingTypeElement(encl); } - addSummaryComment(element, contentTree); + addSummaryComment(element, content); } } /** * Adds a description for a member element. * - * @param member the element - * @param enclosing the enclosing type element - * @param contentTree the content tree to which the member description will be added + * @param member the element + * @param enclosing the enclosing type element + * @param content the content to which the member description will be added */ - protected void addMemberDesc(Element member, TypeElement enclosing, Content contentTree) { + protected void addMemberDesc(Element member, TypeElement enclosing, Content content) { String kindName = utils.getTypeElementKindName(enclosing, true); String resource = switch (member.getKind()) { case ENUM_CONSTANT -> @@ -330,24 +325,24 @@ public class IndexWriter extends HtmlDocletWriter { case CONSTRUCTOR -> "doclet.Constructor_for"; case METHOD -> - utils.isAnnotationType(enclosing) ? "doclet.Element_in" + utils.isAnnotationInterface(enclosing) ? "doclet.Element_in" : utils.isStatic(member) ? "doclet.Static_method_in" : "doclet.Method_in"; case RECORD_COMPONENT -> "doclet.Record_component_in"; default -> throw new IllegalArgumentException(member.getKind().toString()); }; - contentTree.add(contents.getContent(resource, kindName)).add(" "); + content.add(contents.getContent(resource, kindName)).add(" "); addPreQualifiedClassLink(HtmlLinkInfo.Kind.INDEX, enclosing, - null, contentTree); + null, content); } /** * Add links for all the index files, based on the first character of the names of the items. * * @param allFirstCharacters the list of all first characters to be linked - * @param contentTree the content tree to which the links for indexes will be added + * @param content the content to which the links for indexes will be added */ - protected void addLinksForIndexes(List allFirstCharacters, Content contentTree) { + protected void addLinksForIndexes(List allFirstCharacters, Content content) { ListIterator iter = allFirstCharacters.listIterator(); while (iter.hasNext()) { char ch = iter.next(); @@ -355,11 +350,11 @@ public class IndexWriter extends HtmlDocletWriter { Content link = splitIndex ? links.createLink(DocPaths.indexN(iter.nextIndex()), label) : links.createLink(HtmlIds.forIndexChar(ch), label); - contentTree.add(link); - contentTree.add(Entity.NO_BREAK_SPACE); + content.add(link); + content.add(Entity.NO_BREAK_SPACE); } - contentTree.add(new HtmlTree(TagName.BR)); + content.add(new HtmlTree(TagName.BR)); List pageLinks = Stream.of(IndexItem.Category.values()) .flatMap(c -> mainIndex.getItems(c).stream()) .filter(i -> !(i.isElementItem() || i.isTagItem())) @@ -367,7 +362,7 @@ public class IndexWriter extends HtmlDocletWriter { .map(i -> links.createLink(pathToRoot.resolve(i.getUrl()), contents.getNonBreakString(i.getLabel()))) .toList(); - contentTree.add(contents.join(getVerticalSeparator(), pageLinks)); + content.add(contents.join(getVerticalSeparator(), pageLinks)); } private Content getVerticalSeparator() { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MarkerComments.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MarkerComments.java index af585b611f82d7530ff9c352e839dc2678b818cf..703b3b7131b6cb0781969408eaff0c6f5c2ff4fa 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MarkerComments.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MarkerComments.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,11 +29,6 @@ import jdk.javadoc.internal.doclets.formats.html.markup.Comment; /** * Marker comments to identify regions in the generated files. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class MarkerComments { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java index 9ba0a2222ea812b5cba6b4a452bbfaad6397b5db..8ccb46450b7da6b989279faa8da88f49bb31f34a 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,11 +47,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable; /** * Writes method documentation in HTML format. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class MethodWriterImpl extends AbstractExecutableMemberWriter implements MethodWriter, MemberSummaryWriter { @@ -76,11 +71,11 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter } @Override - public Content getMemberSummaryHeader(TypeElement typeElement, Content memberSummaryTree) { - memberSummaryTree.add(MarkerComments.START_OF_METHOD_SUMMARY); - Content memberTree = new ContentBuilder(); - writer.addSummaryHeader(this, memberTree); - return memberTree; + public Content getMemberSummaryHeader(TypeElement typeElement, Content target) { + target.add(MarkerComments.START_OF_METHOD_SUMMARY); + Content memberContent = new ContentBuilder(); + writer.addSummaryHeader(this, memberContent); + return memberContent; } @Override @@ -90,35 +85,29 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter } @Override - public Content getMethodDetailsTreeHeader(Content memberDetailsTree) { - memberDetailsTree.add(MarkerComments.START_OF_METHOD_DETAILS); - Content methodDetailsTree = new ContentBuilder(); - Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, + public Content getMethodDetailsHeader(Content content) { + content.add(MarkerComments.START_OF_METHOD_DETAILS); + Content methodDetailsContent = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, contents.methodDetailLabel); - methodDetailsTree.add(heading); - return methodDetailsTree; + methodDetailsContent.add(heading); + return methodDetailsContent; } @Override - public Content getMethodDocTreeHeader(ExecutableElement method) { - Content methodDocTree = new ContentBuilder(); - HtmlTree heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, + public Content getMethodHeader(ExecutableElement method) { + Content content = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, Text.of(name(method))); HtmlId erasureAnchor; if ((erasureAnchor = htmlIds.forErasure(method)) != null) { heading.setId(erasureAnchor); } - methodDocTree.add(heading); - return HtmlTree.SECTION(HtmlStyle.detail, methodDocTree) + content.add(heading); + return HtmlTree.SECTION(HtmlStyle.detail, content) .setId(htmlIds.forMember(method)); } - /** - * Get the signature for the given method. - * - * @param method the method being documented. - * @return a content object for the signature - */ @Override public Content getSignature(ExecutableElement method) { return new Signatures.MemberSignature(method, this) @@ -131,23 +120,23 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter } @Override - public void addDeprecated(ExecutableElement method, Content methodDocTree) { - addDeprecatedInfo(method, methodDocTree); + public void addDeprecated(ExecutableElement method, Content methodContent) { + addDeprecatedInfo(method, methodContent); } @Override - public void addPreview(ExecutableElement method, Content methodDocTree) { - addPreviewInfo(method, methodDocTree); + public void addPreview(ExecutableElement method, Content content) { + addPreviewInfo(method, content); } @Override - public void addComments(TypeMirror holderType, ExecutableElement method, Content methodDocTree) { + public void addComments(TypeMirror holderType, ExecutableElement method, Content methodContent) { TypeElement holder = utils.asTypeElement(holderType); if (!utils.getFullBody(method).isEmpty()) { if (holder.equals(typeElement) || !(utils.isPublic(holder) || utils.isLinkable(holder))) { - writer.addInlineComment(method, methodDocTree); + writer.addInlineComment(method, methodContent); } else { if (!utils.hasHiddenTag(holder) && !utils.hasHiddenTag(method)) { Content link = @@ -156,37 +145,37 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter utils.isIncluded(holder) ? utils.getSimpleName(holder) : utils.getFullyQualifiedName(holder)); - Content codeLink = HtmlTree.CODE(link); - Content descriptionFromTypeLabel = HtmlTree.SPAN(HtmlStyle.descriptionFromTypeLabel, + var codeLink = HtmlTree.CODE(link); + var descriptionFromTypeLabel = HtmlTree.SPAN(HtmlStyle.descriptionFromTypeLabel, utils.isClass(holder) ? contents.descriptionFromClassLabel : contents.descriptionFromInterfaceLabel); descriptionFromTypeLabel.add(Entity.NO_BREAK_SPACE); descriptionFromTypeLabel.add(codeLink); - methodDocTree.add(HtmlTree.DIV(HtmlStyle.block, descriptionFromTypeLabel)); + methodContent.add(HtmlTree.DIV(HtmlStyle.block, descriptionFromTypeLabel)); } - writer.addInlineComment(method, methodDocTree); + writer.addInlineComment(method, methodContent); } } } @Override - public void addTags(ExecutableElement method, Content methodDocTree) { - writer.addTagsInfo(method, methodDocTree); + public void addTags(ExecutableElement method, Content methodContent) { + writer.addTagsInfo(method, methodContent); } @Override - public Content getMethodDetails(Content methodDetailsTreeHeader, Content methodDetailsTree) { - Content methodDetails = new ContentBuilder(methodDetailsTreeHeader, methodDetailsTree); - return getMemberTree(HtmlTree.SECTION(HtmlStyle.methodDetails, methodDetails) + public Content getMethodDetails(Content methodDetailsHeader, Content methodDetails) { + Content c = new ContentBuilder(methodDetailsHeader, methodDetails); + return getMember(HtmlTree.SECTION(HtmlStyle.methodDetails, c) .setId(HtmlIds.METHOD_DETAIL)); } @Override - public void addSummaryLabel(Content memberTree) { - Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, + public void addSummaryLabel(Content content) { + var label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, contents.methodSummary); - memberTree.add(label); + content.add(label); } @Override @@ -206,14 +195,14 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter .addTab(contents.getContent("doclet.Instance_Methods"), e -> !utils.isStatic(e)) .addTab(contents.getContent("doclet.Abstract_Methods"), utils::isAbstract) .addTab(contents.getContent("doclet.Concrete_Methods"), - e -> !utils.isAbstract(e) && !utils.isInterface(e.getEnclosingElement())) + e -> !utils.isAbstract(e) && !utils.isPlainInterface(e.getEnclosingElement())) .addTab(contents.getContent("doclet.Default_Methods"), utils::isDefault) .addTab(contents.getContent("doclet.Deprecated_Methods"), e -> utils.isDeprecated(e) || utils.isDeprecated(typeElement)); } @Override - public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) { + public void addInheritedSummaryLabel(TypeElement typeElement, Content content) { Content classLink = writer.getPreQualifiedClassLink( HtmlLinkInfo.Kind.MEMBER, typeElement); Content label; @@ -226,18 +215,18 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter ? resources.getText("doclet.Methods_Inherited_From_Class") : resources.getText("doclet.Methods_Inherited_From_Interface")); } - HtmlTree labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING, + var labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING, label); labelHeading.setId(htmlIds.forInheritedMethods(typeElement)); labelHeading.add(Entity.NO_BREAK_SPACE); labelHeading.add(classLink); - inheritedTree.add(labelHeading); + content.add(labelHeading); } @Override - protected void addSummaryType(Element member, Content tdSummaryType) { + protected void addSummaryType(Element member, Content content) { ExecutableElement meth = (ExecutableElement)member; - addModifierAndType(meth, utils.getReturnType(typeElement, meth), tdSummaryType); + addModifiersAndType(meth, utils.getReturnType(typeElement, meth), content); } /** @@ -286,13 +275,13 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter dl.add(HtmlTree.DT(label)); Content overriddenTypeLink = writer.getLink(new HtmlLinkInfo(writer.configuration, context, overriddenType)); - Content codeOverriddenTypeLink = HtmlTree.CODE(overriddenTypeLink); + var codeOverriddenTypeLink = HtmlTree.CODE(overriddenTypeLink); Content methlink = writer.getLink( new HtmlLinkInfo(writer.configuration, HtmlLinkInfo.Kind.MEMBER, holder) .where(writer.htmlIds.forMember(method).name()) .label(method.getSimpleName())); - Content codeMethLink = HtmlTree.CODE(methlink); - Content dd = HtmlTree.DD(codeMethLink); + var codeMethLink = HtmlTree.CODE(methlink); + var dd = HtmlTree.DD(codeMethLink); dd.add(Entity.NO_BREAK_SPACE); dd.add(contents.inClass); dd.add(Entity.NO_BREAK_SPACE); @@ -326,13 +315,13 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter intfac = utils.getDeclaredType(utils.getEnclosingTypeElement(method), intfac); Content intfaclink = writer.getLink(new HtmlLinkInfo( writer.configuration, HtmlLinkInfo.Kind.METHOD_SPECIFIED_BY, intfac)); - Content codeIntfacLink = HtmlTree.CODE(intfaclink); + var codeIntfacLink = HtmlTree.CODE(intfaclink); dl.add(HtmlTree.DT(contents.specifiedByLabel)); Content methlink = writer.getDocLink( HtmlLinkInfo.Kind.MEMBER, implementedMeth, implementedMeth.getSimpleName()); - Content codeMethLink = HtmlTree.CODE(methlink); - Content dd = HtmlTree.DD(codeMethLink); + var codeMethLink = HtmlTree.CODE(methlink); + var dd = HtmlTree.DD(codeMethLink); dd.add(Entity.NO_BREAK_SPACE); dd.add(contents.inInterface); dd.add(Entity.NO_BREAK_SPACE); @@ -345,7 +334,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter * Get the return type for the given method. * * @param method the method being documented. - * @return content containing the return type + * @return the return type */ protected Content getReturnType(ExecutableElement method) { TypeMirror type = utils.getReturnType(typeElement, method); @@ -356,7 +345,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter } @Override - public Content getMemberTreeHeader(){ - return writer.getMemberTreeHeader(); + public Content getMemberHeader(){ + return writer.getMemberHeader(); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java index 934f9e67ff6d71d734b491edb1d69b995de8353c..f78d3e45da45531ceac28ed6fbb7a3de7ad95ec6 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,11 +41,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; /** * Generate the module index page "index.html". - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class ModuleIndexWriter extends AbstractOverviewIndexWriter { @@ -80,10 +75,10 @@ public class ModuleIndexWriter extends AbstractOverviewIndexWriter { /** * Adds the list of modules. * - * @param main the documentation tree to which the modules list will be added + * @param target the content to which the modules list will be added */ @Override - protected void addIndex(Content main) { + protected void addIndex(Content target) { Map> groupModuleMap = configuration.group.groupModules(modules); @@ -115,7 +110,7 @@ public class ModuleIndexWriter extends AbstractOverviewIndexWriter { } } - main.add(table); + target.add(table); if (table.needsScript()) { mainBodyScript.append(table.getScript()); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java index 30803551b2fc66bf6d3825f1b93a0c39515ae68f..142020bf82b4dda7edcac779eff05c60fad50c48 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java @@ -26,7 +26,6 @@ package jdk.javadoc.internal.doclets.formats.html; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; @@ -60,11 +59,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException; * Class to generate file for each module contents in the right-hand frame. This will list all the * required modules, packages and service types for the module. A click on any of the links will update * the frame with the clicked element page. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryWriter { @@ -172,25 +166,20 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW computeModulesData(); } - /** - * Get the module header. - * - * @param heading the heading for the section - */ @Override public Content getModuleHeader(String heading) { - HtmlTree bodyTree = getBody(getWindowTitle(mdle.getQualifiedName().toString())); - HtmlTree div = HtmlTree.DIV(HtmlStyle.header); + HtmlTree body = getBody(getWindowTitle(mdle.getQualifiedName().toString())); + var div = HtmlTree.DIV(HtmlStyle.header); Content moduleHead = new ContentBuilder(); moduleHead.add(mdle.isOpen() && (configuration.docEnv.getModuleMode() == ModuleMode.ALL) ? contents.openModuleLabel : contents.moduleLabel); moduleHead.add(" ").add(heading); - Content tHeading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, + var tHeading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, moduleHead); div.add(tHeading); bodyContents.setHeader(getHeader(PageMode.MODULE, mdle)) .addMainContent(div); - return bodyTree; + return body; } @Override @@ -208,30 +197,19 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW )); } - /** - * Get the content header. - */ @Override public Content getContentHeader() { return new ContentBuilder(); } - /** - * Get the summary section header. - */ @Override public Content getSummariesList() { return HtmlTree.UL(HtmlStyle.summaryList); } - /** - * Get the summary tree. - * - * @param summaryContentTree the content tree to be added to the summary tree. - */ @Override - public Content getSummaryTree(Content summaryContentTree) { - return HtmlTree.SECTION(HtmlStyle.summary, summaryContentTree); + public Content getSummary(Content source) { + return HtmlTree.SECTION(HtmlStyle.summary, source); } /** @@ -264,11 +242,11 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW }); // Get all packages if module is open or if displaying concealed modules - for (PackageElement pkg : utils.getModulePackageMap().getOrDefault(mdle, Collections.emptySet())) { + for (PackageElement pkg : utils.getModulePackageMap().getOrDefault(mdle, Set.of())) { if (shouldDocument(pkg) && (mdle.isOpen() || moduleMode == ModuleMode.ALL)) { PackageEntry e = new PackageEntry(); if (mdle.isOpen()) { - e.openedTo = Collections.emptySet(); + e.openedTo = Set.of(); } packages.put(pkg, e); } @@ -329,7 +307,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW } SortedSet openPackages = new TreeSet<>(utils.comparators.makePackageComparator()); if (module.isOpen()) { - openPackages.addAll(utils.getModulePackageMap().getOrDefault(module, Collections.emptySet())); + openPackages.addAll(utils.getModulePackageMap().getOrDefault(module, Set.of())); } else { ElementFilter.opensIn(module.getDirectives()).forEach(directive -> { PackageElement pkg = directive.getPackage(); @@ -434,12 +412,12 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW * * @param startMarker the marker comment * @param heading the heading for the section - * @param htmltree the content tree to which the information is added + * @param target the content to which the information is added */ public void addSummaryHeader(Content startMarker, Content heading, - Content htmltree) { - htmltree.add(startMarker); - htmltree.add(HtmlTree.HEADING(Headings.ModuleDeclaration.SUMMARY_HEADING, heading)); + Content target) { + target.add(startMarker); + target.add(HtmlTree.HEADING(Headings.ModuleDeclaration.SUMMARY_HEADING, heading)); } /** @@ -476,7 +454,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW TableHeader requiresTableHeader = new TableHeader(contents.modifierLabel, contents.moduleLabel, contents.descriptionLabel); - HtmlTree section = HtmlTree.SECTION(HtmlStyle.modulesSummary) + var section = HtmlTree.SECTION(HtmlStyle.modulesSummary) .setId(HtmlIds.MODULES); addSummaryHeader(MarkerComments.START_OF_MODULES_SUMMARY, contents.navModules, section); if (display(requires)) { @@ -518,7 +496,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW public void addPackagesSummary(Content summariesList) { if (display(packages) || display(indirectPackages) || display(indirectOpenPackages)) { - HtmlTree section = HtmlTree.SECTION(HtmlStyle.packagesSummary) + var section = HtmlTree.SECTION(HtmlStyle.packagesSummary) .setId(HtmlIds.PACKAGES); addSummaryHeader(MarkerComments.START_OF_PACKAGES_SUMMARY, contents.navPackages, section); if (display(packages)) { @@ -691,7 +669,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW boolean haveProvides = displayServices(provides.keySet(), providesTrees); if (haveProvides || haveUses) { - HtmlTree section = HtmlTree.SECTION(HtmlStyle.servicesSummary) + var section = HtmlTree.SECTION(HtmlStyle.servicesSummary) .setId(HtmlIds.SERVICES); addSummaryHeader(MarkerComments.START_OF_SERVICES_SUMMARY, contents.navServices, section); TableHeader usesProvidesTableHeader = @@ -774,7 +752,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW if (moduleMode == ModuleMode.ALL && !implSet.isEmpty()) { desc.add(new HtmlTree(TagName.BR)); desc.add("("); - HtmlTree implSpan = HtmlTree.SPAN(HtmlStyle.implementationLabel, contents.implementation); + var implSpan = HtmlTree.SPAN(HtmlStyle.implementationLabel, contents.implementation); desc.add(implSpan); desc.add(Entity.NO_BREAK_SPACE); String sep = ""; @@ -792,14 +770,14 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW /** * Add the module deprecation information to the documentation tree. * - * @param div the content tree to which the deprecation information will be added + * @param div the content to which the deprecation information will be added */ public void addDeprecationInfo(Content div) { List deprs = utils.getDeprecatedTrees(mdle); if (utils.isDeprecated(mdle)) { CommentHelper ch = utils.getCommentHelper(mdle); - HtmlTree deprDiv = HtmlTree.DIV(HtmlStyle.deprecationBlock); - Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(mdle)); + var deprDiv = HtmlTree.DIV(HtmlStyle.deprecationBlock); + var deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(mdle)); deprDiv.add(deprPhrase); if (!deprs.isEmpty()) { List commentTags = ch.getDescription(deprs.get(0)); @@ -812,28 +790,28 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW } @Override - public void addModuleDescription(Content moduleContentTree) { - addPreviewInfo(mdle, moduleContentTree); + public void addModuleDescription(Content moduleContent) { + addPreviewInfo(mdle, moduleContent); if (!utils.getFullBody(mdle).isEmpty()) { - HtmlTree tree = HtmlTree.SECTION(HtmlStyle.moduleDescription) + var tree = HtmlTree.SECTION(HtmlStyle.moduleDescription) .setId(HtmlIds.MODULE_DESCRIPTION); addDeprecationInfo(tree); tree.add(MarkerComments.START_OF_MODULE_DESCRIPTION); addInlineComment(mdle, tree); addTagsInfo(mdle, tree); - moduleContentTree.add(tree); + moduleContent.add(tree); } } @Override - public void addModuleSignature(Content moduleContentTree) { - moduleContentTree.add(new HtmlTree(TagName.HR)); - moduleContentTree.add(Signatures.getModuleSignature(mdle, this)); + public void addModuleSignature(Content moduleContent) { + moduleContent.add(new HtmlTree(TagName.HR)); + moduleContent.add(Signatures.getModuleSignature(mdle, this)); } @Override - public void addModuleContent(Content moduleContentTree) { - bodyContents.addMainContent(moduleContentTree); + public void addModuleContent(Content source) { + bodyContents.addMainContent(source); } @Override @@ -842,23 +820,23 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW } @Override - public void printDocument(Content contentTree) throws DocFileIOException { - contentTree.add(bodyContents); + public void printDocument(Content content) throws DocFileIOException { + content.add(bodyContents); printHtmlDocument(configuration.metakeywords.getMetaKeywordsForModule(mdle), - getDescription("declaration", mdle), getLocalStylesheets(mdle), contentTree); + getDescription("declaration", mdle), getLocalStylesheets(mdle), content); } /** * Add the module package deprecation information to the documentation tree. * - * @param li the content tree to which the deprecation information will be added + * @param li the content to which the deprecation information will be added * @param pkg the PackageDoc that is added */ public void addPackageDeprecationInfo(Content li, PackageElement pkg) { if (utils.isDeprecated(pkg)) { List deprs = utils.getDeprecatedTrees(pkg); - HtmlTree deprDiv = HtmlTree.DIV(HtmlStyle.deprecationBlock); - Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(pkg)); + var deprDiv = HtmlTree.DIV(HtmlStyle.deprecationBlock); + var deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(pkg)); deprDiv.add(deprPhrase); if (!deprs.isEmpty()) { CommentHelper ch = utils.getCommentHelper(pkg); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java index 3e8e556974a300210e1bc63c8db5101ac9eaf63a..b070e30112eed33eea9e4e134adbb2ec37a48fb0 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java @@ -162,154 +162,154 @@ public class Navigation { /** * Adds the links for the main navigation. * - * @param tree the content tree to which the main navigation will added + * @param target the content to which the main navigation will added */ - private void addMainNavLinks(Content tree) { + private void addMainNavLinks(Content target) { switch (documentedPage) { case OVERVIEW: - addActivePageLink(tree, contents.overviewLabel, options.createOverview()); - addModuleLink(tree); - addPackageLink(tree); - addPageLabel(tree, contents.classLabel, true); - addPageLabel(tree, contents.useLabel, options.classUse()); - addTreeLink(tree); - addPreviewLink(tree); - addNewLink(tree); - addDeprecatedLink(tree); - addIndexLink(tree); - addHelpLink(tree); + addActivePageLink(target, contents.overviewLabel, options.createOverview()); + addModuleLink(target); + addPackageLink(target); + addPageLabel(target, contents.classLabel, true); + addPageLabel(target, contents.useLabel, options.classUse()); + addTreeLink(target); + addPreviewLink(target); + addNewLink(target); + addDeprecatedLink(target); + addIndexLink(target); + addHelpLink(target); break; case MODULE: - addOverviewLink(tree); - addActivePageLink(tree, contents.moduleLabel, configuration.showModules); - addPackageLink(tree); - addPageLabel(tree, contents.classLabel, true); - addPageLabel(tree, contents.useLabel, options.classUse()); - addTreeLink(tree); - addPreviewLink(tree); - addNewLink(tree); - addDeprecatedLink(tree); - addIndexLink(tree); - addHelpLink(tree); + addOverviewLink(target); + addActivePageLink(target, contents.moduleLabel, configuration.showModules); + addPackageLink(target); + addPageLabel(target, contents.classLabel, true); + addPageLabel(target, contents.useLabel, options.classUse()); + addTreeLink(target); + addPreviewLink(target); + addNewLink(target); + addDeprecatedLink(target); + addIndexLink(target); + addHelpLink(target); break; case PACKAGE: - addOverviewLink(tree); - addModuleOfElementLink(tree); - addActivePageLink(tree, contents.packageLabel, true); - addPageLabel(tree, contents.classLabel, true); + addOverviewLink(target); + addModuleOfElementLink(target); + addActivePageLink(target, contents.packageLabel, true); + addPageLabel(target, contents.classLabel, true); if (options.classUse()) { - addContentToTree(tree, links.createLink(DocPaths.PACKAGE_USE, + addItemToList(target, links.createLink(DocPaths.PACKAGE_USE, contents.useLabel, "")); } if (options.createTree()) { - addContentToTree(tree, links.createLink(DocPaths.PACKAGE_TREE, + addItemToList(target, links.createLink(DocPaths.PACKAGE_TREE, contents.treeLabel, "")); } - addPreviewLink(tree); - addNewLink(tree); - addDeprecatedLink(tree); - addIndexLink(tree); - addHelpLink(tree); + addPreviewLink(target); + addNewLink(target); + addDeprecatedLink(target); + addIndexLink(target); + addHelpLink(target); break; case CLASS: - addOverviewLink(tree); - addModuleOfElementLink(tree); - addPackageSummaryLink(tree); - addActivePageLink(tree, contents.classLabel, true); + addOverviewLink(target); + addModuleOfElementLink(target); + addPackageSummaryLink(target); + addActivePageLink(target, contents.classLabel, true); if (options.classUse()) { - addContentToTree(tree, links.createLink(DocPaths.CLASS_USE.resolve(path.basename()), + addItemToList(target, links.createLink(DocPaths.CLASS_USE.resolve(path.basename()), contents.useLabel)); } if (options.createTree()) { - addContentToTree(tree, links.createLink(DocPaths.PACKAGE_TREE, + addItemToList(target, links.createLink(DocPaths.PACKAGE_TREE, contents.treeLabel, "")); } - addPreviewLink(tree); - addNewLink(tree); - addDeprecatedLink(tree); - addIndexLink(tree); - addHelpLink(tree); + addPreviewLink(target); + addNewLink(target); + addDeprecatedLink(target); + addIndexLink(target); + addHelpLink(target); break; case USE: - addOverviewLink(tree); - addModuleOfElementLink(tree); + addOverviewLink(target); + addModuleOfElementLink(target); if (element instanceof PackageElement) { - addPackageSummaryLink(tree); - addPageLabel(tree, contents.classLabel, true); + addPackageSummaryLink(target); + addPageLabel(target, contents.classLabel, true); } else { - addPackageOfElementLink(tree); - addContentToTree(tree, navLinkClass); + addPackageOfElementLink(target); + addItemToList(target, navLinkClass); } - addActivePageLink(tree, contents.useLabel, options.classUse()); + addActivePageLink(target, contents.useLabel, options.classUse()); if (element instanceof PackageElement) { - addContentToTree(tree, links.createLink(DocPaths.PACKAGE_TREE, contents.treeLabel)); + addItemToList(target, links.createLink(DocPaths.PACKAGE_TREE, contents.treeLabel)); } else { - addContentToTree(tree, configuration.utils.isEnclosingPackageIncluded((TypeElement) element) + addItemToList(target, configuration.utils.isEnclosingPackageIncluded((TypeElement) element) ? links.createLink(DocPath.parent.resolve(DocPaths.PACKAGE_TREE), contents.treeLabel) : links.createLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE), contents.treeLabel)); } - addPreviewLink(tree); - addNewLink(tree); - addDeprecatedLink(tree); - addIndexLink(tree); - addHelpLink(tree); + addPreviewLink(target); + addNewLink(target); + addDeprecatedLink(target); + addIndexLink(target); + addHelpLink(target); break; case TREE: - addOverviewLink(tree); + addOverviewLink(target); if (element == null) { - addPageLabel(tree, contents.moduleLabel, configuration.showModules); - addPageLabel(tree, contents.packageLabel, true); + addPageLabel(target, contents.moduleLabel, configuration.showModules); + addPageLabel(target, contents.packageLabel, true); } else { - addModuleOfElementLink(tree); - addPackageSummaryLink(tree); + addModuleOfElementLink(target); + addPackageSummaryLink(target); } - addPageLabel(tree, contents.classLabel, true); - addPageLabel(tree, contents.useLabel, options.classUse()); - addActivePageLink(tree, contents.treeLabel, options.createTree()); - addPreviewLink(tree); - addNewLink(tree); - addDeprecatedLink(tree); - addIndexLink(tree); - addHelpLink(tree); + addPageLabel(target, contents.classLabel, true); + addPageLabel(target, contents.useLabel, options.classUse()); + addActivePageLink(target, contents.treeLabel, options.createTree()); + addPreviewLink(target); + addNewLink(target); + addDeprecatedLink(target); + addIndexLink(target); + addHelpLink(target); break; case DEPRECATED: case INDEX: case HELP: case PREVIEW: case NEW: - addOverviewLink(tree); - addModuleLink(tree); - addPackageLink(tree); - addPageLabel(tree, contents.classLabel, true); - addPageLabel(tree, contents.useLabel, options.classUse()); - addTreeLink(tree); + addOverviewLink(target); + addModuleLink(target); + addPackageLink(target); + addPageLabel(target, contents.classLabel, true); + addPageLabel(target, contents.useLabel, options.classUse()); + addTreeLink(target); if (documentedPage == PageMode.PREVIEW) { - addActivePageLink(tree, contents.previewLabel, + addActivePageLink(target, contents.previewLabel, configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.PREVIEW)); } else { - addPreviewLink(tree); + addPreviewLink(target); } if (documentedPage == PageMode.NEW) { - addActivePageLink(tree, contents.newLabel, + addActivePageLink(target, contents.newLabel, configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.NEW)); } else { - addNewLink(tree); + addNewLink(target); } if (documentedPage == PageMode.DEPRECATED) { - addActivePageLink(tree, contents.deprecatedLabel, + addActivePageLink(target, contents.deprecatedLabel, configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.DEPRECATED)); } else { - addDeprecatedLink(tree); + addDeprecatedLink(target); } if (documentedPage == PageMode.INDEX) { - addActivePageLink(tree, contents.indexLabel, options.createIndex()); + addActivePageLink(target, contents.indexLabel, options.createIndex()); } else { - addIndexLink(tree); + addIndexLink(target); } if (documentedPage == PageMode.HELP) { - addActivePageLink(tree, contents.helpLabel, !options.noHelp()); + addActivePageLink(target, contents.helpLabel, !options.noHelp()); } else { - addHelpLink(tree); + addHelpLink(target); } break; case ALL_CLASSES: @@ -317,30 +317,30 @@ public class Navigation { case CONSTANT_VALUES: case SERIALIZED_FORM: case SYSTEM_PROPERTIES: - addOverviewLink(tree); - addModuleLink(tree); - addPackageLink(tree); - addPageLabel(tree, contents.classLabel, true); - addPageLabel(tree, contents.useLabel, options.classUse()); - addTreeLink(tree); - addPreviewLink(tree); - addNewLink(tree); - addDeprecatedLink(tree); - addIndexLink(tree); - addHelpLink(tree); + addOverviewLink(target); + addModuleLink(target); + addPackageLink(target); + addPageLabel(target, contents.classLabel, true); + addPageLabel(target, contents.useLabel, options.classUse()); + addTreeLink(target); + addPreviewLink(target); + addNewLink(target); + addDeprecatedLink(target); + addIndexLink(target); + addHelpLink(target); break; case DOC_FILE: - addOverviewLink(tree); - addModuleOfElementLink(tree); - addContentToTree(tree, navLinkPackage); - addPageLabel(tree, contents.classLabel, true); - addPageLabel(tree, contents.useLabel, options.classUse()); - addTreeLink(tree); - addPreviewLink(tree); - addNewLink(tree); - addDeprecatedLink(tree); - addIndexLink(tree); - addHelpLink(tree); + addOverviewLink(target); + addModuleOfElementLink(target); + addItemToList(target, navLinkPackage); + addPageLabel(target, contents.classLabel, true); + addPageLabel(target, contents.useLabel, options.classUse()); + addTreeLink(target); + addPreviewLink(target); + addNewLink(target); + addDeprecatedLink(target); + addIndexLink(target); + addHelpLink(target); break; default: break; @@ -350,10 +350,10 @@ public class Navigation { /** * Adds the summary links to the sub-navigation. * - * @param tree the content tree to which the sub-navigation will added + * @param target the content to which the sub-navigation will be added * @param nested whether to create a flat or nested list */ - private void addSummaryLinks(Content tree, boolean nested) { + private void addSummaryLinks(Content target, boolean nested) { switch (documentedPage) { case MODULE, PACKAGE, CLASS, HELP -> { List listContents = subNavLinks.getSubNavLinks() @@ -367,11 +367,11 @@ public class Navigation { default -> Text.EMPTY; }; if (nested) { - tree.add(HtmlTree.LI(HtmlTree.P(label)) + target.add(HtmlTree.LI(HtmlTree.P(label)) .add(new HtmlTree(TagName.UL).add(listContents))); } else { - tree.add(HtmlTree.LI(label).add(Entity.NO_BREAK_SPACE)); - addListToNav(listContents, tree); + target.add(HtmlTree.LI(label).add(Entity.NO_BREAK_SPACE)); + addListToNav(listContents, target); } } } @@ -381,10 +381,10 @@ public class Navigation { /** * Adds the detail links to sub-navigation. * - * @param tree the content tree to which the links will be added + * @param target the content to which the links will be added * @param nested whether to create a flat or nested list */ - private void addDetailLinks(Content tree, boolean nested) { + private void addDetailLinks(Content target, boolean nested) { if (documentedPage == PageMode.CLASS) { List listContents = new ArrayList<>(); VisibleMemberTable vmt = configuration.getVisibleMemberTable((TypeElement) element); @@ -394,14 +394,14 @@ public class Navigation { } if (!listContents.isEmpty()) { if (nested) { - Content li = HtmlTree.LI(HtmlTree.P(contents.detailLabel)); + var li = HtmlTree.LI(HtmlTree.P(contents.detailLabel)); li.add(new HtmlTree(TagName.UL).add(listContents)); - tree.add(li); + target.add(li); } else { - Content li = HtmlTree.LI(contents.detailLabel); + var li = HtmlTree.LI(contents.detailLabel); li.add(Entity.NO_BREAK_SPACE); - tree.add(li); - addListToNav(listContents, tree); + target.add(li); + addListToNav(listContents, target); } } } @@ -427,15 +427,15 @@ public class Navigation { }); } - private void addContentToList(List listContents, Content tree) { - listContents.add(HtmlTree.LI(tree)); + private void addContentToList(List listContents, Content source) { + listContents.add(HtmlTree.LI(source)); } - private void addContentToTree(Content tree, Content content) { - tree.add(HtmlTree.LI(content)); + private void addItemToList(Content list, Content item) { + list.add(HtmlTree.LI(item)); } - private void addListToNav(List listContents, Content tree) { + private void addListToNav(List listContents, Content target) { int count = 0; for (Content liContent : listContents) { if (count < listContents.size() - 1) { @@ -443,51 +443,51 @@ public class Navigation { liContent.add("|"); liContent.add(Entity.NO_BREAK_SPACE); } - tree.add(liContent); + target.add(liContent); count++; } } - private void addActivePageLink(Content tree, Content label, boolean display) { + private void addActivePageLink(Content target, Content label, boolean display) { if (display) { - tree.add(HtmlTree.LI(HtmlStyle.navBarCell1Rev, label)); + target.add(HtmlTree.LI(HtmlStyle.navBarCell1Rev, label)); } } - private void addPageLabel(Content tree, Content label, boolean display) { + private void addPageLabel(Content target, Content label, boolean display) { if (display) { - tree.add(HtmlTree.LI(label)); + target.add(HtmlTree.LI(label)); } } - private void addOverviewLink(Content tree) { + private void addOverviewLink(Content target) { if (options.createOverview()) { - tree.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.INDEX), + target.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.INDEX), contents.overviewLabel, ""))); } } - private void addModuleLink(Content tree) { + private void addModuleLink(Content target) { if (configuration.showModules) { if (configuration.modules.size() == 1) { ModuleElement mdle = configuration.modules.first(); boolean included = configuration.utils.isIncluded(mdle); - tree.add(HtmlTree.LI((included) + target.add(HtmlTree.LI((included) ? links.createLink(pathToRoot.resolve(configuration.docPaths.moduleSummary(mdle)), contents.moduleLabel, "") : contents.moduleLabel)); } else if (!configuration.modules.isEmpty()) { - addPageLabel(tree, contents.moduleLabel, true); + addPageLabel(target, contents.moduleLabel, true); } } } - private void addModuleOfElementLink(Content tree) { + private void addModuleOfElementLink(Content target) { if (configuration.showModules) { - tree.add(HtmlTree.LI(navLinkModule)); + target.add(HtmlTree.LI(navLinkModule)); } } - private void addPackageLink(Content tree) { + private void addPackageLink(Content target) { if (configuration.packages.size() == 1) { PackageElement packageElement = configuration.packages.first(); boolean included = packageElement != null && configuration.utils.isIncluded(packageElement); @@ -500,66 +500,66 @@ public class Navigation { } } if (included || packageElement == null) { - tree.add(HtmlTree.LI(links.createLink( + target.add(HtmlTree.LI(links.createLink( pathToRoot.resolve(configuration.docPaths.forPackage(packageElement).resolve(DocPaths.PACKAGE_SUMMARY)), contents.packageLabel))); } else { DocLink crossPkgLink = configuration.extern.getExternalLink( packageElement, pathToRoot, DocPaths.PACKAGE_SUMMARY.getPath()); if (crossPkgLink != null) { - tree.add(HtmlTree.LI(links.createLink(crossPkgLink, contents.packageLabel))); + target.add(HtmlTree.LI(links.createLink(crossPkgLink, contents.packageLabel))); } else { - tree.add(HtmlTree.LI(contents.packageLabel)); + target.add(HtmlTree.LI(contents.packageLabel)); } } } else if (!configuration.packages.isEmpty()) { - addPageLabel(tree, contents.packageLabel, true); + addPageLabel(target, contents.packageLabel, true); } } - private void addPackageOfElementLink(Content tree) { - tree.add(HtmlTree.LI(links.createLink(DocPath.parent.resolve(DocPaths.PACKAGE_SUMMARY), + private void addPackageOfElementLink(Content target) { + target.add(HtmlTree.LI(links.createLink(DocPath.parent.resolve(DocPaths.PACKAGE_SUMMARY), contents.packageLabel))); } - private void addPackageSummaryLink(Content tree) { - tree.add(HtmlTree.LI(links.createLink(DocPaths.PACKAGE_SUMMARY, contents.packageLabel))); + private void addPackageSummaryLink(Content target) { + target.add(HtmlTree.LI(links.createLink(DocPaths.PACKAGE_SUMMARY, contents.packageLabel))); } - private void addTreeLink(Content tree) { + private void addTreeLink(Content target) { if (options.createTree()) { List packages = new ArrayList<>(configuration.getSpecifiedPackageElements()); DocPath docPath = packages.size() == 1 && configuration.getSpecifiedTypeElements().isEmpty() ? pathToRoot.resolve(configuration.docPaths.forPackage(packages.get(0)).resolve(DocPaths.PACKAGE_TREE)) : pathToRoot.resolve(DocPaths.OVERVIEW_TREE); - tree.add(HtmlTree.LI(links.createLink(docPath, contents.treeLabel, ""))); + target.add(HtmlTree.LI(links.createLink(docPath, contents.treeLabel, ""))); } } - private void addDeprecatedLink(Content tree) { + private void addDeprecatedLink(Content target) { if (configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.DEPRECATED)) { - tree.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.DEPRECATED_LIST), + target.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.DEPRECATED_LIST), contents.deprecatedLabel, ""))); } } - private void addPreviewLink(Content tree) { + private void addPreviewLink(Content target) { if (configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.PREVIEW)) { - tree.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.PREVIEW_LIST), + target.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.PREVIEW_LIST), contents.previewLabel, ""))); } } - private void addNewLink(Content tree) { + private void addNewLink(Content target) { if (configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.NEW)) { - tree.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.NEW_LIST), + target.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.NEW_LIST), contents.newLabel, ""))); } } - private void addIndexLink(Content tree) { + private void addIndexLink(Content target) { if (options.createIndex()) { - tree.add(HtmlTree.LI(links.createLink(pathToRoot.resolve( + target.add(HtmlTree.LI(links.createLink(pathToRoot.resolve( (options.splitIndex() ? DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1)) : DocPaths.INDEX_ALL)), @@ -567,7 +567,7 @@ public class Navigation { } } - private void addHelpLink(Content tree) { + private void addHelpLink(Content target) { if (!options.noHelp()) { String helpfile = options.helpFile(); DocPath helpfilenm; @@ -577,23 +577,23 @@ public class Navigation { DocFile file = DocFile.createFileForInput(configuration, helpfile); helpfilenm = DocPath.create(file.getName()); } - tree.add(HtmlTree.LI(links.createLink( + target.add(HtmlTree.LI(links.createLink( new DocLink(pathToRoot.resolve(helpfilenm), htmlIds.forPage(documentedPage).name()), contents.helpLabel, ""))); } } - private void addSearch(Content tree) { + private void addSearch(Content target) { String reset = "reset"; - HtmlTree inputText = HtmlTree.INPUT("text", HtmlIds.SEARCH_INPUT) + var inputText = HtmlTree.INPUT("text", HtmlIds.SEARCH_INPUT) .put(HtmlAttr.PLACEHOLDER, searchPlaceholder); - HtmlTree inputReset = HtmlTree.INPUT(reset, HtmlIds.RESET_BUTTON) + var inputReset = HtmlTree.INPUT(reset, HtmlIds.RESET_BUTTON) .put(HtmlAttr.VALUE, reset); - HtmlTree searchDiv = HtmlTree.DIV(HtmlStyle.navListSearch, + var searchDiv = HtmlTree.DIV(HtmlStyle.navListSearch, HtmlTree.LABEL(HtmlIds.SEARCH_INPUT.name(), searchLabel)); searchDiv.add(inputText); searchDiv.add(inputReset); - tree.add(searchDiv); + target.add(searchDiv); } /** @@ -605,12 +605,12 @@ public class Navigation { if (options.noNavbar()) { return new ContentBuilder(); } - Content tree = HtmlTree.NAV(); + var navigationBar = HtmlTree.NAV(); - HtmlTree navDiv = new HtmlTree(TagName.DIV); + var navDiv = new HtmlTree(TagName.DIV); Content skipNavLinks = contents.getContent("doclet.Skip_navigation_links"); String toggleNavLinks = configuration.getDocResources().getText("doclet.Toggle_navigation_links"); - tree.add(MarkerComments.START_OF_TOP_NAVBAR); + navigationBar.add(MarkerComments.START_OF_TOP_NAVBAR); navDiv.setStyle(HtmlStyle.topNav) .setId(HtmlIds.NAVBAR_TOP) .add(new HtmlTree(TagName.BUTTON).setId(HtmlIds.NAVBAR_TOGGLE_BUTTON) @@ -626,29 +626,29 @@ public class Navigation { Content aboutContent = userHeader; boolean addSearch = options.createIndex(); - Content aboutDiv = HtmlTree.DIV(HtmlStyle.aboutLanguage, aboutContent); + var aboutDiv = HtmlTree.DIV(HtmlStyle.aboutLanguage, aboutContent); navDiv.add(aboutDiv); - HtmlTree navList = new HtmlTree(TagName.UL) + var navList = new HtmlTree(TagName.UL) .setId(HtmlIds.NAVBAR_TOP_FIRSTROW) .setStyle(HtmlStyle.navList) .put(HtmlAttr.TITLE, rowListTitle); addMainNavLinks(navList); navDiv.add(navList); - HtmlTree ulNavSummaryRight = HtmlTree.UL(HtmlStyle.subNavListSmall); + var ulNavSummaryRight = HtmlTree.UL(HtmlStyle.subNavListSmall); addSummaryLinks(ulNavSummaryRight, true); addDetailLinks(ulNavSummaryRight, true); navDiv.add(ulNavSummaryRight); - tree.add(navDiv); + navigationBar.add(navDiv); - HtmlTree subDiv = HtmlTree.DIV(HtmlStyle.subNav); + var subDiv = HtmlTree.DIV(HtmlStyle.subNav); - HtmlTree div = new HtmlTree(TagName.DIV).setId(HtmlIds.NAVBAR_SUB_LIST); + var div = new HtmlTree(TagName.DIV).setId(HtmlIds.NAVBAR_SUB_LIST); // Add the summary links if present. - HtmlTree ulNavSummary = HtmlTree.UL(HtmlStyle.subNavList); + var ulNavSummary = HtmlTree.UL(HtmlStyle.subNavList); addSummaryLinks(ulNavSummary, false); div.add(ulNavSummary); // Add the detail links if present. - HtmlTree ulNavDetail = HtmlTree.UL(HtmlStyle.subNavList); + var ulNavDetail = HtmlTree.UL(HtmlStyle.subNavList); addDetailLinks(ulNavDetail, false); div.add(ulNavDetail); subDiv.add(div); @@ -656,12 +656,12 @@ public class Navigation { if (addSearch) { addSearch(subDiv); } - tree.add(subDiv); + navigationBar.add(subDiv); - tree.add(MarkerComments.END_OF_TOP_NAVBAR); - tree.add(HtmlTree.SPAN(HtmlStyle.skipNav, HtmlTree.EMPTY) + navigationBar.add(MarkerComments.END_OF_TOP_NAVBAR); + navigationBar.add(HtmlTree.SPAN(HtmlStyle.skipNav, HtmlTree.EMPTY) .setId(HtmlIds.SKIP_NAVBAR_TOP)); - return tree; + return navigationBar; } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriterImpl.java index c92e327691c462f3e4094c48b5b1c3512d396f42..a233e7b38b463b00ae359694e83d7c01cb5d9974 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriterImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,11 +41,6 @@ import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter; /** * Writes nested class documentation in HTML format. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class NestedClassWriterImpl extends AbstractMemberWriter implements MemberSummaryWriter { @@ -60,11 +55,11 @@ public class NestedClassWriterImpl extends AbstractMemberWriter @Override public Content getMemberSummaryHeader(TypeElement typeElement, - Content memberSummaryTree) { - memberSummaryTree.add(MarkerComments.START_OF_NESTED_CLASS_SUMMARY); - Content memberTree = new ContentBuilder(); - writer.addSummaryHeader(this, memberTree); - return memberTree; + Content content) { + content.add(MarkerComments.START_OF_NESTED_CLASS_SUMMARY); + Content memberContent = new ContentBuilder(); + writer.addSummaryHeader(this, memberContent); + return memberContent; } @Override @@ -74,15 +69,15 @@ public class NestedClassWriterImpl extends AbstractMemberWriter } @Override - public void addSummaryLabel(Content memberTree) { - Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, + public void addSummaryLabel(Content content) { + var label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, contents.nestedClassSummary); - memberTree.add(label); + content.add(label); } @Override public TableHeader getSummaryTableHeader(Element member) { - Content label = utils.isInterface(member) ? + Content label = utils.isPlainInterface(member) ? contents.interfaceLabel : contents.classLabel; return new TableHeader(contents.modifierAndTypeLabel, label, contents.descriptionLabel); @@ -100,44 +95,44 @@ public class NestedClassWriterImpl extends AbstractMemberWriter } @Override - public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) { + public void addInheritedSummaryLabel(TypeElement typeElement, Content content) { Content classLink = writer.getPreQualifiedClassLink(HtmlLinkInfo.Kind.MEMBER, typeElement); Content label; if (options.summarizeOverriddenMethods()) { - label = Text.of(utils.isInterface(typeElement) + label = Text.of(utils.isPlainInterface(typeElement) ? resources.getText("doclet.Nested_Classes_Interfaces_Declared_In_Interface") : resources.getText("doclet.Nested_Classes_Interfaces_Declared_In_Class")); } else { - label = Text.of(utils.isInterface(typeElement) + label = Text.of(utils.isPlainInterface(typeElement) ? resources.getText("doclet.Nested_Classes_Interfaces_Inherited_From_Interface") : resources.getText("doclet.Nested_Classes_Interfaces_Inherited_From_Class")); } - HtmlTree labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, label); + var labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, label); labelHeading.setId(htmlIds.forInheritedClasses(typeElement)); labelHeading.add(Entity.NO_BREAK_SPACE); labelHeading.add(classLink); - inheritedTree.add(labelHeading); + content.add(labelHeading); } @Override protected void addSummaryLink(HtmlLinkInfo.Kind context, TypeElement typeElement, Element member, - Content tdSummary) { + Content content) { Content memberLink = writer.getLink(new HtmlLinkInfo(configuration, context, (TypeElement)member) .style(HtmlStyle.typeNameLink)); - Content code = HtmlTree.CODE(memberLink); - tdSummary.add(code); + var code = HtmlTree.CODE(memberLink); + content.add(code); } @Override - protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) { - linksTree.add( + protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content target) { + target.add( writer.getLink(new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.MEMBER, (TypeElement)member))); } @Override - protected void addSummaryType(Element member, Content tdSummaryType) { - addModifierAndType(member, null, tdSummaryType); + protected void addSummaryType(Element member, Content content) { + addModifiersAndType(member, null, content); } @Override diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NewAPIListWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NewAPIListWriter.java index 320ddfeb358a62342e06867fbef7c77f225044d6..1473204b3e81db80790489d5337c627f6bc14c8a 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NewAPIListWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NewAPIListWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ import static com.sun.source.doctree.DocTree.Kind.SINCE; /** * Generates a file containing a list of new API elements with the appropriate links. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - * */ public class NewAPIListWriter extends SummaryListWriter { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java index 11bb4d6def59b45572f8346c9492de7859d617ff..0b2cd81b538cadebcaab7790e3de5d291e4929a2 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.Group; /** * Generate the package index page "index.html". - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class PackageIndexWriter extends AbstractOverviewIndexWriter { @@ -82,10 +77,10 @@ public class PackageIndexWriter extends AbstractOverviewIndexWriter { /** * Adds the packages list to the documentation tree. * - * @param main the documentation tree to which the packages list will be added + * @param target the content to which the packages list will be added */ @Override - protected void addIndex(Content main) { + protected void addIndex(Content target) { Map> groupPackageMap = configuration.group.groupPackages(packages); @@ -113,7 +108,7 @@ public class PackageIndexWriter extends AbstractOverviewIndexWriter { } } - main.add(table); + target.add(table); if (table.needsScript()) { getMainBodyScript().append(table.getScript()); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java index 9618be166f994cb766ae7467d2a9099ad27f3c35..7ed012b664f6b22ed5984d4eae769b35aee83c00 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java @@ -44,11 +44,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; /** * Class to generate Tree page for a package. The name of the file generated is * "package-tree.html" and it is generated in the respective package directory. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class PackageTreeWriter extends AbstractTreeWriter { @@ -90,7 +85,8 @@ public class PackageTreeWriter extends AbstractTreeWriter { } /** - * Generate a separate tree file for each package. + * Generate a separate tree file. + * * @throws DocFileIOException if there is a problem generating the package tree file */ protected void generatePackageTreeFile() throws DocFileIOException { @@ -100,11 +96,11 @@ public class PackageTreeWriter extends AbstractTreeWriter { ? contents.getContent("doclet.Hierarchy_For_Unnamed_Package") : contents.getContent("doclet.Hierarchy_For_Package", getLocalizedPackageName(packageElement)); - Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, + var heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, headContent); - Content div = HtmlTree.DIV(HtmlStyle.header, heading); + var div = HtmlTree.DIV(HtmlStyle.header, heading); if (configuration.packages.size() > 1) { - addLinkToMainTree(div); + addLinkToAllPackages(div); } mainContent.add(div); addTree(classtree.baseClasses(), "doclet.Class_Hierarchy", mainContent); @@ -120,14 +116,14 @@ public class PackageTreeWriter extends AbstractTreeWriter { /** * Get the package tree header. * - * @return a content tree for the header + * @return the package tree header */ protected HtmlTree getPackageTreeHeader() { String packageName = packageElement.isUnnamed() ? "" : utils.getPackageName(packageElement); String title = packageName + " " + resources.getText("doclet.Window_Class_Hierarchy"); - HtmlTree bodyTree = getBody(getWindowTitle(title)); + HtmlTree body = getBody(getWindowTitle(title)); bodyContents.setHeader(getHeader(PageMode.TREE, packageElement)); - return bodyTree; + return body; } @Override @@ -141,14 +137,16 @@ public class PackageTreeWriter extends AbstractTreeWriter { /** * Add a link to the tree for all the packages. * - * @param div the content tree to which the link will be added + * @param target the content to which the link will be added */ - protected void addLinkToMainTree(Content div) { - Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel, + protected void addLinkToAllPackages(Content target) { + var span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel, contents.packageHierarchies); - div.add(span); - HtmlTree ul = HtmlTree.UL(HtmlStyle.horizontal); - ul.add(getNavLinkMainTree(resources.getText("doclet.All_Packages"))); - div.add(ul); + target.add(span); + var ul = HtmlTree.UL(HtmlStyle.horizontal); + // TODO the link should be more specific: + // it should point to the "all packages" section of the overview tree + ul.add(getNavLinkToOverviewTree(resources.getText("doclet.All_Packages"))); + target.add(ul); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java index 1c44a1308685a2870f036d1bcc8608b4d9af6ba3..42b20275ea4bc0c2379114f69d0ac1e8f66611a8 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java @@ -49,11 +49,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; /** * Generate package usage information. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class PackageUseWriter extends SubWriterHolderWriter { @@ -116,7 +111,7 @@ public class PackageUseWriter extends SubWriterHolderWriter { * @throws DocFileIOException if there is a problem generating the package use page */ protected void generatePackageUseFile() throws DocFileIOException { - HtmlTree body = getPackageUseHeader(); + HtmlTree body = getBody(); Content mainContent = new ContentBuilder(); if (usingPackageToUsedClasses.isEmpty()) { mainContent.add(contents.getContent("doclet.ClassUse_No.usage.of.0", getLocalizedPackageName(packageElement))); @@ -134,23 +129,23 @@ public class PackageUseWriter extends SubWriterHolderWriter { /** * Add the package use information. * - * @param contentTree the content tree to which the package use information will be added + * @param content the content to which the package use information will be added */ - protected void addPackageUse(Content contentTree) { - Content content = new ContentBuilder(); + protected void addPackageUse(Content content) { + Content c = new ContentBuilder(); if (configuration.packages.size() > 1) { - addPackageList(content); + addPackageList(c); } - addClassList(content); - contentTree.add(content); + addClassList(c); + content.add(c); } /** * Add the list of packages that use the given package. * - * @param contentTree the content tree to which the package list will be added + * @param content the content to which the package list will be added */ - protected void addPackageList(Content contentTree) { + protected void addPackageList(Content content) { Content caption = contents.getContent( "doclet.ClassUse_Packages.that.use.0", getPackageLink(packageElement, getLocalizedPackageName(packageElement))); @@ -170,21 +165,21 @@ public class PackageUseWriter extends SubWriterHolderWriter { } table.addRow(packageLink, summary); } - contentTree.add(table); + content.add(table); } /** * Add the list of classes that use the given package. * - * @param contentTree the content tree to which the class list will be added + * @param content the content to which the class list will be added */ - protected void addClassList(Content contentTree) { + protected void addClassList(Content content) { TableHeader classTableHeader = new TableHeader( contents.classLabel, contents.descriptionLabel); - HtmlTree ul = HtmlTree.UL(HtmlStyle.blockList); + var ul = HtmlTree.UL(HtmlStyle.blockList); for (String packageName : usingPackageToUsedClasses.keySet()) { PackageElement usingPackage = utils.elementUtils.getPackageElement(packageName); - HtmlTree section = HtmlTree.SECTION(HtmlStyle.detail) + var section = HtmlTree.SECTION(HtmlStyle.detail) .setId(htmlIds.forPackage(usingPackage)); Content caption = contents.getContent( "doclet.ClassUse_Classes.in.0.used.by.1", @@ -208,30 +203,28 @@ public class PackageUseWriter extends SubWriterHolderWriter { section.add(table); ul.add(HtmlTree.LI(section)); } - Content li = HtmlTree.SECTION(HtmlStyle.packageUses, ul); - contentTree.add(li); + var li = HtmlTree.SECTION(HtmlStyle.packageUses, ul); + content.add(li); } /** - * Get the header for the package use listing. - * - * @return a content tree representing the package use header + * {@return the package use HTML BODY element} */ - private HtmlTree getPackageUseHeader() { + private HtmlTree getBody() { String packageText = resources.getText("doclet.Package"); String name = packageElement.isUnnamed() ? "" : utils.getPackageName(packageElement); String title = resources.getText("doclet.Window_ClassUse_Header", packageText, name); - HtmlTree bodyTree = getBody(getWindowTitle(title)); + HtmlTree body = getBody(getWindowTitle(title)); ContentBuilder headingContent = new ContentBuilder(); headingContent.add(contents.getContent("doclet.ClassUse_Title", packageText)); headingContent.add(new HtmlTree(TagName.BR)); headingContent.add(name); - Content heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, + var heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, headingContent); - Content div = HtmlTree.DIV(HtmlStyle.header, heading); + var div = HtmlTree.DIV(HtmlStyle.header, heading); bodyContents.setHeader(getHeader(PageMode.USE, packageElement)) .addMainContent(div); - return bodyTree; + return body; } @Override diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java index 231ab6c50e2a3e357ee503005e7c74a1a1c9507e..e6801a39c23212e04ec663fda2335984d71b0e89 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java @@ -59,11 +59,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; * Class to generate file for each package contents in the right-hand * frame. This will list all the Class Kinds in the package. A click on any * class-kind will update the frame with the clicked class-kind page. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class PackageWriterImpl extends HtmlDocletWriter implements PackageSummaryWriter { @@ -77,9 +72,9 @@ public class PackageWriterImpl extends HtmlDocletWriter private SortedSet allClasses; /** - * The HTML tree for section tag. + * The HTML element for the section tag being written. */ - protected HtmlTree sectionTree = HtmlTree.SECTION(HtmlStyle.packageDescription, new ContentBuilder()); + private final HtmlTree section = HtmlTree.SECTION(HtmlStyle.packageDescription, new ContentBuilder()); private final BodyContents bodyContents = new BodyContents(); @@ -110,12 +105,12 @@ public class PackageWriterImpl extends HtmlDocletWriter @Override public Content getPackageHeader() { String packageName = getLocalizedPackageName(packageElement).toString(); - HtmlTree bodyTree = getBody(getWindowTitle(packageName)); - HtmlTree div = HtmlTree.DIV(HtmlStyle.header); + HtmlTree body = getBody(getWindowTitle(packageName)); + var div = HtmlTree.DIV(HtmlStyle.header); if (configuration.showModules) { ModuleElement mdle = configuration.docEnv.getElementUtils().getModuleOf(packageElement); - Content classModuleLabel = HtmlTree.SPAN(HtmlStyle.moduleLabelInPackage, contents.moduleLabel); - Content moduleNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classModuleLabel); + var classModuleLabel = HtmlTree.SPAN(HtmlStyle.moduleLabelInPackage, contents.moduleLabel); + var moduleNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classModuleLabel); moduleNameDiv.add(Entity.NO_BREAK_SPACE); moduleNameDiv.add(getModuleLink(mdle, Text.of(mdle.getQualifiedName().toString()))); @@ -126,12 +121,12 @@ public class PackageWriterImpl extends HtmlDocletWriter packageHead.add(contents.packageLabel).add(" "); } packageHead.add(packageName); - Content tHeading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, + var tHeading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, packageHead); div.add(tHeading); bodyContents.setHeader(getHeader(PageMode.PACKAGE, packageElement)) .addMainContent(div); - return bodyTree; + return body; } @Override @@ -205,14 +200,14 @@ public class PackageWriterImpl extends HtmlDocletWriter /** * Add the package deprecation information to the documentation tree. * - * @param div the content tree to which the deprecation information will be added + * @param div the content to which the deprecation information will be added */ public void addDeprecationInfo(Content div) { List deprs = utils.getDeprecatedTrees(packageElement); if (utils.isDeprecated(packageElement)) { CommentHelper ch = utils.getCommentHelper(packageElement); - HtmlTree deprDiv = HtmlTree.DIV(HtmlStyle.deprecationBlock); - Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(packageElement)); + var deprDiv = HtmlTree.DIV(HtmlStyle.deprecationBlock); + var deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(packageElement)); deprDiv.add(deprPhrase); if (!deprs.isEmpty()) { List commentTags = ch.getDescription(deprs.get(0)); @@ -230,33 +225,33 @@ public class PackageWriterImpl extends HtmlDocletWriter } @Override - public void addRelatedPackagesSummary(Content summaryContentTree) { + public void addRelatedPackagesSummary(Content summaryContent) { boolean showModules = configuration.showModules && hasRelatedPackagesInOtherModules(relatedPackages); TableHeader tableHeader= showModules ? new TableHeader(contents.moduleLabel, contents.packageLabel, contents.descriptionLabel) : new TableHeader(contents.packageLabel, contents.descriptionLabel); addPackageSummary(relatedPackages, contents.relatedPackages, tableHeader, - summaryContentTree, showModules); + summaryContent, showModules); } /** - * Add all types to the content tree. + * Add all types to the content. * - * @param summaryContentTree HtmlTree content to which the links will be added + * @param target the content to which the links will be added */ - public void addAllClassesAndInterfacesSummary(Content summaryContentTree) { + public void addAllClassesAndInterfacesSummary(Content target) { Table table = new Table(HtmlStyle.summaryTable) .setHeader(new TableHeader(contents.classLabel, contents.descriptionLabel)) .setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast) .setId(HtmlIds.CLASS_SUMMARY) .setDefaultTab(contents.allClassesAndInterfacesLabel) - .addTab(contents.interfaces, utils::isInterface) - .addTab(contents.classes, e -> utils.isOrdinaryClass((TypeElement)e)) + .addTab(contents.interfaces, utils::isPlainInterface) + .addTab(contents.classes, e -> utils.isNonThrowableClass((TypeElement)e)) .addTab(contents.enums, utils::isEnum) .addTab(contents.records, e -> utils.isRecord((TypeElement)e)) .addTab(contents.exceptionClasses, e -> utils.isThrowable((TypeElement)e)) - .addTab(contents.annotationTypes, utils::isAnnotationType); + .addTab(contents.annotationTypes, utils::isAnnotationInterface); for (TypeElement typeElement : allClasses) { if (typeElement != null && utils.isCoreClass(typeElement)) { Content classLink = getLink(new HtmlLinkInfo( @@ -276,7 +271,7 @@ public class PackageWriterImpl extends HtmlDocletWriter } } if (!table.isEmpty()) { - summaryContentTree.add(HtmlTree.LI(table)); + target.add(HtmlTree.LI(table)); if (table.needsScript()) { getMainBodyScript().append(table.getScript()); } @@ -284,7 +279,7 @@ public class PackageWriterImpl extends HtmlDocletWriter } public void addPackageSummary(List packages, Content label, - TableHeader tableHeader, Content summaryContentTree, + TableHeader tableHeader, Content summaryContent, boolean showModules) { if (!packages.isEmpty()) { Table table = new Table(HtmlStyle.summaryTable) @@ -299,7 +294,7 @@ public class PackageWriterImpl extends HtmlDocletWriter for (PackageElement pkg : packages) { Content packageLink = getPackageLink(pkg, Text.of(pkg.getQualifiedName())); - Content moduleLink = HtmlTree.EMPTY; + var moduleLink = HtmlTree.EMPTY; if (showModules) { ModuleElement module = (ModuleElement) pkg.getEnclosingElement(); if (module != null && !module.isUnnamed()) { @@ -323,37 +318,35 @@ public class PackageWriterImpl extends HtmlDocletWriter table.addRow(packageLink, description); } } - summaryContentTree.add(HtmlTree.LI(table)); + summaryContent.add(HtmlTree.LI(table)); } } @Override - public void addPackageDescription(Content packageContentTree) { - addPreviewInfo(packageElement, packageContentTree); + public void addPackageDescription(Content packageContent) { + addPreviewInfo(packageElement, packageContent); if (!utils.getBody(packageElement).isEmpty()) { - HtmlTree tree = sectionTree; - tree.setId(HtmlIds.PACKAGE_DESCRIPTION); - addDeprecationInfo(tree); - addInlineComment(packageElement, tree); + section.setId(HtmlIds.PACKAGE_DESCRIPTION); + addDeprecationInfo(section); + addInlineComment(packageElement, section); } } @Override - public void addPackageTags(Content packageContentTree) { - Content htmlTree = sectionTree; - addTagsInfo(packageElement, htmlTree); - packageContentTree.add(sectionTree); + public void addPackageTags(Content packageContent) { + addTagsInfo(packageElement, section); + packageContent.add(section); } @Override - public void addPackageSignature(Content packageContentTree) { - packageContentTree.add(new HtmlTree(TagName.HR)); - packageContentTree.add(Signatures.getPackageSignature(packageElement, this)); + public void addPackageSignature(Content packageContent) { + packageContent.add(new HtmlTree(TagName.HR)); + packageContent.add(Signatures.getPackageSignature(packageElement, this)); } @Override - public void addPackageContent(Content packageContentTree) { - bodyContents.addMainContent(packageContentTree); + public void addPackageContent(Content packageContent) { + bodyContents.addMainContent(packageContent); } @Override @@ -362,17 +355,17 @@ public class PackageWriterImpl extends HtmlDocletWriter } @Override - public void printDocument(Content contentTree) throws DocFileIOException { + public void printDocument(Content content) throws DocFileIOException { String description = getDescription("declaration", packageElement); List localStylesheets = getLocalStylesheets(packageElement); - contentTree.add(bodyContents); + content.add(bodyContents); printHtmlDocument(configuration.metakeywords.getMetaKeywords(packageElement), - description, localStylesheets, contentTree); + description, localStylesheets, content); } @Override - public Content getPackageSummary(Content summaryContentTree) { - return HtmlTree.SECTION(HtmlStyle.summary, summaryContentTree); + public Content getPackageSummary(Content summaryContent) { + return HtmlTree.SECTION(HtmlStyle.summary, summaryContent); } private boolean hasRelatedPackagesInOtherModules(List relatedPackages) { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PreviewListWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PreviewListWriter.java index 0d2aac933051572ea47a2a89e41260386a3fe1d3..e30bdf352490b28c592f61b57e7c85e7f954bf6b 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PreviewListWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PreviewListWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,11 +43,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.PreviewAPIListBuilder; * Generate File to list all the preview elements with the * appropriate links. * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - * * @see java.util.List */ public class PreviewListWriter extends SummaryListWriter { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java index 9ff02bdd8f5b47c964e5970a0f627a701f99bcc9..3a2e746661e24368a621a9249dbb8f33402b96fc 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,6 @@ import jdk.javadoc.internal.doclets.toolkit.PropertyWriter; /** * Writes property documentation in HTML format. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class PropertyWriterImpl extends AbstractMemberWriter implements PropertyWriter, MemberSummaryWriter { @@ -54,11 +49,11 @@ public class PropertyWriterImpl extends AbstractMemberWriter } @Override - public Content getMemberSummaryHeader(TypeElement typeElement, Content memberSummaryTree) { - memberSummaryTree.add(MarkerComments.START_OF_PROPERTY_SUMMARY); - Content memberTree = new ContentBuilder(); - writer.addSummaryHeader(this, memberTree); - return memberTree; + public Content getMemberSummaryHeader(TypeElement typeElement, Content content) { + content.add(MarkerComments.START_OF_PROPERTY_SUMMARY); + Content memberContent = new ContentBuilder(); + writer.addSummaryHeader(this, memberContent); + return memberContent; } @Override @@ -68,22 +63,22 @@ public class PropertyWriterImpl extends AbstractMemberWriter } @Override - public Content getPropertyDetailsTreeHeader(Content memberDetailsTree) { - memberDetailsTree.add(MarkerComments.START_OF_PROPERTY_DETAILS); - Content propertyDetailsTree = new ContentBuilder(); - Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, + public Content getPropertyDetailsHeader(Content memberDetails) { + memberDetails.add(MarkerComments.START_OF_PROPERTY_DETAILS); + Content propertyDetailsContent = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, contents.propertyDetailsLabel); - propertyDetailsTree.add(heading); - return propertyDetailsTree; + propertyDetailsContent.add(heading); + return propertyDetailsContent; } @Override - public Content getPropertyDocTreeHeader(ExecutableElement property) { - Content propertyDocTree = new ContentBuilder(); - Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, + public Content getPropertyHeaderContent(ExecutableElement property) { + Content content = new ContentBuilder(); + var heading = HtmlTree.HEADING(Headings.TypeDeclaration.MEMBER_HEADING, Text.of(utils.getPropertyLabel(name(property)))); - propertyDocTree.add(heading); - return HtmlTree.SECTION(HtmlStyle.detail, propertyDocTree) + content.add(heading); + return HtmlTree.SECTION(HtmlStyle.detail, content) .setId(htmlIds.forProperty(property)); } @@ -96,20 +91,20 @@ public class PropertyWriterImpl extends AbstractMemberWriter } @Override - public void addDeprecated(ExecutableElement property, Content propertyDocTree) { + public void addDeprecated(ExecutableElement property, Content propertyContent) { } @Override - public void addPreview(ExecutableElement property, Content propertyDocTree) { + public void addPreview(ExecutableElement property, Content content) { } @Override - public void addComments(ExecutableElement property, Content propertyDocTree) { + public void addComments(ExecutableElement property, Content propertyContent) { TypeElement holder = (TypeElement)property.getEnclosingElement(); if (!utils.getFullBody(property).isEmpty()) { if (holder.equals(typeElement) || (!utils.isPublic(holder) || utils.isLinkable(holder))) { - writer.addInlineComment(property, propertyDocTree); + writer.addInlineComment(property, propertyContent); } else { if (!utils.hasHiddenTag(holder) && !utils.hasHiddenTag(property)) { Content link = @@ -117,39 +112,39 @@ public class PropertyWriterImpl extends AbstractMemberWriter holder, property, utils.isIncluded(holder) ? holder.getSimpleName() : holder.getQualifiedName()); - Content codeLink = HtmlTree.CODE(link); - Content descriptionFromLabel = HtmlTree.SPAN(HtmlStyle.descriptionFromTypeLabel, + var codeLink = HtmlTree.CODE(link); + var descriptionFromLabel = HtmlTree.SPAN(HtmlStyle.descriptionFromTypeLabel, utils.isClass(holder) ? contents.descriptionFromClassLabel : contents.descriptionFromInterfaceLabel); descriptionFromLabel.add(Entity.NO_BREAK_SPACE); descriptionFromLabel.add(codeLink); - propertyDocTree.add(HtmlTree.DIV(HtmlStyle.block, descriptionFromLabel)); + propertyContent.add(HtmlTree.DIV(HtmlStyle.block, descriptionFromLabel)); } - writer.addInlineComment(property, propertyDocTree); + writer.addInlineComment(property, propertyContent); } } } @Override - public void addTags(ExecutableElement property, Content propertyDocTree) { - writer.addTagsInfo(property, propertyDocTree); + public void addTags(ExecutableElement property, Content propertyContent) { + writer.addTagsInfo(property, propertyContent); } @Override - public Content getPropertyDetails(Content propertyDetailsTreeHeader, Content propertyDetailsTree) { + public Content getPropertyDetails(Content memberDetailsHeader, Content memberDetails) { return writer.getDetailsListItem( HtmlTree.SECTION(HtmlStyle.propertyDetails) .setId(HtmlIds.PROPERTY_DETAIL) - .add(propertyDetailsTreeHeader) - .add(propertyDetailsTree)); + .add(memberDetailsHeader) + .add(memberDetails)); } @Override - public void addSummaryLabel(Content memberTree) { - Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, + public void addSummaryLabel(Content content) { + var label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, contents.propertySummaryLabel); - memberTree.add(label); + content.add(label); } @Override @@ -167,7 +162,7 @@ public class PropertyWriterImpl extends AbstractMemberWriter } @Override - public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) { + public void addInheritedSummaryLabel(TypeElement typeElement, Content content) { Content classLink = writer.getPreQualifiedClassLink( HtmlLinkInfo.Kind.MEMBER, typeElement); Content label; @@ -180,38 +175,38 @@ public class PropertyWriterImpl extends AbstractMemberWriter ? resources.getText("doclet.Properties_Inherited_From_Class") : resources.getText("doclet.Properties_Inherited_From_Interface")); } - HtmlTree labelHeading = + var labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING, label) .setId(htmlIds.forInheritedProperties(typeElement)) .add(Entity.NO_BREAK_SPACE) .add(classLink); - inheritedTree.add(labelHeading); + content.add(labelHeading); } @Override protected void addSummaryLink(HtmlLinkInfo.Kind context, TypeElement typeElement, Element member, - Content tdSummary) { + Content content) { Content memberLink = writer.getDocLink(context, typeElement, member, Text.of(utils.getPropertyLabel(name(member))), HtmlStyle.memberNameLink, true); - Content code = HtmlTree.CODE(memberLink); - tdSummary.add(code); + var code = HtmlTree.CODE(memberLink); + content.add(code); } @Override - protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) { + protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content target) { String mname = name(member); Content content = writer.getDocLink(HtmlLinkInfo.Kind.MEMBER, typeElement, member, utils.isProperty(mname) ? utils.getPropertyName(mname) : mname, true); - linksTree.add(content); + target.add(content); } @Override - protected void addSummaryType(Element member, Content tdSummaryType) { - addModifierAndType(member, utils.getReturnType(typeElement, (ExecutableElement)member), tdSummaryType); + protected void addSummaryType(Element member, Content content) { + addModifiersAndType(member, utils.getReturnType(typeElement, (ExecutableElement)member), content); } @Override @@ -220,8 +215,4 @@ public class PropertyWriterImpl extends AbstractMemberWriter utils.getFullyQualifiedName(member)); } - @Override - public Content getMemberTreeHeader(){ - return writer.getMemberTreeHeader(); - } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java index 242ebf371999841833b6f5a2fe3aa6d5866c0a33..26d0ad4b117f8721cb54c7eabced040a4afba6d6 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java @@ -44,11 +44,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.IndexItem; /** * Generates the Serialized Form Information Page, serialized-form.html. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class SerializedFormWriterImpl extends SubWriterHolderWriter implements SerializedFormWriter { @@ -68,24 +63,24 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter * Get the given header. * * @param header the header to write - * @return the body content tree + * @return the body content */ @Override public Content getHeader(String header) { - HtmlTree bodyTree = getBody(getWindowTitle(header)); + HtmlTree body = getBody(getWindowTitle(header)); Content h1Content = Text.of(header); - Content heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, + var heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, h1Content); - Content div = HtmlTree.DIV(HtmlStyle.header, heading); + var div = HtmlTree.DIV(HtmlStyle.header, heading); bodyContents.setHeader(getHeader(PageMode.SERIALIZED_FORM)) .addMainContent(div); - return bodyTree; + return body; } /** * Get the serialized form summaries header. * - * @return the serialized form summary header tree + * @return the serialized form summaries header */ @Override public Content getSerializedSummariesHeader() { @@ -102,30 +97,18 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter return HtmlTree.SECTION(HtmlStyle.serializedPackageContainer); } - /** - * Get the given package header. - * - * @param packageElement the package element to write - * @return a content tree for the package header - */ @Override public Content getPackageHeader(PackageElement packageElement) { - Content heading = HtmlTree.HEADING_TITLE(Headings.SerializedForm.PACKAGE_HEADING, + var heading = HtmlTree.HEADING_TITLE(Headings.SerializedForm.PACKAGE_HEADING, contents.packageLabel); heading.add(Entity.NO_BREAK_SPACE); heading.add(getPackageLink(packageElement, Text.of(utils.getPackageName(packageElement)))); return heading; } - /** - * Get the serialized class header. - * - * @return a content tree for the serialized class header - */ @Override public Content getClassSerializedHeader() { return HtmlTree.UL(HtmlStyle.blockList); - } /** @@ -139,19 +122,13 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter && !utils.hasHiddenTag(typeElement); } - /** - * Get the serializable class heading. - * - * @param typeElement the class being processed - * @return a content tree for the class header - */ @Override public Content getClassHeader(TypeElement typeElement) { Content classLink = (isVisibleClass(typeElement)) ? getLink(new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.DEFAULT, typeElement) .label(configuration.getClassName(typeElement))) : Text.of(utils.getFullyQualifiedName(typeElement)); - Content section = HtmlTree.SECTION(HtmlStyle.serializedClassDetails) + var section = HtmlTree.SECTION(HtmlStyle.serializedClassDetails) .setId(htmlIds.forClass(typeElement)); Content superClassLink = typeElement.getSuperclass() != null ? getLink(new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.SERIALIZED_FORM, @@ -180,11 +157,6 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter return section; } - /** - * Get the serial UID info header. - * - * @return a content tree for the serial uid info header - */ @Override public Content getSerialUIDInfoHeader() { return HtmlTree.DL(HtmlStyle.nameValue); @@ -195,46 +167,40 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter * * @param header the header that will show up before the UID. * @param serialUID the serial UID to print. - * @param serialUidTree the serial UID content tree to which the serial UID - * content will be added + * @param target the serial UID content to which the serial UID + * content will be added */ @Override public void addSerialUIDInfo(String header, String serialUID, - Content serialUidTree) + Content target) { Content headerContent = Text.of(header); - serialUidTree.add(HtmlTree.DT(headerContent)); + target.add(HtmlTree.DT(headerContent)); Content serialContent = Text.of(serialUID); - serialUidTree.add(HtmlTree.DD(serialContent)); + target.add(HtmlTree.DD(serialContent)); } - /** - * Get the class serialize content header. - * - * @return a content tree for the class serialize content header - */ @Override public Content getClassContentHeader() { return HtmlTree.UL(HtmlStyle.blockList); - } /** - * Add the serialized content tree section. + * Add the serialized content section. * - * @param serializedTreeContent the serialized content tree to be added + * @param source the serialized content to be added */ @Override - public void addSerializedContent(Content serializedTreeContent) { - bodyContents.addMainContent(serializedTreeContent); + public void addSerializedContent(Content source) { + bodyContents.addMainContent(source); } @Override - public void addPackageSerializedTree(Content serializedSummariesTree, - Content packageSerializedTree) + public void addPackageSerialized(Content serializedSummaries, + Content packageSerialized) { - serializedSummariesTree.add(HtmlTree.LI(packageSerializedTree)); + serializedSummaries.add(HtmlTree.LI(packageSerialized)); } /** @@ -246,9 +212,9 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter } @Override - public void printDocument(Content serializedTree) throws DocFileIOException { - serializedTree.add(bodyContents); - printHtmlDocument(null, "serialized forms", serializedTree); + public void printDocument(Content source) throws DocFileIOException { + source.add(bodyContents); + printHtmlDocument(null, "serialized forms", source); if (configuration.mainIndex != null) { configuration.mainIndex.add(IndexItem.of(IndexItem.Category.TAGS, diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Signatures.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Signatures.java index 6b54c48b975a49957834b008fe8b7bc3e5680972..94a45588a800a2188e0130e9633ea020448f6c6c 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Signatures.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Signatures.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ import javax.lang.model.element.TypeElement; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.ElementKindVisitor14; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Set; import java.util.SortedSet; @@ -66,7 +65,7 @@ import static javax.lang.model.element.Modifier.SYNCHRONIZED; public class Signatures { public static Content getModuleSignature(ModuleElement mdle, ModuleWriterImpl moduleWriter) { - Content signature = HtmlTree.DIV(HtmlStyle.moduleSignature); + var signature = HtmlTree.DIV(HtmlStyle.moduleSignature); Content annotations = moduleWriter.getAnnotationInfo(mdle, true); if (!annotations.isEmpty()) { signature.add(HtmlTree.SPAN(HtmlStyle.annotations, annotations)); @@ -76,7 +75,7 @@ public class Signatures { ? "open module" : "module"; signature.add(label); signature.add(" "); - HtmlTree nameSpan = new HtmlTree(TagName.SPAN).setStyle(HtmlStyle.elementName); + var nameSpan = new HtmlTree(TagName.SPAN).setStyle(HtmlStyle.elementName); nameSpan.add(mdle.getQualifiedName().toString()); signature.add(nameSpan); return signature; @@ -86,13 +85,13 @@ public class Signatures { if (pkg.isUnnamed()) { return Text.EMPTY; } - Content signature = HtmlTree.DIV(HtmlStyle.packageSignature); + var signature = HtmlTree.DIV(HtmlStyle.packageSignature); Content annotations = pkgWriter.getAnnotationInfo(pkg, true); if (!annotations.isEmpty()) { signature.add(HtmlTree.SPAN(HtmlStyle.annotations, annotations)); } signature.add("package "); - HtmlTree nameSpan = new HtmlTree(TagName.SPAN).setStyle(HtmlStyle.elementName); + var nameSpan = new HtmlTree(TagName.SPAN).setStyle(HtmlStyle.elementName); nameSpan.add(pkg.getQualifiedName().toString()); signature.add(nameSpan); return signature; @@ -106,7 +105,7 @@ public class Signatures { private final HtmlConfiguration configuration; private Content modifiers; - private static final Set previewModifiers = Collections.emptySet(); + private static final Set previewModifiers = Set.of(); TypeSignature(TypeElement typeElement, HtmlDocletWriter writer) { this.typeElement = typeElement; @@ -129,7 +128,7 @@ public class Signatures { } content.add(HtmlTree.SPAN(HtmlStyle.modifiers, modifiers)); - HtmlTree nameSpan = new HtmlTree(TagName.SPAN).setStyle(HtmlStyle.elementName); + var nameSpan = new HtmlTree(TagName.SPAN).setStyle(HtmlStyle.elementName); Content className = Text.of(utils.getSimpleName(typeElement)); if (configuration.getOptions().linkSource()) { writer.addSrcLink(typeElement, className, nameSpan); @@ -146,10 +145,10 @@ public class Signatures { if (utils.isRecord(typeElement)) { content.add(getRecordComponents()); } - if (!utils.isAnnotationType(typeElement)) { - Content extendsImplements = new HtmlTree(TagName.SPAN) + if (!utils.isAnnotationInterface(typeElement)) { + var extendsImplements = new HtmlTree(TagName.SPAN) .setStyle(HtmlStyle.extendsImplements); - if (!utils.isInterface(typeElement)) { + if (!utils.isPlainInterface(typeElement)) { TypeMirror superclass = utils.getFirstVisibleSuperClass(typeElement); if (superclass != null) { content.add(DocletConstants.NL); @@ -170,7 +169,7 @@ public class Signatures { } if (isFirst) { extendsImplements.add(DocletConstants.NL); - extendsImplements.add(utils.isInterface(typeElement) ? "extends " : "implements "); + extendsImplements.add(utils.isPlainInterface(typeElement) ? "extends " : "implements "); isFirst = false; } else { extendsImplements.add(", "); @@ -190,7 +189,7 @@ public class Signatures { .filter(t -> utils.isLinkable(utils.asTypeElement(t))) .toList(); if (!linkablePermits.isEmpty()) { - Content permitsSpan = new HtmlTree(TagName.SPAN).setStyle(HtmlStyle.permits); + var permitsSpan = new HtmlTree(TagName.SPAN).setStyle(HtmlStyle.permits); boolean isFirst = true; for (TypeMirror type : linkablePermits) { if (isFirst) { @@ -379,7 +378,7 @@ public class Signatures { /** * Set the type parameters for an executable member. * - * @param typeParameters the content tree containing the type parameters to add. + * @param typeParameters the type parameters to add. * @return this instance */ MemberSignature setTypeParameters(Content typeParameters) { @@ -390,7 +389,7 @@ public class Signatures { /** * Set the return type for an executable member. * - * @param returnType the content tree containing the return type to add. + * @param returnType the return type to add. * @return this instance */ MemberSignature setReturnType(Content returnType) { @@ -412,33 +411,33 @@ public class Signatures { /** * Set the parameter information of an executable member. * - * @param paramTree the content tree containing the parameter information. + * @param content the parameter information. * @return this instance */ - MemberSignature setParameters(Content paramTree) { - this.parameters = paramTree; + MemberSignature setParameters(Content content) { + this.parameters = content; return this; } /** * Set the exception information of an executable member. * - * @param exceptionTree the content tree containing the exception information + * @param content the exception information * @return this instance */ - MemberSignature setExceptions(Content exceptionTree) { - this.exceptions = exceptionTree; + MemberSignature setExceptions(Content content) { + this.exceptions = content; return this; } /** * Set the annotation information of a member. * - * @param annotationTree the content tree containing the exception information + * @param content the exception information * @return this instance */ - MemberSignature setAnnotations(Content annotationTree) { - this.annotations = annotationTree; + MemberSignature setAnnotations(Content content) { + this.annotations = content; return this; } @@ -473,7 +472,7 @@ public class Signatures { } // Name - HtmlTree nameSpan = new HtmlTree(TagName.SPAN).setStyle(HtmlStyle.elementName); + var nameSpan = new HtmlTree(TagName.SPAN).setStyle(HtmlStyle.elementName); if (memberWriter.options.linkSource()) { Content name = Text.of(memberWriter.name(element)); memberWriter.writer.addSrcLink(element, name, nameSpan); @@ -491,12 +490,12 @@ public class Signatures { } /** - * Adds the modifier for the member. The modifiers are ordered as specified + * Adds the modifiers for the member. The modifiers are ordered as specified * by The Java Language Specification. * - * @param htmlTree the content tree to which the modifier information will be added + * @param target the content to which the modifier information will be added */ - private void appendModifiers(Content htmlTree) { + private void appendModifiers(Content target) { Set set = new TreeSet<>(element.getModifiers()); // remove the ones we really don't need @@ -508,7 +507,7 @@ public class Signatures { // interface methods and fields. if ((utils.isField(element) || utils.isMethod(element))) { Element te = element.getEnclosingElement(); - if (utils.isInterface(te) || utils.isAnnotationType(te)) { + if (utils.isInterface(te)) { // Remove the implicit abstract and public modifiers if (utils.isMethod(element)) { set.remove(ABSTRACT); @@ -518,7 +517,7 @@ public class Signatures { } if (!set.isEmpty()) { String mods = set.stream().map(Modifier::toString).collect(Collectors.joining(" ")); - htmlTree.add(HtmlTree.SPAN(HtmlStyle.modifiers, Text.of(mods))) + target.add(HtmlTree.SPAN(HtmlStyle.modifiers, Text.of(mods))) .add(Entity.NO_BREAK_SPACE); } } @@ -526,30 +525,30 @@ public class Signatures { /** * Appends the type parameter information to the HTML tree. * - * @param htmlTree the HTML tree + * @param target the HTML tree * @param lastLineSeparator index of last line separator in the HTML tree * @return the new index of the last line separator */ - private int appendTypeParameters(Content htmlTree, int lastLineSeparator) { + private int appendTypeParameters(Content target, int lastLineSeparator) { // Apply different wrapping strategies for type parameters // depending of combined length of type parameters and return type. int typeParamLength = typeParameters.charCount(); if (typeParamLength >= TYPE_PARAMS_MAX_INLINE_LENGTH) { - htmlTree.add(HtmlTree.SPAN(HtmlStyle.typeParametersLong, typeParameters)); + target.add(HtmlTree.SPAN(HtmlStyle.typeParametersLong, typeParameters)); } else { - htmlTree.add(HtmlTree.SPAN(HtmlStyle.typeParameters, typeParameters)); + target.add(HtmlTree.SPAN(HtmlStyle.typeParameters, typeParameters)); } - int lineLength = htmlTree.charCount() - lastLineSeparator; + int lineLength = target.charCount() - lastLineSeparator; int newLastLineSeparator = lastLineSeparator; // sum below includes length of modifiers plus type params added above if (lineLength + returnType.charCount() > RETURN_TYPE_MAX_LINE_LENGTH) { - htmlTree.add(DocletConstants.NL); - newLastLineSeparator = htmlTree.charCount(); + target.add(DocletConstants.NL); + newLastLineSeparator = target.charCount(); } else { - htmlTree.add(Entity.NO_BREAK_SPACE); + target.add(Entity.NO_BREAK_SPACE); } return newLastLineSeparator; @@ -558,25 +557,25 @@ public class Signatures { /** * Appends the parameters and exceptions information to the HTML tree. * - * @param htmlTree the HTML tree + * @param target the HTML tree * @param lastLineSeparator the index of the last line separator in the HTML tree */ - private void appendParametersAndExceptions(Content htmlTree, int lastLineSeparator) { + private void appendParametersAndExceptions(Content target, int lastLineSeparator) { // Record current position for indentation of exceptions - int indentSize = htmlTree.charCount() - lastLineSeparator; + int indentSize = target.charCount() - lastLineSeparator; if (parameters.charCount() == 2) { // empty parameters are added without packing - htmlTree.add(parameters); + target.add(parameters); } else { - htmlTree.add(new HtmlTree(TagName.WBR)) + target.add(new HtmlTree(TagName.WBR)) .add(HtmlTree.SPAN(HtmlStyle.parameters, parameters)); } // Exceptions if (exceptions != null && !exceptions.isEmpty()) { CharSequence indent = " ".repeat(Math.max(0, indentSize + 1 - 7)); - htmlTree.add(DocletConstants.NL) + target.add(DocletConstants.NL) .add(indent) .add("throws ") .add(HtmlTree.SPAN(HtmlStyle.exceptions, exceptions)); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java index 4efa6a70d229eb80bf471a8b56c6a6c391b8232f..63ddf6ef2c0d9ca6223653ad034086bf19bfe0bc 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java @@ -56,11 +56,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.Utils; /** * Converts Java Source Code to HTML. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class SourceToHTMLConverter { @@ -207,8 +202,8 @@ public class SourceToHTMLConverter { .resolve(configuration.docPaths.forPackage(te)) .invert(); Content body = getHeader(); - Content pre = new HtmlTree(TagName.PRE); - try (LineNumberReader reader = new LineNumberReader(r)) { + var pre = new HtmlTree(TagName.PRE); + try (var reader = new LineNumberReader(r)) { while ((line = reader.readLine()) != null) { addLineNo(pre, lineno); addLine(pre, line, lineno); @@ -216,7 +211,7 @@ public class SourceToHTMLConverter { } } addBlankLines(pre); - Content div = HtmlTree.DIV(HtmlStyle.sourceContainer, pre); + var div = HtmlTree.DIV(HtmlStyle.sourceContainer, pre); body.add(HtmlTree.MAIN(div)); writeToFile(body, outputdir.resolve(configuration.docPaths.forClass(te)), te); } catch (IOException e) { @@ -240,16 +235,16 @@ public class SourceToHTMLConverter { .setGenerator(HtmlDocletWriter.getGenerator(getClass())) .addDefaultScript(false) .setStylesheets(configuration.getMainStylesheet(), configuration.getAdditionalStylesheets()); - Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(), head, body); - HtmlDocument htmlDocument = new HtmlDocument(htmlTree); + var html = HtmlTree.HTML(configuration.getLocale().getLanguage(), head, body); + HtmlDocument document = new HtmlDocument(html); messages.notice("doclet.Generating_0", path.getPath()); - htmlDocument.write(DocFile.createFileForOutput(configuration, path)); + document.write(DocFile.createFileForOutput(configuration, path)); } /** * Returns a link to the stylesheet file. * - * @param head an HtmlTree to which the stylesheet links will be added + * @param head the content to which the stylesheet links will be added */ public void addStyleSheetProperties(Content head) { String filename = options.stylesheetFile(); @@ -261,18 +256,18 @@ public class SourceToHTMLConverter { stylesheet = DocPaths.STYLESHEET; } DocPath p = relativePath.resolve(stylesheet); - HtmlTree link = HtmlTree.LINK("stylesheet", "text/css", p.getPath(), "Style"); + var link = HtmlTree.LINK("stylesheet", "text/css", p.getPath(), "Style"); head.add(link); addStylesheets(head); } - protected void addStylesheets(Content tree) { + protected void addStylesheets(Content head) { options.additionalStylesheets().forEach(css -> { DocFile file = DocFile.createFileForInput(configuration, css); DocPath cssPath = DocPath.create(file.getName()); - HtmlTree slink = HtmlTree.LINK("stylesheet", "text/css", relativePath.resolve(cssPath).getPath(), - "Style"); - tree.add(slink); + var slink = HtmlTree.LINK("stylesheet", "text/css", relativePath.resolve(cssPath).getPath(), + "Style"); + head.add(slink); }); } @@ -288,11 +283,11 @@ public class SourceToHTMLConverter { /** * Add the line numbers for the source code. * - * @param pre the content tree to which the line number will be added + * @param pre the content to which the line number will be added * @param lineno The line number */ private static void addLineNo(Content pre, int lineno) { - HtmlTree span = new HtmlTree(TagName.SPAN); + var span = new HtmlTree(TagName.SPAN); span.setStyle(HtmlStyle.sourceLineNo); if (lineno < 10) { span.add("00" + Integer.toString(lineno)); @@ -307,13 +302,13 @@ public class SourceToHTMLConverter { /** * Add a line from source to the HTML file that is generated. * - * @param pre the content tree to which the line will be added. + * @param pre the content to which the line will be added. * @param line the string to format. * @param currentLineNo the current number. */ private void addLine(Content pre, String line, int currentLineNo) { if (line != null) { - Content anchor = HtmlTree.SPAN_ID( + var anchor = HtmlTree.SPAN_ID( HtmlIds.forLine(currentLineNo), Text.of(utils.replaceTabs(line))); pre.add(anchor); @@ -324,7 +319,7 @@ public class SourceToHTMLConverter { /** * Add trailing blank lines at the end of the page. * - * @param pre the content tree to which the blank lines will be added. + * @param pre the content to which the blank lines will be added. */ private static void addBlankLines(Content pre) { for (int i = 0; i < NUM_BLANK_LINES; i++) { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java index 0a22ce4ae4a1333b0166534658632991167aba35..850dc49bb0d1654519d0963c518d71253f225f69 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java @@ -48,11 +48,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPath; * can not be used effectively to change formatting. The concrete * class subclass of this class can be subclassed to change formatting. * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - * * @see AbstractMemberWriter * @see ClassWriterImpl */ @@ -71,10 +66,10 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { * Add the summary header. * * @param mw the writer for the member being documented - * @param memberTree the content tree to which the summary header will be added + * @param memberContent the content to which the summary header will be added */ - public void addSummaryHeader(AbstractMemberWriter mw, Content memberTree) { - mw.addSummaryLabel(memberTree); + public void addSummaryHeader(AbstractMemberWriter mw, Content memberContent) { + mw.addSummaryLabel(memberContent); } /** @@ -82,22 +77,22 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { * * @param mw the writer for the member being documented * @param typeElement the te to be documented - * @param inheritedTree the content tree to which the inherited summary header will be added + * @param inheritedContent the content to which the inherited summary header will be added */ public void addInheritedSummaryHeader(AbstractMemberWriter mw, TypeElement typeElement, - Content inheritedTree) { - mw.addInheritedSummaryLabel(typeElement, inheritedTree); + Content inheritedContent) { + mw.addInheritedSummaryLabel(typeElement, inheritedContent); } /** * Add the index comment. * * @param member the member being documented - * @param contentTree the content tree to which the comment will be added + * @param content the content to which the comment will be added */ - protected void addIndexComment(Element member, Content contentTree) { + protected void addIndexComment(Element member, Content content) { List tags = utils.getFirstSentenceTrees(member); - addIndexComment(member, tags, contentTree); + addIndexComment(member, tags, content); } /** @@ -105,41 +100,41 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { * * @param member the member being documented * @param firstSentenceTags the first sentence tags for the member to be documented - * @param tdSummary the content tree to which the comment will be added + * @param tdSummaryContent the content to which the comment will be added */ protected void addIndexComment(Element member, List firstSentenceTags, - Content tdSummary) { - addPreviewSummary(member, tdSummary); + Content tdSummaryContent) { + addPreviewSummary(member, tdSummaryContent); List deprs = utils.getDeprecatedTrees(member); Content div; if (utils.isDeprecated(member)) { - Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(member)); + var deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(member)); div = HtmlTree.DIV(HtmlStyle.block, deprLabel); if (!deprs.isEmpty()) { addSummaryDeprecatedComment(member, deprs.get(0), div); } - tdSummary.add(div); + tdSummaryContent.add(div); return; } else { Element te = member.getEnclosingElement(); if (te != null && utils.isTypeElement(te) && utils.isDeprecated(te)) { - Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(te)); + var deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(te)); div = HtmlTree.DIV(HtmlStyle.block, deprLabel); - tdSummary.add(div); + tdSummaryContent.add(div); } } - addSummaryComment(member, firstSentenceTags, tdSummary); + addSummaryComment(member, firstSentenceTags, tdSummaryContent); } /** * Add the summary link for the member. * * @param member the member to be documented - * @param contentTree the content tree to which the link will be added + * @param content the content to which the link will be added */ - public void addSummaryLinkComment(Element member, Content contentTree) { + public void addSummaryLinkComment(Element member, Content content) { List tags = utils.getFirstSentenceTrees(member); - addSummaryLinkComment(member, tags, contentTree); + addSummaryLinkComment(member, tags, content); } /** @@ -147,10 +142,10 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { * * @param member the member being documented * @param firstSentenceTags the first sentence tags for the member to be documented - * @param tdSummary the content tree to which the comment will be added + * @param tdSummaryContent the content to which the comment will be added */ - public void addSummaryLinkComment(Element member, List firstSentenceTags, Content tdSummary) { - addIndexComment(member, firstSentenceTags, tdSummary); + public void addSummaryLinkComment(Element member, List firstSentenceTags, Content tdSummaryContent) { + addIndexComment(member, firstSentenceTags, tdSummaryContent); } /** @@ -159,53 +154,49 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { * @param mw the writer for the member being documented * @param typeElement the class being documented * @param member the member being documented - * @param isFirst true if its the first link being documented - * @param linksTree the content tree to which the summary will be added + * @param isFirst true if it is the first link being documented + * @param linksContent the content to which the summary will be added */ public void addInheritedMemberSummary(AbstractMemberWriter mw, TypeElement typeElement, Element member, boolean isFirst, - Content linksTree) { + Content linksContent) { if (!isFirst) { - linksTree.add(", "); + linksContent.add(", "); } - mw.addInheritedSummaryLink(typeElement, member, linksTree); + mw.addInheritedSummaryLink(typeElement, member, linksContent); } /** - * Get the document content header tree - * - * @return a content tree the document content header + * {@return the document content header} */ public Content getContentHeader() { return new ContentBuilder(); } /** - * Add the class content tree. + * Add the class content. * - * @param classContentTree class content tree which will be added to the content tree + * @param source class content which will be added to the documentation */ - public void addClassContentTree(Content classContentTree) { - bodyContents.addMainContent(classContentTree); + public void addClassContent(Content source) { + bodyContents.addMainContent(source); } /** - * Add the annotation content tree. + * Add the annotation content. * - * @param annotationContentTree annotation content tree which will be added to the content tree + * @param source annotation content which will be added to the documentation */ - public void addAnnotationContentTree(Content annotationContentTree) { - addClassContentTree(annotationContentTree); + public void addAnnotationContent(Content source) { + addClassContent(source); } /** - * Get the member header tree - * - * @return a content tree for the member header + * {@return the member header} */ - public Content getMemberTreeHeader() { + public Content getMemberHeader() { return HtmlTree.UL(HtmlStyle.blockList); } @@ -249,81 +240,75 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { } /** - * Returns a list to be used for the list of members of a given kind. - * - * @return a list to be used for the list of members of a given kind + * {@return a list to add member items to} */ public Content getMemberList() { return HtmlTree.UL(HtmlStyle.memberList); } /** - * Returns an item for the list of elements of a given kind + * {@return a member item} * - * @param content content for the item - * @return an item for the list of elements of a given kind + * @param member the member to represent as an item */ - public Content getMemberListItem(Content content) { - return HtmlTree.LI(content); + public Content getMemberListItem(Content member) { + return HtmlTree.LI(member); } - public Content getMemberInheritedTree() { + public Content getMemberInherited() { return HtmlTree.DIV(HtmlStyle.inheritedList); } /** - * Adds a section for a summary tree with the given CSS {@code class} and {@code id} attribute. + * Adds a section for a summary with the given CSS {@code class} and {@code id} attribute. * - * @param style the CSS class for the section - * @param htmlId the id for the section - * @param summariesList the list of summary sections to which the summary will be added - * @param content the content tree representing the summary + * @param style the CSS class for the section + * @param htmlId the id for the section + * @param target the list of summary sections to which the summary will be added + * @param source the content representing the summary */ - public void addSummary(HtmlStyle style, HtmlId htmlId, Content summariesList, Content content) { - HtmlTree htmlTree = HtmlTree.SECTION(style, content) + public void addSummary(HtmlStyle style, HtmlId htmlId, Content target, Content source) { + var htmlTree = HtmlTree.SECTION(style, source) .setId(htmlId); - summariesList.add(getSummariesListItem(htmlTree)); + target.add(getSummariesListItem(htmlTree)); } /** - * Get the member tree + * {@return the member content} * - * @param contentTree the tree used to generate the complete member tree - * @return a content tree for the member + * @param content the content used to generate the complete member */ - public Content getMemberTree(Content contentTree) { - return HtmlTree.LI(contentTree); + public Content getMember(Content content) { + return HtmlTree.LI(content); } /** - * Get the member summary tree + * {@return the member summary content} * - * @param contentTree the tree used to generate the member summary tree - * @return a content tree for the member summary + * @param memberContent the content used to generate the member summary */ - public Content getMemberSummaryTree(Content contentTree) { - return HtmlTree.SECTION(HtmlStyle.summary, contentTree); + public Content getMemberSummary(Content memberContent) { + return HtmlTree.SECTION(HtmlStyle.summary, memberContent); } /** - * Get the member details tree + * {@return the member details} * - * @param contentTree the tree used to generate the member details tree - * @return a content tree for the member details + * @param content the content used to generate the member details */ - public Content getMemberDetailsTree(Content contentTree) { - return HtmlTree.SECTION(HtmlStyle.details, contentTree); + public Content getMemberDetailsContent(Content content) { + return HtmlTree.SECTION(HtmlStyle.details, content); } /** - * Get the member tree + * Get the member content * - * @param id the id to be used for the content tree - * @param style the style class to be added to the content tree - * @param contentTree the tree used to generate the complete member tree - * @return the member tree + * @param id the id to be used for the content + * @param style the style class to be added to the content + * @param source the content used to generate the complete member content + * @return the member content */ - public Content getMemberTree(HtmlId id, HtmlStyle style, Content contentTree) { - return HtmlTree.SECTION(style, contentTree).setId(id); + public Content getMember(HtmlId id, HtmlStyle style, Content source) { + return HtmlTree.SECTION(style, source).setId(id); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SummaryListWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SummaryListWriter.java index 56bf9b59fe45a54b4fdbb1f5d48a7fa2fe9e5c4f..a35aa7e66866878f88a60484b1845746c42bea5b 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SummaryListWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SummaryListWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,11 +47,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.SummaryAPIListBuilder.SummaryEl /** * Base class for generating a summary page that lists elements with a common characteristic, * such as deprecated elements, preview elements, and so on. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class SummaryListWriter extends SubWriterHolderWriter { @@ -146,28 +141,28 @@ public class SummaryListWriter extends SubWrite * * @param id the id for the link * @param headingKey - * @param contentTree the content tree to which the index link will be added + * @param content the content to which the index link will be added */ - protected void addIndexLink(HtmlId id, String headingKey, Content contentTree) { - Content li = HtmlTree.LI(links.createLink(id, + protected void addIndexLink(HtmlId id, String headingKey, Content content) { + var li = HtmlTree.LI(links.createLink(id, contents.getContent(headingKey))); - contentTree.add(li); + content.add(li); } /** * Get the contents list. * * @param apiSummary the summary list builder - * @return a content tree for the contents list + * @return the contents list */ public Content getContentsList(L apiSummary) { - Content heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, + var heading = HtmlTree.HEADING_TITLE(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, headContent); - Content div = HtmlTree.DIV(HtmlStyle.header, heading); + var div = HtmlTree.DIV(HtmlStyle.header, heading); Content headingContent = contents.contentsHeading; div.add(HtmlTree.HEADING_TITLE(Headings.CONTENT_HEADING, headingContent)); - Content ul = new HtmlTree(TagName.UL); + var ul = new HtmlTree(TagName.UL); addExtraIndexLink(apiSummary, ul); for (SummaryElementKind kind : SummaryElementKind.values()) { if (apiSummary.hasDocumentation(kind)) { @@ -179,29 +174,27 @@ public class SummaryListWriter extends SubWrite } /** - * Get the header for the API Summary Listing. - * - * @return a content tree for the header + * {@return the header for the API Summary listing} */ public HtmlTree getHeader() { String title = resources.getText(titleKey); - HtmlTree bodyTree = getBody(getWindowTitle(title)); + HtmlTree body = getBody(getWindowTitle(title)); bodyContents.setHeader(getHeader(pageMode)); - return bodyTree; + return body; } /** - * Add summary information to the documentation tree + * Add summary information to the documentation * * @param apiList list of API summary elements * @param id the id attribute of the table * @param headingKey the caption for the summary table * @param headerKey table header key for the summary table - * @param contentTree the content tree to which the summary table will be added + * @param content the content to which the summary table will be added */ protected void addSummaryAPI(SortedSet apiList, HtmlId id, String headingKey, String headerKey, - Content contentTree) { + Content content) { if (apiList.size() > 0) { TableHeader tableHeader = new TableHeader( contents.getContent(headerKey), contents.descriptionLabel); @@ -231,7 +224,7 @@ public class SummaryListWriter extends SubWrite table.addRow(e, link, desc); } // note: singleton list - contentTree.add(HtmlTree.UL(HtmlStyle.blockList, HtmlTree.LI(table))); + content.add(HtmlTree.UL(HtmlStyle.blockList, HtmlTree.LI(table))); } } @@ -239,7 +232,7 @@ public class SummaryListWriter extends SubWrite * Add summary text for the given element. * * @param e the element for which the summary text should be added - * @param desc the target to which the text should be added + * @param desc the content to which the text should be added */ protected void addComments(Element e, Content desc) { } @@ -264,7 +257,7 @@ public class SummaryListWriter extends SubWrite * Add an extra optional section to the content. * * @param list the element list - * @param target the target content to which the section should be added + * @param target the content to which the section should be added */ protected void addExtraSection(L list, Content target) { } @@ -273,7 +266,7 @@ public class SummaryListWriter extends SubWrite * Add an extra optional index link. * * @param list the element list - * @param target the target content to which the link should be added + * @param target the content to which the link should be added */ protected void addExtraIndexLink(L list, Content target) { } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SystemPropertiesWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SystemPropertiesWriter.java index 89121697c7e2682cfcd4cf5ec5373f3583cb9150..d4de9b02040641a1cb39208b5258feb4a2f36d3b 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SystemPropertiesWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SystemPropertiesWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,11 +52,6 @@ import java.util.ArrayList; /** * Generates the file with the summary of all the system properties. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class SystemPropertiesWriter extends HtmlDocletWriter { @@ -119,11 +114,11 @@ public class SystemPropertiesWriter extends HtmlDocletWriter { } /** - * Adds all the system properties to the content tree. + * Adds all the system properties to the content. * - * @param content HtmlTree content to which the links will be added + * @param target the content to which the links will be added */ - protected void addSystemProperties(Content content) { + protected void addSystemProperties(Content target) { Map> searchIndexMap = groupSystemProperties(); Content separator = Text.of(", "); Table table = new Table(HtmlStyle.summaryTable) @@ -141,7 +136,7 @@ public class SystemPropertiesWriter extends HtmlDocletWriter { } table.addRow(propertyName, HtmlTree.DIV(HtmlStyle.block, separatedReferenceLinks)); } - content.add(table); + target.add(table); } private Map> groupSystemProperties() { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Table.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Table.java index 8cf2e3710f08c4460135dc8b8092415d80f4362b..92a4ddbb696d86c697cc163694e2c7fec7ae5933 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Table.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Table.java @@ -67,11 +67,6 @@ import jdk.javadoc.internal.doclets.toolkit.Content; * one of a list of tabs above the table. If the table does not support filtered * views, the caption element is typically displayed as a single (inactive) * tab. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class Table extends Content { private final HtmlStyle tableStyle; @@ -339,7 +334,7 @@ public class Table extends Content { for (Content c : contents) { HtmlStyle cellStyle = columnStyles.get(colIndex); // Replace invalid content with HtmlTree.EMPTY to make sure the cell isn't dropped - HtmlTree cell = HtmlTree.DIV(cellStyle, c.isValid() ? c : HtmlTree.EMPTY); + var cell = HtmlTree.DIV(cellStyle, c.isValid() ? c : HtmlTree.EMPTY); if (rowStyle != null) { cell.addStyle(rowStyle); } @@ -386,7 +381,7 @@ public class Table extends Content { default -> throw new IllegalStateException(); }; - HtmlTree table = HtmlTree.DIV(tableStyle).addStyle(columnStyle); + var table = HtmlTree.DIV(tableStyle).addStyle(columnStyle); if ((tabMap == null || tabs.size() == 1) && !alwaysShowDefaultTab) { if (tabMap == null) { main.add(caption); @@ -396,7 +391,7 @@ public class Table extends Content { table.add(getTableBody()); main.add(table); } else { - HtmlTree tablist = HtmlTree.DIV(tabListStyle) + var tablist = HtmlTree.DIV(tabListStyle) .put(HtmlAttr.ROLE, "tablist") .put(HtmlAttr.ARIA_ORIENTATION, "horizontal"); @@ -413,7 +408,7 @@ public class Table extends Content { if (id == null) { throw new IllegalStateException("no id set for table"); } - HtmlTree tabpanel = new HtmlTree(TagName.DIV) + var tabpanel = new HtmlTree(TagName.DIV) .setId(HtmlIds.forTabPanel(id)) .put(HtmlAttr.ROLE, "tabpanel"); table.add(getTableBody()); @@ -425,7 +420,7 @@ public class Table extends Content { } private HtmlTree createTab(HtmlId tabId, HtmlStyle style, boolean defaultTab, Content tabLabel) { - HtmlTree tab = new HtmlTree(TagName.BUTTON) + var tab = new HtmlTree(TagName.BUTTON) .setId(tabId) .put(HtmlAttr.ROLE, "tab") .put(HtmlAttr.ARIA_SELECTED, defaultTab ? "true" : "false") diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableHeader.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableHeader.java index 255f61a491b53e597f23b886141b8469013d7290..f695f6c2258a48bf935f3d80c5ee2ee40e3fef14 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableHeader.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,11 +42,6 @@ import jdk.javadoc.internal.doclets.toolkit.Content; * The header contains a list of {@code } cells, providing the column headers. * The attribute {@code scope="col"} is automatically added to each header cell. * In addition, a series of style class names can be specified, to be applied one per cell. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class TableHeader extends Content { @@ -145,7 +140,7 @@ public class TableHeader extends Content { : (i == 0) ? HtmlStyle.colFirst : (i == (cellContents.size() - 1)) ? HtmlStyle.colLast : (i == 1) ? HtmlStyle.colSecond : null; - HtmlTree cell = HtmlTree.DIV(HtmlStyle.tableHeader, cellContent); + var cell = HtmlTree.DIV(HtmlStyle.tableHeader, cellContent); if (style != null) { cell.addStyle(style); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java index adf98e0b8a0942c10524aca5bc002f94716d55fb..ae3ffd36d76edfd0754c4e223c2fcc94036c9254 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java @@ -80,11 +80,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.Utils.PreviewFlagProvider; /** * The taglet writer that writes HTML. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class TagletWriterImpl extends TagletWriter { @@ -202,8 +197,7 @@ public class TagletWriterImpl extends TagletWriter { @Override protected Content codeTagOutput(Element element, DocTree tag) { CommentHelper ch = utils.getCommentHelper(element); - Content result = HtmlTree.CODE(Text.of(utils.normalizeNewlines(ch.getText(tag)))); - return result; + return HtmlTree.CODE(Text.of(utils.normalizeNewlines(ch.getText(tag)))); } @Override @@ -223,7 +217,7 @@ public class TagletWriterImpl extends TagletWriter { } // ugly but simple; - // alternatives would be to walk the Content tree, or to add new functionality to Content + // alternatives would be to walk the Content's tree structure, or to add new functionality to Content private String extractText(Content c) { return c.toString().replaceAll("<[^>]+>", ""); } @@ -301,8 +295,8 @@ public class TagletWriterImpl extends TagletWriter { // define id attributes for state components so that generated descriptions may refer to them boolean defineID = (element.getKind() == ElementKind.RECORD) && !paramTag.isTypeParameter(); - Content nameTree = Text.of(paramName); - body.add(HtmlTree.CODE(defineID ? HtmlTree.SPAN_ID(HtmlIds.forParam(paramName), nameTree) : nameTree)); + Content nameContent = Text.of(paramName); + body.add(HtmlTree.CODE(defineID ? HtmlTree.SPAN_ID(HtmlIds.forParam(paramName), nameContent) : nameContent)); body.add(" - "); List description = ch.getDescription(paramTag); body.add(htmlWriter.commentTagsToContent(paramTag, element, description, context.within(paramTag))); @@ -353,7 +347,7 @@ public class TagletWriterImpl extends TagletWriter { // Use a different style if any link label is longer than 30 chars or contains commas. boolean hasLongLabels = links.stream() .anyMatch(c -> c.charCount() > SEE_TAG_MAX_INLINE_LENGTH || c.toString().contains(",")); - HtmlTree seeList = HtmlTree.UL(hasLongLabels ? HtmlStyle.seeListLong : HtmlStyle.seeList); + var seeList = HtmlTree.UL(hasLongLabels ? HtmlStyle.seeListLong : HtmlStyle.seeList); links.stream().filter(Content::isValid).forEach(item -> { seeList.add(HtmlTree.LI(item)); }); @@ -384,11 +378,11 @@ public class TagletWriterImpl extends TagletWriter { @Override protected Content snippetTagOutput(Element element, SnippetTree tag, StyledText content, String id, String lang) { - HtmlTree pre = new HtmlTree(TagName.PRE).setStyle(HtmlStyle.snippet); + var pre = new HtmlTree(TagName.PRE).setStyle(HtmlStyle.snippet); if (id != null && !id.isBlank()) { pre.put(HtmlAttr.ID, id); } - HtmlTree code = new HtmlTree(TagName.CODE) + var code = new HtmlTree(TagName.CODE) .add(HtmlTree.EMPTY); // Make sure the element is always rendered if (lang != null && !lang.isBlank()) { code.addStyle("language-" + lang); @@ -458,7 +452,7 @@ public class TagletWriterImpl extends TagletWriter { }); String copyText = resources.getText("doclet.Copy_snippet_to_clipboard"); String copiedText = resources.getText("doclet.Copied_snippet_to_clipboard"); - HtmlTree snippetContainer = HtmlTree.DIV(HtmlStyle.snippetContainer, + var snippetContainer = HtmlTree.DIV(HtmlStyle.snippetContainer, new HtmlTree(TagName.BUTTON) .add(HtmlTree.SPAN(Text.of(copyText)) .put(HtmlAttr.DATA_COPIED, copiedText)) @@ -525,15 +519,13 @@ public class TagletWriterImpl extends TagletWriter { body.add(" - "); body.add(desc); } - HtmlTree result = HtmlTree.DD(body); - return result; + return HtmlTree.DD(body); } @Override public Content throwsTagOutput(TypeMirror throwsType) { - HtmlTree result = HtmlTree.DD(HtmlTree.CODE(htmlWriter.getLink( + return HtmlTree.DD(HtmlTree.CODE(htmlWriter.getLink( new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.MEMBER, throwsType)))); - return result; } @Override diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java index 57b2b470dee83178bf8c72435fb4233c253f3727..d35c24047a9b32304d2394d21b18a298b1215a2c 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java @@ -45,11 +45,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; * ClassTree for building the Tree. The name of * the generated file is "overview-tree.html" and it is generated in the * current or the destination directory. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class TreeWriter extends AbstractTreeWriter { @@ -101,11 +96,11 @@ public class TreeWriter extends AbstractTreeWriter { * @throws DocFileIOException if there is a problem generating the overview tree page */ public void generateTreeFile() throws DocFileIOException { - HtmlTree body = getTreeHeader(); + HtmlTree body = getBody(); Content headContent = contents.hierarchyForAllPackages; - Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, + var heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, HtmlStyle.title, headContent); - Content div = HtmlTree.DIV(HtmlStyle.header, heading); + var div = HtmlTree.DIV(HtmlStyle.header, heading); addPackageTreeLinks(div); Content mainContent = new ContentBuilder(); mainContent.add(div); @@ -122,18 +117,18 @@ public class TreeWriter extends AbstractTreeWriter { /** * Add the links to all the package tree files. * - * @param contentTree the content tree to which the links will be added + * @param content the content to which the links will be added */ - protected void addPackageTreeLinks(Content contentTree) { + protected void addPackageTreeLinks(Content content) { //Do nothing if only unnamed package is used if (isUnnamedPackage()) { return; } if (!classesOnly) { - Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel, + var span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel, contents.packageHierarchies); - contentTree.add(span); - HtmlTree ul = HtmlTree.UL(HtmlStyle.horizontal); + content.add(span); + var ul = HtmlTree.UL(HtmlStyle.horizontal); int i = 0; for (PackageElement pkg : packages) { // If the package name length is 0 or if -nodeprecated option @@ -145,7 +140,7 @@ public class TreeWriter extends AbstractTreeWriter { continue; } DocPath link = pathString(pkg, DocPaths.PACKAGE_TREE); - Content li = HtmlTree.LI(links.createLink(link, + var li = HtmlTree.LI(links.createLink(link, getLocalizedPackageName(pkg))); if (i < packages.size() - 1) { li.add(", "); @@ -153,16 +148,14 @@ public class TreeWriter extends AbstractTreeWriter { ul.add(li); i++; } - contentTree.add(ul); + content.add(ul); } } /** - * Get the tree header. - * - * @return a content tree for the tree header + * {@return a new HTML BODY element} */ - protected HtmlTree getTreeHeader() { + private HtmlTree getBody() { String title = resources.getText("doclet.Window_Class_Hierarchy"); HtmlTree bodyTree = getBody(getWindowTitle(title)); bodyContents.setHeader(getHeader(PageMode.TREE)); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/WriterFactoryImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/WriterFactoryImpl.java index fca9b29a3bb71ba64e48c7ecd7ca2437236fbb8b..b4830b474e6f917aa486eff3e42b728b404e5b1a 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/WriterFactoryImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/WriterFactoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,11 +44,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable; /** * The factory that returns HTML writers. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class WriterFactoryImpl implements WriterFactory { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/BodyContents.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/BodyContents.java index 33ebbc43b2d2c2bef4ef0c92ae13c81a62abcb68..2019256b3476cc8bbf4dd44cc6a81a39d1ead322 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/BodyContents.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/BodyContents.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,11 +39,6 @@ import java.util.Objects; * The content is a {@code

    } element that contains a * header that is always visible, and main content that * can be scrolled if necessary. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class BodyContents extends Content { @@ -94,7 +89,7 @@ public class BodyContents extends Content { HtmlTree flexHeader = header.addStyle(HtmlStyle.flexHeader); - HtmlTree flexContent = HtmlTree.DIV(HtmlStyle.flexContent) + var flexContent = HtmlTree.DIV(HtmlStyle.flexContent) .add(HtmlTree.MAIN().add(mainContents)) .add(footer == null ? HtmlTree.EMPTY : footer); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Comment.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Comment.java index f9cb2975d34fabf06e254d6662a287e5c7a68706..a7b8b95e6626d99add1a559e4cb98ff50b20617e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Comment.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Comment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. * 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,11 +34,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants; /** * Class for generating a comment for HTML pages of javadoc output. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class Comment extends Content { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/ContentBuilder.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/ContentBuilder.java index 79d398f9c9ee39a8977306aec9dea85f9221e582..06112b09e90023d1bc6098cf4594400209b7526e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/ContentBuilder.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/ContentBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ package jdk.javadoc.internal.doclets.formats.html.markup; import java.io.IOException; import java.io.Writer; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Objects; @@ -38,7 +37,7 @@ import jdk.javadoc.internal.doclets.toolkit.Content; * A sequence of Content nodes. */ public class ContentBuilder extends Content { - protected List contents = Collections.emptyList(); + protected List contents = List.of(); public ContentBuilder() { } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/DocType.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/DocType.java index 626ce65a55e0e3451021805cb81ef7c088db9027..4301db9283af7963fe60f8749650068f10ff8d80 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/DocType.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/DocType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,11 +27,6 @@ package jdk.javadoc.internal.doclets.formats.html.markup; /** * Supported DOCTYPE declarations. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public enum DocType { HTML5(""); 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 adbd5ef09fd3b257b77087fbcb2032592e022a5d..fffeb834783bf99f132162fd5685179205504888 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,6 @@ import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Locale; @@ -44,11 +43,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; * An HTML {@code } element. * * Many methods return the current object, to facilitate fluent builder-style usage. - * - *

    This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. */ public class Head extends Content { private final Runtime.Version docletVersion; @@ -61,12 +55,12 @@ public class Head extends Content { private String generator; private boolean showTimestamp; private DocPath mainStylesheet; - private List additionalStylesheets = Collections.emptyList(); + private List additionalStylesheets = List.of(); private boolean index; private Script mainBodyScript; private final List + """, """ """, @@ -684,7 +684,7 @@ public class TestSearch extends JavadocTester { checkFiles(expectedOutput, "search.js", "jquery-ui.overrides.css", - "script-dir/jquery-3.5.1.min.js", + "script-dir/jquery-3.6.0.min.js", "script-dir/jquery-ui.min.js", "script-dir/jquery-ui.min.css", "script-dir/jquery-ui.structure.min.css", diff --git a/test/langtools/jdk/javadoc/doclet/testSnippetTag/TestSnippetTag.java b/test/langtools/jdk/javadoc/doclet/testSnippetTag/TestSnippetTag.java index 4b0dd06a2a246adc35c34432829beaf02cea552f..9923a191a57b18e2566696b3a873d252cd6cf12e 100644 --- a/test/langtools/jdk/javadoc/doclet/testSnippetTag/TestSnippetTag.java +++ b/test/langtools/jdk/javadoc/doclet/testSnippetTag/TestSnippetTag.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1079,11 +1079,11 @@ public class TestSnippetTag extends SnippetTester { checkExit(Exit.ERROR); checkOutput(Output.OUT, true, """ - A.java:4: error: File not found: %s""".formatted(fileName)); + A.java:4: error: file not found on source path or snippet path: %s""".formatted(fileName)); checkOutput("pkg/A.html", true, """

    invalid @snippet -
    File not found: text.txt
    +
    file not found on source path or snippet path: text.txt
    """); checkNoCrashes(); @@ -1140,7 +1140,7 @@ public class TestSnippetTag extends SnippetTester { checkExit(Exit.ERROR); checkOutput(Output.OUT, true, """ - A.java:4: error: File not found: %s""".formatted(fileName)); + A.java:4: error: file not found on source path or snippet path: %s""".formatted(fileName)); checkNoCrashes(); } @@ -1869,7 +1869,7 @@ public class TestSnippetTag extends SnippetTester { checkExit(Exit.ERROR); checkOutput(Output.OUT, true, """ - A.java:4: error: File not found: %s""".formatted(fileName)); + A.java:4: error: file not found on source path or snippet path: %s""".formatted(fileName)); checkNoCrashes(); } diff --git a/test/langtools/jdk/javadoc/tool/api/basic/APITest.java b/test/langtools/jdk/javadoc/tool/api/basic/APITest.java index a0d68d8540333f72771f2f694823337783a8b4f5..3a5ddda8261824fed9586854f581e523162446fc 100644 --- a/test/langtools/jdk/javadoc/tool/api/basic/APITest.java +++ b/test/langtools/jdk/javadoc/tool/api/basic/APITest.java @@ -201,7 +201,7 @@ class APITest { "help-doc.html", "index-all.html", "index.html", - "script-dir/jquery-3.5.1.min.js", + "script-dir/jquery-3.6.0.min.js", "script-dir/jquery-ui.min.js", "script-dir/jquery-ui.min.css", "script-dir/jquery-ui.structure.min.css", diff --git a/test/langtools/jdk/jshell/HighlightUITest.java b/test/langtools/jdk/jshell/HighlightUITest.java new file mode 100644 index 0000000000000000000000000000000000000000..ede22e8f0107950f95afeb3ff0ce49a125b19666 --- /dev/null +++ b/test/langtools/jdk/jshell/HighlightUITest.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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 8274148 + * @summary Check the UI behavior of snippet highligting + * @modules + * jdk.compiler/com.sun.tools.javac.api + * jdk.compiler/com.sun.tools.javac.main + * jdk.jshell/jdk.internal.jshell.tool:open + * jdk.jshell/jdk.internal.jshell.tool.resources:open + * jdk.jshell/jdk.jshell:open + * @library /tools/lib + * @build toolbox.ToolBox toolbox.JarTask toolbox.JavacTask + * @build Compiler UITesting + * @compile HighlightUITest.java + * @run testng HighlightUITest + */ + +import org.testng.annotations.Test; + +@Test +public class HighlightUITest extends UITesting { + + public HighlightUITest() { + super(true); + } + + public void testHighlight() throws Exception { + System.setProperty("test.enable.highlighter", "true"); + doRunTest((inputSink, out) -> { + inputSink.write("var s = new String(byte[0], 0);"); + waitOutput(out, "var s = new String\\(byte\\[0]\u001B\\[3D\u001B\\[3C, 0\\)\u001B\\[12D\u001B\\[12C;\r" + + "\u001B\\[4mvar\u001B\\[0m \u001B\\[1ms\u001B\\[0m = \u001B\\[4mnew\u001B\\[0m String\\(\u001B\\[4mbyte\u001B\\[0m\\u001B\\[8C"); + }); + } + +} \ No newline at end of file diff --git a/test/langtools/jdk/jshell/SnippetHighlightTest.java b/test/langtools/jdk/jshell/SnippetHighlightTest.java new file mode 100644 index 0000000000000000000000000000000000000000..4a34e8820d50ad5e078b4fb98f9cd9abc8191c31 --- /dev/null +++ b/test/langtools/jdk/jshell/SnippetHighlightTest.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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 8274148 + * @summary Check snippet highlighting + * @library /tools/lib + * @modules jdk.compiler/com.sun.tools.javac.api + * jdk.compiler/com.sun.tools.javac.main + * jdk.jdeps/com.sun.tools.javap + * jdk.jshell/jdk.jshell:open + * @build toolbox.ToolBox toolbox.JarTask toolbox.JavacTask + * @build KullaTesting TestingInputStream Compiler + * @run testng SnippetHighlightTest + */ + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +import org.testng.annotations.Test; + +import jdk.jshell.SourceCodeAnalysis.Highlight; + +import static org.testng.Assert.*; + +@Test +public class SnippetHighlightTest extends KullaTesting { + + public void testMemberExpr() { + assertEval("@Deprecated class TestClass { }"); + assertEval("class TestConstructor { @Deprecated TestConstructor() {} }"); + assertEval("class TestMethod { @Deprecated void test() {} }"); + assertHighlights("TestClass t", "Highlight[start=0, end=9, attributes=[DEPRECATED]]", + "Highlight[start=10, end=11, attributes=[DECLARATION]]"); + assertHighlights("TestClass.class", "Highlight[start=0, end=9, attributes=[DEPRECATED]]", + "Highlight[start=10, end=15, attributes=[KEYWORD]]"); + assertHighlights("new TestConstructor()", "Highlight[start=0, end=3, attributes=[KEYWORD]]", + "Highlight[start=4, end=19, attributes=[DEPRECATED]]"); + assertHighlights("new TestMethod().test()", "Highlight[start=0, end=3, attributes=[KEYWORD]]", + "Highlight[start=17, end=21, attributes=[DEPRECATED]]"); + assertHighlights("var v = 0;", "Highlight[start=0, end=3, attributes=[KEYWORD]]", + "Highlight[start=4, end=5, attributes=[DECLARATION]]"); + assertHighlights("int i = switch (0) { case 0: yield 0;};", + "Highlight[start=0, end=3, attributes=[KEYWORD]]", + "Highlight[start=4, end=5, attributes=[DECLARATION]]", + "Highlight[start=8, end=14, attributes=[KEYWORD]]", + "Highlight[start=21, end=25, attributes=[KEYWORD]]", + "Highlight[start=29, end=34, attributes=[KEYWORD]]"); + assertHighlights("sealed class C permits A {}", + "Highlight[start=0, end=6, attributes=[KEYWORD]]", + "Highlight[start=7, end=12, attributes=[KEYWORD]]", + "Highlight[start=13, end=14, attributes=[DECLARATION]]", + "Highlight[start=15, end=22, attributes=[KEYWORD]]"); + assertHighlights("non-sealed class C extends A {}", + "Highlight[start=0, end=10, attributes=[KEYWORD]]", + "Highlight[start=11, end=16, attributes=[KEYWORD]]", + "Highlight[start=17, end=18, attributes=[DECLARATION]]", + "Highlight[start=19, end=26, attributes=[KEYWORD]]"); + assertHighlights("interface I {}", + "Highlight[start=0, end=9, attributes=[KEYWORD]]", + "Highlight[start=10, end=11, attributes=[DECLARATION]]"); + assertHighlights("@interface I {}", + "Highlight[start=1, end=10, attributes=[KEYWORD]]", + "Highlight[start=11, end=12, attributes=[DECLARATION]]"); + assertHighlights("enum E {A, B;}", + "Highlight[start=0, end=4, attributes=[KEYWORD]]", + "Highlight[start=5, end=6, attributes=[DECLARATION]]", + "Highlight[start=8, end=9, attributes=[DECLARATION]]", + "Highlight[start=11, end=12, attributes=[DECLARATION]]"); + assertHighlights("record R(int i) {}", + "Highlight[start=0, end=6, attributes=[KEYWORD]]", + "Highlight[start=7, end=8, attributes=[DECLARATION]]", + "Highlight[start=9, end=12, attributes=[KEYWORD]]", + "Highlight[start=13, end=14, attributes=[DECLARATION]]"); + assertHighlights("void method() {}", + "Highlight[start=0, end=4, attributes=[KEYWORD]]", + "Highlight[start=5, end=11, attributes=[DECLARATION]]"); + } + + private void assertHighlights(String code, String... expected) { + List completions = computeHighlights(code); + assertEquals(completions, Arrays.asList(expected), "Input: " + code + ", " + completions.toString()); + } + + private List computeHighlights(String code) { + waitIndexingFinished(); + + List highlights = + getAnalysis().highlights(code); + return highlights.stream() + .map(h -> h.toString()) + .distinct() + .collect(Collectors.toList()); + } +} diff --git a/test/langtools/tools/javac/diags/examples.not-yet.txt b/test/langtools/tools/javac/diags/examples.not-yet.txt index 9f9f8f780144708d7f61108f4708b10c79cd457e..afceccad6335dff0148078647c44ce70de3aa3cf 100644 --- a/test/langtools/tools/javac/diags/examples.not-yet.txt +++ b/test/langtools/tools/javac/diags/examples.not-yet.txt @@ -57,7 +57,6 @@ compiler.misc.bad.runtime.invisible.param.annotations # bad class file compiler.misc.bad.signature # bad class file compiler.misc.bad.requires.flag # bad class file compiler.misc.bad.type.annotation.value -compiler.misc.base.membership # UNUSED compiler.misc.class.file.not.found # ClassReader compiler.misc.class.file.wrong.class compiler.misc.exception.message # uncommon completion failure based on a string diff --git a/test/langtools/tools/javac/launcher/SourceLauncherTest.java b/test/langtools/tools/javac/launcher/SourceLauncherTest.java index a052f087af6047b9b71d1583b9b1768edf3205b8..08b0ce5002b94f717a58e4998b02185ae518d3bf 100644 --- a/test/langtools/tools/javac/launcher/SourceLauncherTest.java +++ b/test/langtools/tools/javac/launcher/SourceLauncherTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,7 +56,7 @@ import toolbox.JavaTask; import toolbox.JavacTask; import toolbox.Task; import toolbox.TestRunner; -import toolbox.TestRunner; +import toolbox.TestRunner.Test; import toolbox.ToolBox; public class SourceLauncherTest extends TestRunner { @@ -231,6 +231,7 @@ public class SourceLauncherTest extends TestRunner { "error: cannot use source-code launcher with a security manager enabled"); } + @Test public void testSystemProperty(Path base) throws IOException { tb.writeJavaFiles(base, "class ShowProperty {\n" + diff --git a/test/langtools/tools/javac/platform/CanHandleClassFilesTest.java b/test/langtools/tools/javac/platform/CanHandleClassFilesTest.java index 8afdf54f40d20dcac1fc12bda8397c46d69ef091..ae4f525e4ee125497567bff46e80550e931606f3 100644 --- a/test/langtools/tools/javac/platform/CanHandleClassFilesTest.java +++ b/test/langtools/tools/javac/platform/CanHandleClassFilesTest.java @@ -64,7 +64,7 @@ public class CanHandleClassFilesTest { Path test = d.resolve("make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java"); if (Files.exists(test)) { createSymbols = test; - includeList = d.resolve("make/data/symbols/include.list"); + includeList = d.resolve("src/jdk.compiler/share/data/symbols/include.list"); break; } } diff --git a/test/langtools/tools/javac/sealed/ValidateJarWithSealedAndRecord.java b/test/langtools/tools/javac/sealed/ValidateJarWithSealedAndRecord.java new file mode 100644 index 0000000000000000000000000000000000000000..c133b87a1cd411756faec29598dc4a7c50560719 --- /dev/null +++ b/test/langtools/tools/javac/sealed/ValidateJarWithSealedAndRecord.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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 8282446 8282508 + * @summary Jar validation fails when sealed classes and records are involved + * @run main ValidateJarWithSealedAndRecord + */ + +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.spi.ToolProvider; + +public class ValidateJarWithSealedAndRecord { + + public static void main(String args[]) throws Exception { + ValidateJarWithSealedAndRecord theTest = new ValidateJarWithSealedAndRecord(); + theTest.run(); + } + + void run() throws Exception { + generateFilesNeeded(); + } + + void writeFile(String f, String contents) throws IOException { + PrintStream s = new PrintStream(new FileOutputStream(f)); + s.println(contents); + s.close(); + } + + void generateFilesNeeded() throws Exception { + ToolProvider jarTool = ToolProvider.findFirst("jar").orElseThrow(() -> new RuntimeException("jar tool not found")); + writeFile("Foo.java", + """ + public sealed interface Foo { + record Bar() implements Foo {} + } + """ + ); + com.sun.tools.javac.Main.compile(new String[]{"-d", "out", "Foo.java"}); + jarTool.run(System.out, System.err, new String[] {"--create", "--file", "foo.jar", "-C", "out", "."}); + /* we need to create a fresh instance with clean options in other case the tool will + * keep a copy of the options we just passed above + */ + jarTool = ToolProvider.findFirst("jar").orElseThrow(() -> new RuntimeException("jar tool not found")); + if (jarTool.run(System.out, System.err, new String[]{"--validate", "--file", "foo.jar"}) != 0) { + throw new AssertionError("jar file couldn't be validated"); + } + } +} diff --git a/test/langtools/tools/javac/sym/ElementStructureTest.java b/test/langtools/tools/javac/sym/ElementStructureTest.java index db5ae5f4582a14dd8de894ddc2544e2e18b1ece3..791785b24521ef5db20b4a858e6405aa872bfaf3 100644 --- a/test/langtools/tools/javac/sym/ElementStructureTest.java +++ b/test/langtools/tools/javac/sym/ElementStructureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -104,7 +104,7 @@ import toolbox.ToolBox; /**To generate the hash values for version N, invoke this class like: * - * java ElementStructureTest generate-hashes $LANGTOOLS_DIR/make/data/symbols/include.list ( N)+ + * java ElementStructureTest generate-hashes $LANGTOOLS_DIR/src/jdk.compiler/share/data/symbols/include.list ( N)+ * * Where is the file produced by make/src/classes/build/tools/symbolgenerator/Probe.java. * So, to produce hashes for 6, 7 and 8, this command can be used: @@ -113,11 +113,11 @@ import toolbox.ToolBox; * * To inspect differences between the actual and expected output for version N, invoke this class like: * - * java ElementStructureTest generate-output $LANGTOOLS_DIR/make/data/symbols/include.list ( N )+ + * java ElementStructureTest generate-output $LANGTOOLS_DIR/src/jdk.compiler/share/data/symbols/include.list ( N )+ * * For example, to get the actual and expected output for 6 in /tmp/actual and /tmp/expected, respectively: * - * java ElementStructureTest generate-output $LANGTOOLS_DIR/make/data/symbols/include.list classes-6 6 /tmp/actual /tmp/expected + * java ElementStructureTest generate-output $LANGTOOLS_DIR/src/jdk.compiler/share/data/symbols/include.list classes-6 6 /tmp/actual /tmp/expected */ public class ElementStructureTest { diff --git a/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java b/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java index 3ca1de653a4f7e25112833d39ea693b08d59ea43..219d3797453dfbb3c538a937b22d3197d95ccd6d 100644 --- a/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java +++ b/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java @@ -45,7 +45,7 @@ import java.util.Set; */ public class TestMutuallyExclusivePlatformPredicates { private static enum MethodGroup { - ARCH("isAArch64", "isARM", "isPPC", "isS390x", "isX64", "isX86"), + ARCH("isAArch64", "isARM", "isRISCV64", "isPPC", "isS390x", "isX64", "isX86"), BITNESS("is32bit", "is64bit"), OS("isAix", "isLinux", "isOSX", "isWindows"), VM_TYPE("isClient", "isServer", "isMinimal", "isZero", "isEmbedded"), diff --git a/test/lib/jdk/test/lib/Platform.java b/test/lib/jdk/test/lib/Platform.java index a8405c937226a178dabc5c60cd4a3e53ff427430..3084634018bd3cf2724247347a58a2740549e7d1 100644 --- a/test/lib/jdk/test/lib/Platform.java +++ b/test/lib/jdk/test/lib/Platform.java @@ -197,6 +197,10 @@ public class Platform { return isArch("arm.*"); } + public static boolean isRISCV64() { + return isArch("riscv64"); + } + public static boolean isPPC() { return isArch("ppc.*"); } diff --git a/test/lib/jdk/test/lib/cds/CDSOptions.java b/test/lib/jdk/test/lib/cds/CDSOptions.java index cbc11db777b1a55d1f34930c122614c0e6657d9c..a60afb90aed29b2b7c2c25e3d182af0aebc1a6e4 100644 --- a/test/lib/jdk/test/lib/cds/CDSOptions.java +++ b/test/lib/jdk/test/lib/cds/CDSOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,6 +56,11 @@ public class CDSOptions { return this; } + public CDSOptions addSuffix(ArrayList suffix) { + for (String s : suffix) this.suffix.add(s); + return this; + } + public CDSOptions addSuffix(String... suffix) { for (String s : suffix) this.suffix.add(s); return this; diff --git a/test/micro/org/openjdk/bench/java/lang/StringBuilderToString.java b/test/micro/org/openjdk/bench/java/lang/StringBuilderToString.java new file mode 100644 index 0000000000000000000000000000000000000000..b38410204f348892fb652c26fc9d3def1a3aec58 --- /dev/null +++ b/test/micro/org/openjdk/bench/java/lang/StringBuilderToString.java @@ -0,0 +1,60 @@ +/* + * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.openjdk.bench.java.lang; + +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Param; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; + +import java.util.concurrent.TimeUnit; + +@BenchmarkMode(Mode.AverageTime) +@OutputTimeUnit(TimeUnit.NANOSECONDS) +@State(Scope.Thread) +@Warmup(iterations = 10, time = 500, timeUnit = TimeUnit.MILLISECONDS) +@Measurement(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS) +@Fork(3) +public class StringBuilderToString { + @Param({"128", "256", "1024"}) + public int MIXED_SIZE; + + /** + * This microbench simulates how java.io.BufferedReader uses StringBuilder. + */ + @Benchmark + public String toStringWithMixedChars() { + StringBuilder sb = new StringBuilder(MIXED_SIZE); + for (int i = 0; i < MIXED_SIZE - 4; ++i) { + sb.append('a'); + } + sb.append('\u3042'); // can't be encoded in latin-1, + return sb.toString(); + } +} diff --git a/test/micro/org/openjdk/bench/java/lang/StringDecode.java b/test/micro/org/openjdk/bench/java/lang/StringDecode.java index c5609ce4e51fd14406f613d53b4f25105fcb806f..ee4f8df7c734f21eb235f1c380843c66ae5dde42 100644 --- a/test/micro/org/openjdk/bench/java/lang/StringDecode.java +++ b/test/micro/org/openjdk/bench/java/lang/StringDecode.java @@ -87,7 +87,7 @@ public class StringDecode { bh.consume(new String(asciiString, charset)); bh.consume(new String(longAsciiString, 0, 15, charset)); bh.consume(new String(asciiString, 0, 3, charset)); - bh.consume(new String(longAsciiString, 512, 512 + 7, charset)); + bh.consume(new String(longAsciiString, 512, 7, charset)); } @Benchmark @@ -103,7 +103,7 @@ public class StringDecode { bh.consume(new String(latin1String, charset)); bh.consume(new String(latin1String, 0, 15, charset)); bh.consume(new String(latin1String, 0, 3, charset)); - bh.consume(new String(longLatin1OnlyString, 512, 512 + 7, charset)); + bh.consume(new String(longLatin1OnlyString, 512, 7, charset)); } @Benchmark diff --git a/test/micro/org/openjdk/bench/java/math/FpRoundingBenchmark.java b/test/micro/org/openjdk/bench/java/math/FpRoundingBenchmark.java index cf0eed32e07c1c988e92093db90bd9f743761ff6..8381673028ef9a72f09a7b04ea499d4f461010da 100644 --- a/test/micro/org/openjdk/bench/java/math/FpRoundingBenchmark.java +++ b/test/micro/org/openjdk/bench/java/math/FpRoundingBenchmark.java @@ -1,5 +1,5 @@ // -// Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. +// Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. // 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,53 +26,97 @@ package org.openjdk.bench.java.math; import java.util.Random; import java.util.concurrent.TimeUnit; import org.openjdk.jmh.annotations.*; -import org.openjdk.jmh.infra.Blackhole; @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Thread) public class FpRoundingBenchmark { - @Param({"1024"}) + @Param({"1024", "2048"}) public int TESTSIZE; public double[] DargV1; - - public double[] Res; + public double[] ResD; + public long[] ResL; + public float[] FargV1; + public float[] ResF; + public int[] ResI; public final double[] DspecialVals = { - 0.0, -0.0, Double.NaN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY}; + 0.0, -0.0, Double.NaN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, + Double.MAX_VALUE, -Double.MAX_VALUE, Double.MIN_VALUE, -Double.MIN_VALUE, + Double.MIN_NORMAL + }; + + public final float[] FspecialVals = { + 0.0f, -0.0f, Float.NaN, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY, + Float.MAX_VALUE, -Float.MAX_VALUE, Float.MIN_VALUE, -Float.MIN_VALUE, + Float.MIN_NORMAL + }; @Setup(Level.Trial) public void BmSetup() { - int i = 0; - Random r = new Random(1024); - DargV1 = new double[TESTSIZE]; - Res = new double[TESTSIZE]; - - for (; i < DspecialVals.length; i++) { - DargV1[i] = DspecialVals[i]; - } - - for (; i < TESTSIZE; i++) { - DargV1[i] = r.nextDouble()*TESTSIZE; - } + int i = 0; + Random r = new Random(1024); + + DargV1 = new double[TESTSIZE]; + ResD = new double[TESTSIZE]; + + for (; i < DspecialVals.length; i++) { + DargV1[i] = DspecialVals[i]; + } + + for (; i < TESTSIZE; i++) { + DargV1[i] = Double.longBitsToDouble(r.nextLong());; + } + + FargV1 = new float[TESTSIZE]; + ResF = new float[TESTSIZE]; + + i = 0; + for (; i < FspecialVals.length; i++) { + FargV1[i] = FspecialVals[i]; + } + + for (; i < TESTSIZE; i++) { + FargV1[i] = Float.intBitsToFloat(r.nextInt()); + } + + ResI = new int[TESTSIZE]; + ResL = new long[TESTSIZE]; + } + + @Benchmark + public void test_ceil() { + for (int i = 0; i < TESTSIZE; i++) { + ResD[i] = Math.ceil(DargV1[i]); + } + } + + @Benchmark + public void test_floor() { + for (int i = 0; i < TESTSIZE; i++) { + ResD[i] = Math.floor(DargV1[i]); + } } @Benchmark - public void testceil(Blackhole bh) { - for (int i = 0; i < TESTSIZE; i++) - Res[i] = Math.ceil(DargV1[i]); + public void test_rint() { + for (int i = 0; i < TESTSIZE; i++) { + ResD[i] = Math.rint(DargV1[i]); + } } @Benchmark - public void testfloor(Blackhole bh) { - for (int i = 0; i < TESTSIZE; i++) - Res[i] = Math.floor(DargV1[i]); + public void test_round_double() { + for (int i = 0; i < TESTSIZE; i++) { + ResL[i] = Math.round(DargV1[i]); + } } @Benchmark - public void testrint(Blackhole bh) { - for (int i = 0; i < TESTSIZE; i++) - Res[i] = Math.rint(DargV1[i]); + public void test_round_float() { + for (int i = 0; i < TESTSIZE; i++) { + ResI[i] = Math.round(FargV1[i]); + } } } diff --git a/test/micro/org/openjdk/bench/java/time/GetYearBench.java b/test/micro/org/openjdk/bench/java/time/GetYearBench.java new file mode 100644 index 0000000000000000000000000000000000000000..59d3b84a29793e4b273842925d9d1851d0dbb309 --- /dev/null +++ b/test/micro/org/openjdk/bench/java/time/GetYearBench.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.openjdk.bench.java.time; + +import java.time.Duration; +import java.time.Instant; +import java.time.ZonedDateTime; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; + +import java.util.Locale; +import java.util.Random; +import java.util.TimeZone; +import java.util.concurrent.TimeUnit; +import java.util.stream.IntStream; +import java.util.stream.Stream; + +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Param; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; +import org.openjdk.jmh.infra.Blackhole; + +/** + * Examine ability to perform escape analysis on expressions + * such as {@code Instant.ofEpochMilli(value).atZone(ZoneOffset.UTC).getYear()} + */ +@BenchmarkMode(Mode.Throughput) +@OutputTimeUnit(TimeUnit.MILLISECONDS) +@Warmup(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS) +@Measurement(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS) +@Fork(3) +@State(Scope.Benchmark) +public class GetYearBench { + + private TimeZone UTC = TimeZone.getTimeZone("UTC"); + + private TimeZone LONDON = TimeZone.getTimeZone("Europe/London"); + + private long[] INSTANT_MILLIS; + + private int[] YEARS; + + @Setup + public void createInstants() { + // Various instants during the same day + final Instant loInstant = Instant.EPOCH.plus(Duration.ofDays(365*50)); // 2020-01-01 + final Instant hiInstant = loInstant.plus(Duration.ofDays(1)); + final long maxOffsetNanos = Duration.between(loInstant, hiInstant).toNanos(); + final Random random = new Random(0); + INSTANT_MILLIS = IntStream + .range(0, 1_000) + .mapToObj(ignored -> { + final long offsetNanos = (long) Math.floor(random.nextDouble() * maxOffsetNanos); + return loInstant.plus(offsetNanos, ChronoUnit.NANOS); + }) + .mapToLong(instant -> instant.toEpochMilli()) + .toArray(); + YEARS = new int[INSTANT_MILLIS.length]; + } + + @Benchmark + public int[] getYearFromMillisZoneOffset() { + for (int i = 0; i < YEARS.length; i++) { + YEARS[i] = Instant.ofEpochMilli(INSTANT_MILLIS[i]).atZone(ZoneOffset.UTC).getYear(); + } + return YEARS; + } + + @Benchmark + public int[] getYearFromMillisZoneRegionUTC() { + for (int i = 0; i < YEARS.length; i++) { + YEARS[i] = Instant.ofEpochMilli(INSTANT_MILLIS[i]).atZone(UTC.toZoneId()).getYear(); + } + return YEARS; + } + + @Benchmark + public int[] getYearFromMillisZoneRegion() { + for (int i = 0; i < YEARS.length; i++) { + YEARS[i] = Instant.ofEpochMilli(INSTANT_MILLIS[i]).atZone(LONDON.toZoneId()).getYear(); + } + return YEARS; + } + + @Benchmark + public int[] getYearFromMillisZoneRegionNormalized() { + for (int i = 0; i < YEARS.length; i++) { + YEARS[i] = Instant.ofEpochMilli(INSTANT_MILLIS[i]).atZone(UTC.toZoneId().normalized()).getYear(); + } + return YEARS; + } +} diff --git a/test/micro/org/openjdk/bench/vm/compiler/LeaInstruction.java b/test/micro/org/openjdk/bench/vm/compiler/LeaInstruction.java new file mode 100644 index 0000000000000000000000000000000000000000..02b10d7ddf71e177a593312e25b7389648f3117f --- /dev/null +++ b/test/micro/org/openjdk/bench/vm/compiler/LeaInstruction.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.openjdk.bench.vm.compiler; + +import org.openjdk.jmh.annotations.*; +import org.openjdk.jmh.infra.Blackhole; + +import java.util.concurrent.TimeUnit; + +@BenchmarkMode(Mode.AverageTime) +@OutputTimeUnit(TimeUnit.NANOSECONDS) +@Fork(value = 1, jvmArgsAppend = {"-XX:LoopUnrollLimit=1"}) +@State(Scope.Thread) +public class LeaInstruction { + static final int ITERATION = 1000; + + int x, y; + + @Benchmark + public void IS_D_int(Blackhole bh) { + int x = this.x; + for (int i = 0; i < ITERATION; i++) { + x = x * 4 + 10; + } + bh.consume(x); + } + + @Benchmark + public void B_I_D_int(Blackhole bh) { + int x = this.x, y = this.y; + for (int i = 0; i < ITERATION; i++) { + x = x + y + 10; + y = x + y + 20; + } + bh.consume(x); + bh.consume(y); + } + + @Benchmark + public void B_IS_int(Blackhole bh) { + int x = this.x, y = this.y; + for (int i = 0; i < ITERATION; i++) { + x = x + y * 4; + y = x + y * 8; + } + bh.consume(x); + bh.consume(y); + } + + @Benchmark + public void B_IS_D_int(Blackhole bh) { + int x = this.x, y = this.y; + for (int i = 0; i < ITERATION; i++) { + x = x + y * 4 + 10; + y = x + y * 8 + 20; + } + bh.consume(x); + bh.consume(y); + } + + @Benchmark + public void IS_D_long(Blackhole bh) { + long x = this.x; + for (int i = 0; i < ITERATION; i++) { + x = x * 4 + 10; + } + bh.consume(x); + } + + @Benchmark + public void B_I_D_long(Blackhole bh) { + long x = this.x, y = this.y; + for (int i = 0; i < ITERATION; i++) { + x = x + y + 10; + y = x + y + 20; + } + bh.consume(x); + bh.consume(y); + } + + @Benchmark + public void B_IS_long(Blackhole bh) { + long x = this.x, y = this.y; + for (int i = 0; i < ITERATION; i++) { + x = x + y * 4; + y = x + y * 8; + } + bh.consume(x); + bh.consume(y); + } + + @Benchmark + public void B_IS_D_long(Blackhole bh) { + long x = this.x, y = this.y; + for (int i = 0; i < ITERATION; i++) { + x = x + y * 4 + 10; + y = x + y * 8 + 20; + } + bh.consume(x); + bh.consume(y); + } +} diff --git a/test/micro/org/openjdk/bench/vm/compiler/MaxMinOptimizeTest.java b/test/micro/org/openjdk/bench/vm/compiler/MaxMinOptimizeTest.java index db75b94db33f69a00b7376ca9ca9556bed07b4df..ec83488464a450bdd327b1314651ee4f7226a2f8 100644 --- a/test/micro/org/openjdk/bench/vm/compiler/MaxMinOptimizeTest.java +++ b/test/micro/org/openjdk/bench/vm/compiler/MaxMinOptimizeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Huawei Technologies Co. Ltd. All rights reserved. + * Copyright (c) 2021, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/test/micro/org/openjdk/bench/vm/gc/MicroLargePages.java b/test/micro/org/openjdk/bench/vm/gc/MicroLargePages.java new file mode 100644 index 0000000000000000000000000000000000000000..67702cfe607473536bf08316733aed234f2891a1 --- /dev/null +++ b/test/micro/org/openjdk/bench/vm/gc/MicroLargePages.java @@ -0,0 +1,62 @@ +// +// Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. +// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +// +// This code is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License version 2 only, as +// published by the Free Software Foundation. +// +// This code is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// version 2 for more details (a copy is included in the LICENSE file that +// accompanied this code). +// +// You should have received a copy of the GNU General Public License version +// 2 along with this work; if not, write to the Free Software Foundation, +// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +// +// Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +// or visit www.oracle.com if you need additional information or have any +// questions. +// + +package org.openjdk.bench.vm.gc; + +import java.util.Arrays; +import java.util.concurrent.TimeUnit; +import org.openjdk.jmh.annotations.*; + +@OutputTimeUnit(TimeUnit.MINUTES) +@State(Scope.Thread) +@Fork(jvmArgsAppend = {"-Xmx256m", "-XX:+UseLargePages", "-XX:LargePageSizeInBytes=1g", "-Xlog:pagesize"}, value = 5) + +public class MicroLargePages { + + @Param({"2097152"}) + public int ARRAYSIZE; + + @Param({"1", "2", "4"}) + public int NUM; + + public long[][] INP; + public long[][] OUT; + + @Setup(Level.Trial) + public void BmSetup() { + INP = new long[NUM][ARRAYSIZE]; + OUT = new long[NUM][ARRAYSIZE]; + for (int i = 0; i < NUM; i++) { + Arrays.fill(INP[i], 10); + } + } + + @Benchmark + public void micro_HOP_DIST_4KB() { + for (int i = 0; i < NUM; i += 1) { + for (int j = 0; j < ARRAYSIZE; j += 512) { + OUT[i][j] = INP[i][j]; + } + } + } +}