On Tue, 20 May 2025 02:00:21 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> Yet there could be a logical error anyway… `addInvalidComponent` uses 
>> identity comparison when adding a component but `removeInvalidComponent` 
>> relies on `equals` method to remove a component.
>> 
>> If a component overrides `equals`, it could lead to unpredictable behaviour: 
>> a wrong component could be removed.
>
> Then it's better to use "==" in all cases, what do you think?

Filled [JDK-8361493](https://bugs.openjdk.org/browse/)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24845#discussion_r2189912212

Reply via email to