RFR: 8327246: Add a jcmd diagnostic command to list the jar files loaded by a process [v2]
David Holmes
dholmes at openjdk.org
Tue Jan 13 05:42:19 UTC 2026
On Tue, 13 Jan 2026 05:26:44 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> I would prefer to add assertion it such cases. So we can see during testing if assumption is incorrect. It also helps to find changed invariants earlier.
>> The defensive code path might be fine for product to don't bother users with crashes.
>
> My concern with "defensive coding" like this is that it implies we do not know the answer to the question and we should know it. In this case asserting we have an InstanceKlass seems preferabled to me.
But again the assertion (if present) is in place of the runtime check.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29048#discussion_r2684904444
More information about the serviceability-dev
mailing list