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.

The code you wrote to do this[1] 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?

Thanks!

/Claes

[1] http://cr.openjdk.java.net/~plevart/jdk9-dev/String.CASE_INSENSITIVE_HASHER/webrev.01/

Reply via email to