RFR: 8357226: Remove unnecessary List.indexOf from RepaintManager.removeInvalidComponent
Sergey Bylokhov
serb at openjdk.org
Mon May 19 08:26:28 UTC 2025
On Wed, 30 Apr 2025 07:23:06 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
>> the loop over invalidComponents
>
> Do you suggest to use `List.indexOf` instead of manual loop?
> https://github.com/openjdk/jdk/blob/375ac6d446332f0763ce294b200143ff63865cf6/src/java.desktop/share/classes/javax/swing/RepaintManager.java#L366-L371
>
> This loop uses `==` comparison, while `List.indexOf` uses `equals()`. It could change semantic
ok, the it is fine as is.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24845#discussion_r2085735458
More information about the client-libs-dev
mailing list