RFR: 8343427: Class file load hook crashes on archived classes from multi-release JARs [v4]

David Holmes dholmes at openjdk.org
Tue Nov 26 00:31:50 UTC 2024


On Mon, 25 Nov 2024 19:26:40 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> src/hotspot/share/cds/filemap.cpp line 2718:
>> 
>>> 2716:   // The result should be a [B
>>> 2717:   assert(obj->is_typeArray(), "just checking");
>>> 2718:   assert(TypeArrayKlass::cast(obj->klass())->element_type() == T_BYTE, "just checking");
>> 
>> This seems unnecessary. What kind of errors are you trying to detect with this? The method signature indicates it returns a byte-array.
>
> I adapted the asserts from diagnosticCommand.cpp. I'm keeping the first assert. Is it ok?

Both asserts are unnecessary.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22262#discussion_r1857508019


More information about the core-libs-dev mailing list