RFR: 8304146: Refactor VisibleMemberTable (LocalMemberTable) [v2]

Pavel Rappo prappo at openjdk.org
Wed Mar 15 21:11:24 UTC 2023


On Wed, 15 Mar 2023 21:00:24 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> True, my previous suggestion is largely trivial.
>> 
>> In addition, I suggest to run `replaceAll` to ensure the map elements of each value of `namedMembers` is unmodifiable as well:
>> 
>> namedMembers.replaceAll((k, m) -> {
>>     m.replaceAll((n, members) -> Collections.unmodifiableList(members));
>>     return Collections.unmodifiableMap(m);
>> });
>
> @liach there's no need for namedMembers or its value maps to be unmodifiable: it's the lists that are exposed. So let's protect just them.

Sorry, pushed the change sloppily. Since it was done recently and there haven't been more pushes on top of that, I pushed forcefully. Please consider 963bff7 instead of ~7565f89~.

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

PR: https://git.openjdk.org/jdk/pull/13044


More information about the javadoc-dev mailing list