RFR: 8365878: jshell TOOLING's javap should use binary names [v2]
Christian Stein
cstein at openjdk.org
Thu Aug 21 19:14:51 UTC 2025
On Thu, 21 Aug 2025 17:30:46 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.
>
> altrisi has updated the pull request incrementally with one additional commit since the last revision:
>
> Update copyright and add this bug id to ToolingTest
Implementation and new tests look good to me, too. Thanks for improving this feature of the tooling script.
Seems like two of the pre-submit checks ran into timeouts — thus, not related to this change.
-------------
Marked as reviewed by cstein (Committer).
PR Review: https://git.openjdk.org/jdk/pull/26864#pullrequestreview-3141970637
PR Comment: https://git.openjdk.org/jdk/pull/26864#issuecomment-3211783251
More information about the compiler-dev
mailing list