Skip to content

8385409: Javap documentation says by default protected and public members are printed but package private members are also printed by default (-package behavior, not -protected)#31321

Open
dbalek wants to merge 2 commits into
openjdk:masterfrom
dbalek:dbalek/8385409

Conversation

@dbalek
Copy link
Copy Markdown
Contributor

@dbalek dbalek commented May 29, 2026

In the current version of the JDK, there is a small inconsistency in the documentation for the javap command.

The description currently states that, when no options are used, javap prints only protected and public fields and methods.

The javap command disassembles one or more class files. The output depends on the options used.
When no options are used, the javap command prints the protected and public fields, and methods
of the classes passed to it.

This contradicts both the documented default for the -package option

-package
     Shows package/protected/public classes and members (default).

and the actual behavior of the tool: package-private members are also printed by default.

The proposed change is to update the wording to state that javap prints package-private, protected, and public fields and methods when no access-filtering option is specified.



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-8385676 to be approved

Issues

  • JDK-8385409: Javap documentation says by default protected and public members are printed but package private members are also printed by default (-package behavior, not -protected) (Bug - P4)
  • JDK-8385676: Javap documentation says by default protected and public members are printed but package private members are also printed by default (-package behavior, not -protected) (CSR)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31321

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

Using diff file

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

Using Webrev

Link to Webrev Comment

…bers are printed but package private members are also printed by default (`-package` behavior, not `-protected`)
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 29, 2026

👋 Welcome back dbalek! 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
Copy Markdown

openjdk Bot commented May 29, 2026

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

@openjdk openjdk Bot added the core-libs core-libs-dev@openjdk.org label May 29, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 29, 2026

@dbalek The following label will be automatically applied to this pull request:

  • core-libs

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

@openjdk openjdk Bot added the rfr Pull request is ready for review label May 29, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented May 29, 2026

Webrevs

@AlanBateman
Copy link
Copy Markdown
Contributor

/label add compiler

@openjdk openjdk Bot added the compiler compiler-dev@openjdk.org label May 29, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 29, 2026

@AlanBateman
The compiler label was successfully added.

@jddarcy
Copy link
Copy Markdown
Member

jddarcy commented May 29, 2026

/csr needed

@jddarcy
Copy link
Copy Markdown
Member

jddarcy commented May 29, 2026

@dbalek , please run a quick CSR to cover the updating the text to match the long-standing behavior.

@openjdk openjdk Bot added the csr Pull request needs approved CSR before integration label May 29, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 29, 2026

@jddarcy has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@dbalek please create a CSR request for issue JDK-8385409 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

Comment thread src/jdk.jdeps/share/man/javap.md Outdated
Co-authored-by: Chen Liang <liach@openjdk.org>
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 rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

4 participants