[ https://issues.apache.org/jira/browse/LUCENE-6206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14296847#comment-14296847 ]
ASF subversion and git services commented on LUCENE-6206: --------------------------------------------------------- Commit 1655657 from [~rcmuir] in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1655657 ] LUCENE-6206: don't fail test if it encounters jdk bug > TestCollationDocValuesField.testRanges failure > ---------------------------------------------- > > Key: LUCENE-6206 > URL: https://issues.apache.org/jira/browse/LUCENE-6206 > Project: Lucene - Core > Issue Type: Task > Reporter: Robert Muir > > This test failed in branch_5x: > {noformat} > ant test -Dtestcase=TestCollationDocValuesField -Dtests.method=testRanges > -Dtests.seed=8729A11DAE9AE179 -Dtests.multiplier=3 -Dtests.slow=true > -Dtests.locale=lt -Dtests.timezone=Etc/GMT-8 -Dtests.asserts=true > -Dtests.file.encoding=UTF-8 > {noformat} > The problem is, with lithuanian collator, the generated collationkey does not > agree with collation order. > In other words: collator.compare("yi", "iy") != > collator.getCollationKey("yi").compareTo(collator.getCollationKey("iy")) > Simple test: > {code} > import java.text.Collator; > import java.util.Locale; > public class TestLithuanian { > public static void main(String args[]) throws Exception { > Collator collator = Collator.getInstance(new Locale("lt")); > int value = collator.compare("yi", "iy"); > System.out.println(value); // returns 1 > int value2 = > collator.getCollationKey("yi").compareTo(collator.getCollationKey("iy")); > System.out.println(value2); // returns -1 > } > } > {code} > Note that if you change java.text.Collator to com.ibm.icu.text.Collator, they > are consistent. Looks like a bug in JDK collation. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org