On Wed, 11 Mar 2026 11:04:02 GMT, Renjith Kannath Pariyangad <[email protected]> wrote:
> Hi Reviewers, > > I have updated the method with `for loop` and `==` so the code will mach with > `addInvalidComponent` > > Please review and let me know your suggestions Looks good to me, except for a minor comment. @mrserb, please review. @turbanoff you may be interested, too. This is the fix to a problem discovered in https://github.com/openjdk/jdk/pull/24845#discussion_r2095611426. src/java.desktop/share/classes/javax/swing/RepaintManager.java line 387: > 385: if (component == invalidComponents.get(i)) { > 386: invalidComponents.remove(i); > 387: return; 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. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/30184#pullrequestreview-3932155051 PR Comment: https://git.openjdk.org/jdk/pull/30184#issuecomment-4041800408 PR Review Comment: https://git.openjdk.org/jdk/pull/30184#discussion_r2920641774
