Skip to content

8379337: Deprecate Modifier.toString#30093

Open
liach wants to merge 2 commits intoopenjdk:masterfrom
liachmodded:fix/deprecate-modifier-tostring
Open

8379337: Deprecate Modifier.toString#30093
liach wants to merge 2 commits intoopenjdk:masterfrom
liachmodded:fix/deprecate-modifier-tostring

Conversation

@liach
Copy link
Member

@liach liach commented Mar 5, 2026

This method tries to describe the source modifiers from an access flags
value. Since the introduction of this API, new source modifiers are
often represented by class file constructs other than access
flags, and access flags values in different class file
structures have different interpretations. As a result, the source
modifiers reported by this API may be incomplete or incorrect.

The source modifiers of a declaration should be reconstructed manually,
by examining its reflective object. In addition, the reflective object
methods that provide user-friendly text representations, such as
Class#toGenericString(), render the source modifiers.

The access flags of a declaration, with the correct interpretation, can
be obtained from the accessFlags() methods on the reflective
objects, such as Class#accessFlags().

To print an access flags value for debug output, consider using the
format ``%04x` instead of this method; this method omits all class
file access flags without a corresponding source modifier.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires CSR request JDK-8379338 to be approved

Issues

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30093/head:pull/30093
$ git checkout pull/30093

Update a local copy of the PR:
$ git checkout pull/30093
$ git pull https://git.openjdk.org/jdk.git pull/30093/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30093

View PR using the GUI difftool:
$ git pr show -t 30093

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30093.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 5, 2026

👋 Welcome back liach! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Mar 5, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added hotspot-compiler hotspot-compiler-dev@openjdk.org core-libs core-libs-dev@openjdk.org compiler compiler-dev@openjdk.org labels Mar 5, 2026
@openjdk
Copy link

openjdk bot commented Mar 5, 2026

@liach The following labels will be automatically applied to this pull request:

  • compiler
  • core-libs
  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added csr Pull request needs approved CSR before integration rfr Pull request is ready for review labels Mar 5, 2026
@mlbridge
Copy link

mlbridge bot commented Mar 5, 2026

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler compiler-dev@openjdk.org core-libs core-libs-dev@openjdk.org csr Pull request needs approved CSR before integration hotspot-compiler hotspot-compiler-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant