RFR: JDK-8325255 jdk.internal.util.ReferencedKeySet::add using wrong test [v4]
Jim Laskey
james.laskey at oracle.com
Sat Mar 9 15:58:35 UTC 2024
The class is used in java.lang.invoke.MethodType but add is not used.
📱
> On Mar 9, 2024, at 11:42 AM, Chen Liang <liach at openjdk.org> wrote:
>
> On Tue, 5 Mar 2024 20:23:56 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:
>
>>> Currently, add is returning intern(e) == null which will always be false. The correct test is intern(e) == e , that is, true when element is newly added.
>>
>> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix ReferencedKeySet::add
>
> ReferencedKeySet.add isn't used anywhere and this set implementation is not exposed to users at all. If this is backported, it will most likely become part of JDK 22 updates instead of JDK 22.
>
> -------------
>
> PR Comment: https://git.openjdk.org/jdk/pull/17732#issuecomment-1986889593
More information about the core-libs-dev
mailing list