On Wed, 13 May 2026 14:01:46 GMT, Petr Štechmüller <[email protected]> wrote:

> ProxyBuilder is used by the FXML loader to instantiate classes whose 
> constructors are annotated with `@NamedArg`. When such a class also exposes a 
> read-only `Map` property (e.g. getProperties() — the same pattern used by 
> `javafx.scene.Node`), setting child elements under that property in FXML 
> caused incorrect behaviour or a runtime error.
> 
> **Root cause:** _getReadOnlyProperty()_ always returned an `ArrayListWrapper` 
> regardless of the actual **getter** return type. When the getter returns a 
> `Map`, an `ArrayListWrapper` is the wrong container and the entries are never 
> transferred to the real map on the object.
> 
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

do you have a minimal reproducer? In pure Java, so I can do some tests and if I 
can reproduce create a ticket?

Thanks, will take a closer look soon. Note that your PR body does not exactly 
match the specification for the AI line. Can you fix that?

Questions:
- Can we write a test for the Readonly List case as well?
- We should probably also check `ObservableSet`, right? So that we handle all 
collections. If we should do that, can you write a test as well? Would help a 
lot!

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

PR Comment: https://git.openjdk.org/jfx/pull/2167#issuecomment-4518425300
PR Comment: https://git.openjdk.org/jfx/pull/2167#issuecomment-4554439850

Reply via email to