Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals [v2]

2023-07-19 Thread Martin Buchholz
On Wed, 19 Jul 2023 22:08:04 GMT, Pavel Rappo wrote: >> Please review this PR to use modern APIs and language features to simplify >> equals for BitSet. >> >> I couldn't see how to refactor hashCode using Arrays utility methods in a >> way that preserves its specification. So, aside from refa

Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals [v2]

2023-07-19 Thread Pavel Rappo
> Please review this PR to use modern APIs and language features to simplify > equals for BitSet. > > I couldn't see how to refactor hashCode using Arrays utility methods in a way > that preserves its specification. So, aside from refactoring its doc comment > and annotating it with `@Override

Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals

2023-07-19 Thread Roger Riggs
On Thu, 13 Jul 2023 10:50:30 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > equals for BitSet. > > I couldn't see how to refactor hashCode using Arrays utility methods in a way > that preserves its specification. So, aside from refactori

Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals

2023-07-19 Thread Martin Buchholz
On Thu, 13 Jul 2023 10:50:30 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > equals for BitSet. > > I couldn't see how to refactor hashCode using Arrays utility methods in a way > that preserves its specification. So, aside from refactori

Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals

2023-07-19 Thread Martin Buchholz
On Thu, 13 Jul 2023 10:50:30 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > equals for BitSet. > > I couldn't see how to refactor hashCode using Arrays utility methods in a way > that preserves its specification. So, aside from refactori

Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals

2023-07-19 Thread Pavel Rappo
On Thu, 13 Jul 2023 14:50:55 GMT, Roger Riggs wrote: >> Please review this PR to use modern APIs and language features to simplify >> equals for BitSet. >> >> I couldn't see how to refactor hashCode using Arrays utility methods in a >> way that preserves its specification. So, aside from refa

Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals

2023-07-19 Thread Pavel Rappo
On Wed, 19 Jul 2023 17:15:34 GMT, Martin Buchholz 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 repres

Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals

2023-07-19 Thread Martin Buchholz
On Wed, 19 Jul 2023 15:10:45 GMT, Pavel Rappo 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 wou

Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals

2023-07-19 Thread Pavel Rappo
On Wed, 19 Jul 2023 15:05:06 GMT, Martin Buchholz wrote: > BitSet#equals Did you mean BitSet#hashCode? - PR Comment: https://git.openjdk.org/jdk/pull/14868#issuecomment-1642274647

Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals

2023-07-19 Thread Martin Buchholz
On Thu, 13 Jul 2023 10:50:30 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > equals for BitSet. > > I couldn't see how to refactor hashCode using Arrays utility methods in a way > that preserves its specification. So, aside from refactori

Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals

2023-07-19 Thread Martin Buchholz
On Thu, 13 Jul 2023 10:50:30 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > equals for BitSet. > > I couldn't see how to refactor hashCode using Arrays utility methods in a way > that preserves its specification. So, aside from refactori

Re: RFR: 8312019: Simplify and modernize java.util.BitSet.equals

2023-07-13 Thread Roger Riggs
On Thu, 13 Jul 2023 10:50:30 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > equals for BitSet. > > I couldn't see how to refactor hashCode using Arrays utility methods in a way > that preserves its specification. So, aside from refactori