Fix ProxyBuilder to correctly handle read-only Map properties with @NamedArg constructor#2167
Fix ProxyBuilder to correctly handle read-only Map properties with @NamedArg constructor#2167stechy1 wants to merge 1 commit into
Conversation
|
Hi @stechy1, welcome to this OpenJDK project and thanks for contributing! We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user stechy1" as summary for the issue. If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing |
|
❗ This change is not yet ready to be integrated. |
|
/signed |
|
Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated! |
ProxyBuilder is used by the FXML loader to instantiate classes whose constructors are annotated with
@NamedArg. When such a class also exposes a read-onlyMapproperty (e.g. getProperties() — the same pattern used byjavafx.scene.Node), setting child elements under that property in FXML caused incorrect behaviour or a runtime error.Root cause: getReadOnlyProperty() always returned an
ArrayListWrapperregardless of the actual getter return type. When the getter returns aMap, anArrayListWrapperis the wrong container and the entries are never transferred to the real map on the object.Progress
Error
- [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/2167/head:pull/2167$ git checkout pull/2167Update a local copy of the PR:
$ git checkout pull/2167$ git pull https://git.openjdk.org/jfx.git pull/2167/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2167View PR using the GUI difftool:
$ git pr show -t 2167Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/2167.diff