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

Pavel Rappo prappo at openjdk.org
Wed Mar 15 21:00:55 UTC 2023


On Wed, 15 Mar 2023 20:18:11 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> I believe that shallow unmodifiability of namedMembers is a bug, which you spotted. We should either fix it by making it deeply unmodifiable, or remove this defensiveness altogether: those lists and maps (especially maps) are internal and should never escape. I suppose, it's better to fix it now and revisit later.
>
> Or just comment the existing code, indicating that this is just a shallow copy.

I think we should follow the original code intent, if that's not too complicated. Please have a look at the proposal in 7565f89, and if you are okay with it, and the tests pass, I'll integrate it.

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

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


More information about the javadoc-dev mailing list