On Fri, 26 Apr 2024 18:20:18 GMT, Liam Miller-Cushon <cus...@openjdk.org> wrote:

>> This change overrides mutator methods in the implementation returned by 
>> `Map.of().entrySet()` to throw `UnsupportedOperationException`.
>
> Please keep this open

@cushon Given we have specified in `Collection` that unmodifiability extends to 
all derived collection views: 
https://github.com/openjdk/jdk/blob/4c9a511f75174a3f3ae575fae2677c198c607b52/src/java.base/share/classes/java/util/Collection.java#L159-L160

Would you mind changing "Calling any mutator method on the Map will ..." to 
something like "... on the map or any derived view collection will ..." to 
emphasize our new consistency? (Our internal conversation agreed on this)
https://github.com/openjdk/jdk/blob/4c9a511f75174a3f3ae575fae2677c198c607b52/src/java.base/share/classes/java/util/Map.java#L125-L126

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

PR Comment: https://git.openjdk.org/jdk/pull/18522#issuecomment-2218833548

Reply via email to