Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8334739: XYChart and (Stacked)AreaChart properties return incorrect beans #1485

Closed
wants to merge 2 commits into from

Conversation

drmarmac
Copy link
Contributor

@drmarmac drmarmac commented Jun 21, 2024

This PR makes the XYChart axes properties return the correct parent XYChart 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

Issue

  • JDK-8334739: XYChart and (Stacked)AreaChart properties return incorrect beans (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1485

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 21, 2024

👋 Welcome back mmack! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jun 21, 2024

@drmarmac This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8334739: XYChart and (Stacked)AreaChart properties return incorrect beans

Reviewed-by: angorya

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1 new commit pushed to the master branch:

  • c0216ae: 8088923: IOOBE when adding duplicate categories to the BarChart

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@andy-goryachev-oracle) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the rfr Ready for review label Jun 21, 2024
@mlbridge
Copy link

mlbridge bot commented Jun 21, 2024

Webrevs

@andy-goryachev-oracle
Copy link
Contributor

I am wondering if we have more cases like that.

Would it be possible to have a unit test to scan over a set of Controls + Shapes + any other classes looking for public properties and checking their getBean() values? Is that even possible @kevinrushforth ? This might be a separate issue though.

@andy-goryachev-oracle
Copy link
Contributor

andy-goryachev-oracle commented Jun 21, 2024

Searched for public Object getBean() {

For class names A-C found one hit:
AreaChart.createSymbols line 109

which means there might be more, but manual scanning of 1,752 total hits might take some time...

edit: actually, it's doable. Assuming the formatting is consistent, I found only one additional hit:

StackedAreaChart:109

@drmarmac
Copy link
Contributor Author

in StackedAreaChart there's another one

Copy link
Contributor

@andy-goryachev-oracle andy-goryachev-oracle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please wait 24 hrs for other people to weigh in.

@openjdk openjdk bot added the ready Ready to be integrated label Jun 21, 2024
@kevinrushforth
Copy link
Member

Would it be possible to have a unit test to scan over a set of Controls + Shapes + any other classes looking for public properties and checking their getBean() values? Is that even possible @kevinrushforth ? This might be a separate issue though.

It seems like it ought to be possible to write such a test. Thinking out loud, perhaps the test could take a list of JavaFX object instances (since we need an instance to inspect the bean, and not all of our classes have a no-arg constructor), and for each object enumerate the methods of its class -- including the superclass methods up the chain -- looking for methods named xxxProperty whose return type implements javafx.beans.property.ReadOnlyProperty.

@kevinrushforth
Copy link
Member

Since this fix now includes two other chart classes, maybe change the JBS title (and, correspondingly this PR title) to something a little more generic that would cover them?

@kevinrushforth
Copy link
Member

It seems like it ought to be possible to write such a test.

Oh, and definitely a separate issue and not urgent (maybe a good test sprint bug).

@andy-goryachev-oracle
Copy link
Contributor

Created umbrella task https://bugs.openjdk.org/browse/JDK-8334744

Currently only mentions the getBean(), but I am sure we can test other invariants.

@drmarmac drmarmac changed the title 8334739: XYChart.x/yAxisProperty returns incorrect bean 8334739: XYChart and (Stacked)AreaChart properties return incorrect beans Jun 21, 2024
@andy-goryachev-oracle
Copy link
Contributor

Thank you @drmarmac for logging and fixing this and the other bugs!
We'll integrate on Monday if no other feedback is received.

@drmarmac
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Ready to sponsor label Jun 24, 2024
@openjdk
Copy link

openjdk bot commented Jun 24, 2024

@drmarmac
Your change (at version 761c82a) is now ready to be sponsored by a Committer.

@andy-goryachev-oracle
Copy link
Contributor

/sponsor

@openjdk
Copy link

openjdk bot commented Jun 24, 2024

Going to push as commit 17c2dba.
Since your change was applied there has been 1 commit pushed to the master branch:

  • c0216ae: 8088923: IOOBE when adding duplicate categories to the BarChart

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 24, 2024
@openjdk openjdk bot closed this Jun 24, 2024
@openjdk openjdk bot removed ready Ready to be integrated rfr Ready for review sponsor Ready to sponsor labels Jun 24, 2024
@openjdk
Copy link

openjdk bot commented Jun 24, 2024

@andy-goryachev-oracle @drmarmac Pushed as commit 17c2dba.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants