RFR: 8328821: Map.of() derived view collection mutators should throw UnsupportedOperationException [v7]

Stuart Marks smarks at openjdk.org
Thu Jul 11 06:26:57 UTC 2024


On Tue, 9 Jul 2024 23:17:47 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

>> This change overrides mutator methods in the implementation returned by `Map.of().entrySet()` to throw `UnsupportedOperationException`.
>
> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update test/jdk/java/util/Collection/MOAT.java
>   
>   Co-authored-by: Chen Liang <liach at openjdk.org>

Please see the analysis I just added to the bug report:

https://bugs.openjdk.org/browse/JDK-8328821?focusedId=14688968&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14688968

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

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


More information about the core-libs-dev mailing list