You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2011/03/24 15:23:05 UTC
[jira] [Created] (LUCENE-2989) TestCollectionUtil fails on IBM JRE
TestCollectionUtil fails on IBM JRE
-----------------------------------
Key: LUCENE-2989
URL: https://issues.apache.org/jira/browse/LUCENE-2989
Project: Lucene - Java
Issue Type: Bug
Environment: java version "1.6.0"
Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
J9VM - 20080415_018762_lHdSMr
JIT - r9_20080415_1520
GC - 20080415_AA)
JCL - 20080412_01
Reporter: Robert Muir
[junit] Testcase: testEmptyArraySort(org.apache.lucene.util.TestCollectionUtil): Caused an ERROR
[junit] CollectionUtil can only sort random access lists in-place.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Assigned] (LUCENE-2989) TestCollectionUtil fails on IBM JRE
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler reassigned LUCENE-2989:
-------------------------------------
Assignee: Uwe Schindler
> TestCollectionUtil fails on IBM JRE
> -----------------------------------
>
> Key: LUCENE-2989
> URL: https://issues.apache.org/jira/browse/LUCENE-2989
> Project: Lucene - Java
> Issue Type: Bug
> Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
> J9VM - 20080415_018762_lHdSMr
> JIT - r9_20080415_1520
> GC - 20080415_AA)
> JCL - 20080412_01
> Reporter: Robert Muir
> Assignee: Uwe Schindler
> Attachments: LUCENE-2989.patch
>
>
> [junit] Testcase: testEmptyArraySort(org.apache.lucene.util.TestCollectionUtil): Caused an ERROR
> [junit] CollectionUtil can only sort random access lists in-place.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: [jira] [Updated] (LUCENE-2989) TestCollectionUtil fails on IBM JRE
Posted by Robert Muir <rc...@gmail.com>.
On Thu, Mar 24, 2011 at 2:28 PM, Chris Hostetter
<ho...@fucit.org> wrote:
>
> : The issue is a bug in IBM's Collections class. The List returned by
> : emptyList() does not implement RandomAccess.
> :
> : I fixed the test (unfortunately it's clear that emptyList() should
> : return a random access list, but it's not in the spec, so it's not
> : really IBM's fault). The fix is to use a realy empty Array and wrap it
> : with Arrays.asList().
>
> Should this make us rethink using Collections.emptyList() in the code
> base? Should we be roling our own?
>
If you want to rely upon the fact that Collections.emptyList()
implements RandomAccess, then yes. But this seems pretty silly, since
you arent going to be randomly-accessing anything.... I think Uwe's
followup issue (LUCENE-2990) is the best solution.
its not a bug in IBM's JRE: nowhere does it say that
Collections.emptyList should implement RandomAccess in the javadocs.
The only other thing they say about this method is that it need not
create a new object (up to implementation), and that its immutable and
serializable.
http://download.oracle.com/javase/1.5.0/docs/api/java/util/Collections.html#emptyList()
it was a bug in our test.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: [jira] [Updated] (LUCENE-2989) TestCollectionUtil fails on IBM JRE
Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
If I can add my two cents, I recall there were various problems with
Collections.emptyList() not overriding equals and hashCode properly (so that
a comparison to another empty list, but of a different class was yielding
false).
Dawid
On Thu, Mar 24, 2011 at 7:28 PM, Chris Hostetter
<ho...@fucit.org>wrote:
>
> : The issue is a bug in IBM's Collections class. The List returned by
> : emptyList() does not implement RandomAccess.
> :
> : I fixed the test (unfortunately it's clear that emptyList() should
> : return a random access list, but it's not in the spec, so it's not
> : really IBM's fault). The fix is to use a realy empty Array and wrap it
> : with Arrays.asList().
>
> Should this make us rethink using Collections.emptyList() in the code
> base? Should we be roling our own?
>
>
>
> -Hoss
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
Re: [jira] [Updated] (LUCENE-2989) TestCollectionUtil fails on IBM
JRE
Posted by Chris Hostetter <ho...@fucit.org>.
: The issue is a bug in IBM's Collections class. The List returned by
: emptyList() does not implement RandomAccess.
:
: I fixed the test (unfortunately it's clear that emptyList() should
: return a random access list, but it's not in the spec, so it's not
: really IBM's fault). The fix is to use a realy empty Array and wrap it
: with Arrays.asList().
Should this make us rethink using Collections.emptyList() in the code
base? Should we be roling our own?
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-2989) TestCollectionUtil fails on IBM JRE
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-2989:
----------------------------------
Attachment: LUCENE-2989.patch
The issue is a bug in IBM's Collections class. The List returned by emptyList() does not implement RandomAccess.
I fixed the test (unfortunately it's clear that emptyList() should return a random access list, but it's not in the spec, so it's not really IBM's fault). The fix is to use a realy empty Array and wrap it with Arrays.asList().
Robert can you test?
> TestCollectionUtil fails on IBM JRE
> -----------------------------------
>
> Key: LUCENE-2989
> URL: https://issues.apache.org/jira/browse/LUCENE-2989
> Project: Lucene - Java
> Issue Type: Bug
> Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
> J9VM - 20080415_018762_lHdSMr
> JIT - r9_20080415_1520
> GC - 20080415_AA)
> JCL - 20080412_01
> Reporter: Robert Muir
> Attachments: LUCENE-2989.patch
>
>
> [junit] Testcase: testEmptyArraySort(org.apache.lucene.util.TestCollectionUtil): Caused an ERROR
> [junit] CollectionUtil can only sort random access lists in-place.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Issue Comment Edited] (LUCENE-2989) TestCollectionUtil
fails on IBM JRE
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010702#comment-13010702 ]
Uwe Schindler edited comment on LUCENE-2989 at 3/24/11 3:31 PM:
----------------------------------------------------------------
The issue looks like a bug in IBM's Collections class, but it isn't. The List returned by emptyList() does not implement RandomAccess.
I fixed the test (unfortunately it's clear that emptyList() should return a random access list, but it's not in the spec, so it's not really IBM's fault). The fix is to use a realy empty Array and wrap it with Arrays.asList().
Robert can you test?
was (Author: thetaphi):
The issue is a bug in IBM's Collections class. The List returned by emptyList() does not implement RandomAccess.
I fixed the test (unfortunately it's clear that emptyList() should return a random access list, but it's not in the spec, so it's not really IBM's fault). The fix is to use a realy empty Array and wrap it with Arrays.asList().
Robert can you test?
> TestCollectionUtil fails on IBM JRE
> -----------------------------------
>
> Key: LUCENE-2989
> URL: https://issues.apache.org/jira/browse/LUCENE-2989
> Project: Lucene - Java
> Issue Type: Bug
> Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
> J9VM - 20080415_018762_lHdSMr
> JIT - r9_20080415_1520
> GC - 20080415_AA)
> JCL - 20080412_01
> Reporter: Robert Muir
> Assignee: Uwe Schindler
> Attachments: LUCENE-2989.patch
>
>
> [junit] Testcase: testEmptyArraySort(org.apache.lucene.util.TestCollectionUtil): Caused an ERROR
> [junit] CollectionUtil can only sort random access lists in-place.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-2989) TestCollectionUtil fails on IBM
JRE
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010688#comment-13010688 ]
Robert Muir commented on LUCENE-2989:
-------------------------------------
{noformat}
junit-sequential:
[junit] Testsuite: org.apache.lucene.util.TestCollectionUtil
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.173 sec
[junit]
[junit] ------------- Standard Error -----------------
[junit] NOTE: reproduce with: ant test -Dtestcase=TestCollectionUtil -Dtestmethod=testEmptyArraySort -Dtests.seed=7789232519167372758:-4267884142251261003
[junit] NOTE: test params are: codec=PreFlex, locale=fr_CH, timezone=America/Nassau
[junit] NOTE: all tests run in this JVM:
[junit] [TestCollectionUtil]
[junit] NOTE: Windows Vista 6.0 build 6002 Service Pack 2 x86/IBM Corporation 1.6.0 (32-bit)/cpus=4,threads=2,free=374312,total=4194304
[junit] ------------- ---------------- ---------------
[junit] Testcase: testEmptyArraySort(org.apache.lucene.util.TestCollectionUtil): Caused an ERROR
[junit] CollectionUtil can only sort random access lists in-place.
[junit] java.lang.IllegalArgumentException: CollectionUtil can only sort random access lists in-place.
[junit] at org.apache.lucene.util.CollectionUtil.getSorter(CollectionUtil.java:70)
[junit] at org.apache.lucene.util.CollectionUtil.quickSort(CollectionUtil.java:113)
[junit] at org.apache.lucene.util.TestCollectionUtil.testEmptyArraySort(TestCollectionUtil.java:95)
[junit] at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1214)
[junit] at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1146)
[junit]
[junit]
[junit] Test org.apache.lucene.util.TestCollectionUtil FAILED
{noformat}
> TestCollectionUtil fails on IBM JRE
> -----------------------------------
>
> Key: LUCENE-2989
> URL: https://issues.apache.org/jira/browse/LUCENE-2989
> Project: Lucene - Java
> Issue Type: Bug
> Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
> J9VM - 20080415_018762_lHdSMr
> JIT - r9_20080415_1520
> GC - 20080415_AA)
> JCL - 20080412_01
> Reporter: Robert Muir
>
> [junit] Testcase: testEmptyArraySort(org.apache.lucene.util.TestCollectionUtil): Caused an ERROR
> [junit] CollectionUtil can only sort random access lists in-place.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Resolved] (LUCENE-2989) TestCollectionUtil fails on IBM JRE
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler resolved LUCENE-2989.
-----------------------------------
Resolution: Fixed
Fix Version/s: (was: 3.1.1)
3.1
Merged also to 3.1.0
> TestCollectionUtil fails on IBM JRE
> -----------------------------------
>
> Key: LUCENE-2989
> URL: https://issues.apache.org/jira/browse/LUCENE-2989
> Project: Lucene - Java
> Issue Type: Bug
> Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
> J9VM - 20080415_018762_lHdSMr
> JIT - r9_20080415_1520
> GC - 20080415_AA)
> JCL - 20080412_01
> Reporter: Robert Muir
> Assignee: Uwe Schindler
> Fix For: 3.1, 3.2, 4.0
>
> Attachments: LUCENE-2989.patch
>
>
> [junit] Testcase: testEmptyArraySort(org.apache.lucene.util.TestCollectionUtil): Caused an ERROR
> [junit] CollectionUtil can only sort random access lists in-place.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-2989) TestCollectionUtil fails on IBM
JRE
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010715#comment-13010715 ]
Uwe Schindler commented on LUCENE-2989:
---------------------------------------
I will commit to trunk, 3.x!
If we respin 3.1 we could also merge there, but its not a blocker.
> TestCollectionUtil fails on IBM JRE
> -----------------------------------
>
> Key: LUCENE-2989
> URL: https://issues.apache.org/jira/browse/LUCENE-2989
> Project: Lucene - Java
> Issue Type: Bug
> Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
> J9VM - 20080415_018762_lHdSMr
> JIT - r9_20080415_1520
> GC - 20080415_AA)
> JCL - 20080412_01
> Reporter: Robert Muir
> Assignee: Uwe Schindler
> Fix For: 3.1.1, 3.2, 4.0
>
> Attachments: LUCENE-2989.patch
>
>
> [junit] Testcase: testEmptyArraySort(org.apache.lucene.util.TestCollectionUtil): Caused an ERROR
> [junit] CollectionUtil can only sort random access lists in-place.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-2989) TestCollectionUtil fails on IBM
JRE
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010719#comment-13010719 ]
Uwe Schindler commented on LUCENE-2989:
---------------------------------------
Committed trunk revision: 1085004
Committed 3.x revision: 1085006
I will keep this issue open, that we can merge to 3.1 branch, too.
> TestCollectionUtil fails on IBM JRE
> -----------------------------------
>
> Key: LUCENE-2989
> URL: https://issues.apache.org/jira/browse/LUCENE-2989
> Project: Lucene - Java
> Issue Type: Bug
> Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
> J9VM - 20080415_018762_lHdSMr
> JIT - r9_20080415_1520
> GC - 20080415_AA)
> JCL - 20080412_01
> Reporter: Robert Muir
> Assignee: Uwe Schindler
> Fix For: 3.1.1, 3.2, 4.0
>
> Attachments: LUCENE-2989.patch
>
>
> [junit] Testcase: testEmptyArraySort(org.apache.lucene.util.TestCollectionUtil): Caused an ERROR
> [junit] CollectionUtil can only sort random access lists in-place.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-2989) TestCollectionUtil fails on IBM
JRE
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010714#comment-13010714 ]
Robert Muir commented on LUCENE-2989:
-------------------------------------
test passes!
> TestCollectionUtil fails on IBM JRE
> -----------------------------------
>
> Key: LUCENE-2989
> URL: https://issues.apache.org/jira/browse/LUCENE-2989
> Project: Lucene - Java
> Issue Type: Bug
> Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
> J9VM - 20080415_018762_lHdSMr
> JIT - r9_20080415_1520
> GC - 20080415_AA)
> JCL - 20080412_01
> Reporter: Robert Muir
> Assignee: Uwe Schindler
> Attachments: LUCENE-2989.patch
>
>
> [junit] Testcase: testEmptyArraySort(org.apache.lucene.util.TestCollectionUtil): Caused an ERROR
> [junit] CollectionUtil can only sort random access lists in-place.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-2989) TestCollectionUtil fails on IBM JRE
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-2989:
----------------------------------
Fix Version/s: 4.0
3.2
3.1.1
> TestCollectionUtil fails on IBM JRE
> -----------------------------------
>
> Key: LUCENE-2989
> URL: https://issues.apache.org/jira/browse/LUCENE-2989
> Project: Lucene - Java
> Issue Type: Bug
> Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
> J9VM - 20080415_018762_lHdSMr
> JIT - r9_20080415_1520
> GC - 20080415_AA)
> JCL - 20080412_01
> Reporter: Robert Muir
> Assignee: Uwe Schindler
> Fix For: 3.1.1, 3.2, 4.0
>
> Attachments: LUCENE-2989.patch
>
>
> [junit] Testcase: testEmptyArraySort(org.apache.lucene.util.TestCollectionUtil): Caused an ERROR
> [junit] CollectionUtil can only sort random access lists in-place.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org