[8u] RFR 8214687: Optimize Collections.nCopies().hashCode() and equals()
Hohensee, Paul
hohensee at amazon.com
Wed Jul 17 14:35:52 UTC 2019
Turns out that Preconditions.java is part of the one of the security patches released yesterday (thanks, Andrew, for pointing that out!), so indeed can be used here.
Paul
On 7/16/19, 12:26 AM, "jdk8u-dev on behalf of Andrew John Hughes" <jdk8u-dev-bounces at openjdk.java.net on behalf of gnu.andrew at redhat.com> wrote:
On 15/07/2019 09:27, Aleksey Shipilev wrote:
> On 7/2/19 9:53 PM, Aleksey Shipilev wrote:
>> Original RFE:
>> https://bugs.openjdk.java.net/browse/JDK-8214687
>> https://hg.openjdk.java.net/jdk/jdk/rev/cfceb4df2499
>>
>> Patch applies with usual reshufflings. But the test parts require touchups to compile and run on 8u:
>> type inference is not that rich, and there is no Objects.checkIndex. 8u webrev:
>> https://cr.openjdk.java.net/~shade/8214687/webrev.8u.01/
>>
>> Testing: tier1-like suite, new test
>
> Friendly reminder.
>
Friendly reminder there's a release today :)
Objects.checkIndex is simply a wrapper around Preconditions.checkIndex:
public static
int checkIndex(int index, int length) {
return Preconditions.checkIndex(index, length, null);
}
which is in 8u. Probably worth adding the 2-argument version to
Preconditions.
Thanks,
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the jdk8u-dev
mailing list