RFR: 8313435: Clean up unused default methods code [v4]

Coleen Phillimore coleenp at openjdk.org
Thu Aug 3 11:48:31 UTC 2023


On Thu, 3 Aug 2023 05:01:19 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Check for constant pool overflow when appending entries from default methods error (aka overpass) methods.
>
> src/hotspot/share/classfile/defaultMethods.cpp line 1064:
> 
>> 1062:   assert(new_methods_length <= USHRT_MAX,
>> 1063:          "error methods for default method processing caused too many methods in class %s",
>> 1064:          klass->external_name());
> 
> I don't think this can be an assert. What happens if you define an interface with max(u2)-1 methods and have it implemented by a class that already has some methods? I would expect this to be a runtime exception.

I expected something to check the number of miranda methods, but I don't see that.  I'll add back the exception.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15095#discussion_r1283081187


More information about the hotspot-runtime-dev mailing list