On Wed, 19 Oct 2022 20:37:34 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
> Thank you. You do bring a good point - clearing the map. There is some mild > language warning about clearing the map in javadoc already, but perhaps > `Node.getProperties().clear()` should be forbidden (throw an IOE?). A map can also be cleared with `Map.keySet().clear()`, or by enumerating its keys and removing each mapping one by one. I don't think we can make the `getProperties()` map mutable, but at the same time safe to store final objects, while still respecting the `Map` contract. Maybe we could have something like "hidden" keys, which are not enumerable and are never cleared by bulk operations. ------------- PR: https://git.openjdk.org/jfx/pull/830