On Tue, 12 Apr 2022 19:55:13 GMT, Eamonn McManus <emcma...@openjdk.org> wrote:

>> PR for Sequenced Collections implementation.
>
> 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.

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

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

Reply via email to