Skip to content

Fix ProxyBuilder to correctly handle read-only Map properties with @NamedArg constructor#2167

Open
stechy1 wants to merge 1 commit into
openjdk:masterfrom
stechy1:fix-proxy-builder-named-arg-properties
Open

Fix ProxyBuilder to correctly handle read-only Map properties with @NamedArg constructor#2167
stechy1 wants to merge 1 commit into
openjdk:masterfrom
stechy1:fix-proxy-builder-named-arg-properties

Conversation

@stechy1
Copy link
Copy Markdown

@stechy1 stechy1 commented May 13, 2026

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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Error

 ⚠️ Pull request body is missing required line: - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/2167/head:pull/2167
$ git checkout pull/2167

Update a local copy of the PR:
$ git checkout pull/2167
$ git pull https://git.openjdk.org/jfx.git pull/2167/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2167

View PR using the GUI difftool:
$ git pr show -t 2167

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/2167.diff

@bridgekeeper bridgekeeper Bot added the oca Needs verification of OCA signatory status label May 13, 2026
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 13, 2026

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 /signed in a comment in this pull request.

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 /covered in a comment in this pull request.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 13, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@stechy1
Copy link
Copy Markdown
Author

stechy1 commented May 14, 2026

/signed

@bridgekeeper bridgekeeper Bot added the oca-verify Needs verification of OCA signatory status label May 14, 2026
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 14, 2026

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!

@bridgekeeper bridgekeeper Bot removed oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status labels May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant