RFR: 8328821: Map.of().entrySet() mutators should throw UnsupportedOperationException

Viktor Klang vklang at openjdk.org
Wed Jul 3 09:32:19 UTC 2024


On Fri, 10 May 2024 01:24:15 GMT, Chen Liang <liach at openjdk.org> wrote:

>> This change overrides mutator methods in the implementation returned by `Map.of().entrySet()` to throw `UnsupportedOperationException`.
>
> @stuart-marks Can you take a look at this?

I've had a look here, and it functionally looks good to me. The remaining challenge is the impact of the change on existing code (likely written between 11 and now, as <10 code would not have the problem AFAICT). /cc @liach

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

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


More information about the core-libs-dev mailing list