[ 
https://issues.apache.org/jira/browse/LUCENE-7053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15171012#comment-15171012
 ] 

Uwe Schindler commented on LUCENE-7053:
---------------------------------------

bq. We can take this further, e.g. I grep'd for places calling 
BytesRef.getUTF8SortedAsUnicodeComparator and it turns up silliness in 
BlockTermsReader that should just be invoking BytesRef.compareTo directly 
instead, I think?

Yeah. As said, we may not remove the comparator completely, but we should only 
use it at places where we can't use {{Comparable<BytesRef>}} interface that 
BytesRef implements.

bq. You can also fix TestUnicodeUtil's custom String -> int[] code points logic 
maybe?

Will check this, too. I am currently investigating it Java 8 already has some 
Comparator interface somewhere ready-to use. But does not look like that.

> Remove deprecated BytesRef#getUTF8SortedAsUTF16Comparator()
> -----------------------------------------------------------
>
>                 Key: LUCENE-7053
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7053
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/other
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: master, 6.0
>
>         Attachments: LUCENE-7053.patch
>
>
> Followup from LUCENE-7052: This removes the legacy, deprecated 
> getUTF8SortedAsUTF16Comparator() in the BytesRef class. The only left over 
> user was TSTLookup. Moves the code there as private impl detail.
> This also converts the comparators to lambdas for better readability.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to