On Tue, 12 Apr 2022 23:25:14 GMT, Stuart Marks <sma...@openjdk.org> wrote:

>> src/java.base/share/classes/java/util/LinkedHashMap.java line 604:
>> 
>>> 602:      * @return a set view of the keys contained in this map
>>> 603:      */
>>> 604:     public SequencedSet<K> keySet() {
>> 
>> Changing the return type means that subclasses of `LinkedHashMap` that 
>> override `keySet()` will no longer compile, unless they also change the 
>> return type.
>
> Yes. Previously compiled binaries will also throw `NoSuchMethodError` if they 
> call `super.keySet()`. Clearly these are incompatibilities; the question is 
> whether they are severe enough to warrant pursuing a different approach. If 
> you have any thoughts about how to assess the severity of this change, please 
> let me know.

Won’t `super.keySet()` resolve to a bridge method in that case?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/7387#discussion_r849394986

Reply via email to