-
Notifications
You must be signed in to change notification settings - Fork 541
8251946: ObservableList.setAll does not conform to specification #284
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
Conversation
|
Hi @TheMrMilchmann, 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 TheMrMilchmann" 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 |
|
@TheMrMilchmann I am not actively working on that bug, so you can proceed with this PR. I will review it when it is ready. Once you have submitted the OCA, please add a comment to this PR with the Please do add a unit test for this. You can find existing collections tests here. |
…rvableListBase#setAll
|
While adding unit tests, I noticed that I missed an important edge-case that has to be considered when computing if a list was modified. The initial implementation assumed that
However, a non-empty list is not modified either if Please let me know which solution you prefer. |
|
/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! |
|
/reviewers 2 |
|
@kevinrushforth |
|
One overall comment while we are waiting for your OCA to be approved. I don't think the complexity of this proposed fix to List::clear Given this, it seems reasonable for If there is a good justification for handling the corner case of calling |
|
Unfortunately, I don't see @TheMrMilchmann OCA in the approval queue. Could you please (re)send it to Oracle-ca_us@oracle.com? Thanks! |
…l-case two empty lists
@kevinrushforth Thanks for your feedback! I have just pushed a commit that greatly simplifies
Fair point. I'm afraid I don't have any justification other than that, in my opinion, this is a violation of the method's contract (which is debatable). I suppose it's best to leave it as-is for this case for now.
@robilad That's strange. I have sent a mail on Aug 13 and received no indication that it didn't go through (though neither did I receive an automated confirmation that it arrived - if such a thing is set up). Anyway, I just resent it. |
|
Thanks @TheMrMilchmann and apologies for the delay! |
Webrevs
|
arapte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change seems good, suggested minor changes.
modules/javafx.base/src/main/java/javafx/collections/ModifiableObservableListBase.java
Outdated
Show resolved
Hide resolved
modules/javafx.base/src/main/java/javafx/collections/ModifiableObservableListBase.java
Show resolved
Hide resolved
kevinrushforth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code change looks good. I have one suggestion for the test.
modules/javafx.base/src/test/java/test/javafx/collections/ObservableListTest.java
Show resolved
Hide resolved
|
@TheMrMilchmann 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: 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 23 new commits pushed to the
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 (@arapte, @kevinrushforth) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
/integrate |
|
@TheMrMilchmann |
|
/sponsor |
|
@nlisker @TheMrMilchmann Since your change was applied there have been 23 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 7857022. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi, this PR fixes JDK-8251946 computing whether the list was actually modified instead of just returning
true. The list was modified if#clear()), or if#addAll()call.If you want any test coverage for this please let me know.
I reported the issue a couple of days ago via web formula and waited for the confirmation to open this PR but now I see that @kevinrushforth (sorry for pinging) is already assigned to the JBS issue. I'm not too familiar with how you handle JBS issues or more specifically whether assigning is used to indicate that the issue is in the assignee's "domain", or that the assignee is already working on it. In the latter case, please feel free to close this PR. (My OCA submission is still pending anyway.)
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jfx pull/284/head:pull/284$ git checkout pull/284