8361493: RepaintManager.invalidComponents uses different equality when searching element#30184
8361493: RepaintManager.invalidComponents uses different equality when searching element#30184Renjithkannath wants to merge 1 commit intoopenjdk:masterfrom
Conversation
…n searching element
|
👋 Welcome back rkannathpari! A progress list of the required criteria for merging this PR into |
|
@Renjithkannath 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 39 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 (@aivanov-jdk) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
@Renjithkannath The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
aivanov-jdk
left a comment
There was a problem hiding this comment.
Looks good to me, except for a minor comment.
| for (int i = 0; i < n; i++) { | ||
| if (component == invalidComponents.get(i)) { | ||
| invalidComponents.remove(i); | ||
| return; |
There was a problem hiding this comment.
I would rather use break here. There's no code that follows, therefore both break and return have the same effect, yet break is safer in my opinion.
|
@mrserb, please review. @turbanoff you may be interested, too. This is the fix to a problem discovered in #24845 (comment). |
|
Is it possible to cover the patch by the new test? |
Renjith and I discussed it, and we didn't find a way to reliably test the behaviour. The list is internal to I'll let Renjith to comment with more details because he's been doing the work. |
|
Hi @mrserb thank you for your time. Yes I tried to add a verification test on this case but not succeed, same discussed with Alexey. Though If you have any better solution please let me know . Regards, |
It should be possible: if two invalid but equal components are added to the RepaintManager and one of them is incorrectly removed, you can trigger validateInvalidComponents so that only the component still stored in the RepaintManager will be validated. |
You're right. The more I think about it, the surer I am that the issue can be tested. |
Hi Reviewers,
I have updated the method with
for loopand==so the code will mach withaddInvalidComponentPlease review and let me know your suggestions
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30184/head:pull/30184$ git checkout pull/30184Update a local copy of the PR:
$ git checkout pull/30184$ git pull https://git.openjdk.org/jdk.git pull/30184/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 30184View PR using the GUI difftool:
$ git pr show -t 30184Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30184.diff
Using Webrev
Link to Webrev Comment