Integrated: 8365878: jshell TOOLING's javap should use binary names

altrisi duke at openjdk.org
Fri Aug 22 17:13:57 UTC 2025


On Wed, 20 Aug 2025 15:37:09 GMT, altrisi <duke at openjdk.org> wrote:

> This PR makes TOOLING.jsh's `javap` function support anonymous, local and built-in nested classes.
> 
> Note that nested classes created in jshell would previously work, but not JDK ones as they'd miss the is built-in check (wrong name for `Class.forName`) and later throw an exception because of a null classloader.
> 
> The rest of classes would fail the canonical name check, which wouldn't allow them to be disassembled.
> 
> This change makes them work by changing the check from canonicalName != null to specific checks for unsupported types of classes, and doing Class.forName using the result of getName(), not the canonical name, for the built-in check.

This pull request has now been integrated.

Changeset: e916ce8c
Author:    altrisi <altrisi.trillosierra at gmail.com>
Committer: Chen Liang <liach at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e916ce8ce9af906cf86f1801fcb43e08f8188665
Stats:     32 lines in 2 files changed: 28 ins; 1 del; 3 mod

8365878: jshell TOOLING's javap should use binary names

Reviewed-by: liach, cstein

-------------

PR: https://git.openjdk.org/jdk/pull/26864


More information about the compiler-dev mailing list