RFR  8151384: Examine sun.misc.ASCIICaseInsensitiveComparator
chris.hegarty at oracle.com
Wed Mar 9 16:17:53 UTC 2016
On 9 Mar 2016, at 16:10, Claes Redestad <claes.redestad at oracle.com> wrote:
> On 2016-03-09 16:58, Peter Levart wrote:
>>> Can this really happen? ASCIICaseInsensitiveComparator was asserting that
>>> string characters were ASCII, so this situation would have triggered an assert
>>> with the old code, no?
>> If assertions were..
> Stahp! Attributes.Name constructor validates that all charachters in name is in [0-9a-zA-Z-_], so I think we're good from a correctness perspective already.
A yes, I remember this now. Thanks Claes.
> The code you wrote to do this looks like a performance win since it avoids the lower-casing. Doesn't seem worth it for Attributes alone, but maybe there's demand for such a utility elsewhere?
Right. I did consider this at the time too, but wasn’t sure if there
was real demand, though it does seem reasonable.
>  http://cr.openjdk.java.net/~plevart/jdk9-dev/String.CASE_INSENSITIVE_HASHER/webrev.01/
More information about the core-libs-dev