On Wed, 15 Mar 2023 18:54:02 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:
>> I don't mind either way; @jonathan-gibbons do you have a preference? > > TANSTAAFL > > I suggest to leave the code as-is. 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); }); ------------- PR: https://git.openjdk.org/jdk/pull/13044