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:36:41 UTC 2026
On Fri, 9 Jan 2026 17:43:14 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> good question, but I think defensive coding is warranted, and this is not a performance sensitive code path IMO
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29048#discussion_r2684879556
More information about the hotspot-dev
mailing list