It would be useful to make the code method lookup code less general. In it current state it reflects a time where we always did two lookups - but the JLS has later been rectified, so that now we only do two lookups for unbound method references (e.g. those with static qualifier). But this is not clearly reflected in the code. The current code is not the best in terms of achieving good JLS parity w/ a good readability, because it's trying to do too much
see comments at https://github.com/openjdk/jdk/pull/11093
see comments at https://github.com/openjdk/jdk/pull/11093