On Thu, 28 May 2026 11:55:38 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). > > Further I'm going with tests more issues I'm discovering. > So far I fixed creating elements for "standard" and observable collections > (`List`, `Set`, `Map`). But I find out that `Arrays` also does not work. It > is questionable whether to fix them in this PR as well or leave to another > one. It might need bigger changes. @stechy1 Also note that the tests do not run in your fork. You need to enable Github Actions. See here: https://github.com/openjdk/jfx/blob/master/CONTRIBUTING.md#submitting-your-changes-via-a-pull-request ------------- PR Comment: https://git.openjdk.org/jfx/pull/2167#issuecomment-4947515999
