On Fri, 29 May 2026 09:57:18 GMT, Dusan Balek <[email protected]> wrote:
> 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. > > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This pull request has now been integrated. Changeset: 886eb11c Author: Dusan Balek <[email protected]> Committer: Chen Liang <[email protected]> URL: https://git.openjdk.org/jdk/commit/886eb11c645b52ec0af9024d5d2c94fe8d3ceea7 Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod 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`) Reviewed-by: liach ------------- PR: https://git.openjdk.org/jdk/pull/31321
