RFR: 8312019: Simplify and modernize java.util.BitSet.equals
Martin Buchholz
martin at openjdk.org
Wed Jul 19 17:18:40 UTC 2023
On Wed, 19 Jul 2023 15:10:45 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
> > BitSet#equals
>
> Did you mean BitSet#hashCode?
No. BitSet#equals uses the private fields and methods of its argument, which OO purists would never allow.
If the other is a subclass with a different private representation, this code would fail.
(Don't fix it!)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14868#issuecomment-1642462274
More information about the core-libs-dev
mailing list