RFR: 8356941: AbstractMethodError in HotSpot Due to Incorrect Handling of Private Method [v2]
Coleen Phillimore
coleenp at openjdk.org
Tue Jul 15 17:40:40 UTC 2025
On Tue, 15 Jul 2025 00:52:54 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Private methods should never be considered as the implementation of a default method.
>>
>> The first commit adds some additional logging I used to track down what was happening. I like it, but if reviewers think it too much I can drop it.
>>
>> The second commit is the actual fix to exclude private methods, and adds the missing test case to the existing defmeth tests.
>>
>> Testing:
>> - tiers 1-4
>>
>> Thanks
>
> David Holmes has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - Merge branch 'master' into 8356941-defaultmeth
> - Merge branch 'master' into 8356941-defaultmeth
> - Fix bug and add new testcases
> - Additional logging to identify the problem
src/hotspot/share/classfile/defaultMethods.cpp line 686:
> 684: }
> 685: Method* impl = klass->lookup_method(m->name(), m->signature());
> 686: if (impl == nullptr || impl->is_overpass() || impl->is_static() || impl->is_private()) {
I still haven't figured out why this code fixes this issue, but why doesn't line 657 need the same change?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26302#discussion_r2208165331
More information about the hotspot-runtime-dev
mailing list