On Tue, 13 Jan 2026 20:44:37 GMT, Larry Cable <[email protected]> wrote:

>> modified the pre-existing VM.classes jcmd to add a 'location' option, that 
>> when specified, will (natively) attempt to obtain the value (if non-null) of 
>> the location URL of the CodeSource of each classes ProtectionDomain.
>> 
>> effectively:
>> 
>> someObject.getClass().getProtectionDomain().getCodeSource().getLocation().toExternalForm()
>> 
>> (where interim oops are null-checked)
>
> Larry Cable has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   JDK-8327246: changes as per @dholmes and @kwalls

src/hotspot/share/oops/instanceKlass.cpp line 2389:

> 2387: 
> 2388:     if (pd != nullptr) {
> 2389: 

Suggestion:

    if (pd != nullptr) {
      assert(pd->klass()->is_instance_klass(), "pd klass is not InstanceKlass");

Nit: the asserts can be simplified by moving inside the null-checked regions.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29048#discussion_r2688502321

Reply via email to