[
https://issues.apache.org/jira/browse/SOLR-2410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003668#comment-13003668
]
Yonik Seeley commented on SOLR-2410:
------------------------------------
Here's the smallest version I could reproduce the issue with.
{code}
class CacheEntry<K,V> {
}
class PQueue<K,V> extends PriorityQueue<CacheEntry<K,V>> {
public static void main(String[] args) {
new PQueue<String,String>().tst();
}
PQueue() {
super.initialize(1);
}
@Override
protected boolean lessThan(CacheEntry<K,V> a, CacheEntry<K,V> b) {
return true;
}
public CacheEntry<K,V> tst() {
return heap[1];
}
}
{code}
I just cut-n-pasted the code into BasicFunctionalityTest, run main() from my
IDE, and presto:
{code}
Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object;
cannot be cast to [Lorg.apache.solr.CacheEntry;
at org.apache.solr.PQueue.tst(BasicFunctionalityTest.java:81)
at org.apache.solr.PQueue.main(BasicFunctionalityTest.java:68)
{code}
> ConcurrentLRUCache can throw class cast exception
> -------------------------------------------------
>
> Key: SOLR-2410
> URL: https://issues.apache.org/jira/browse/SOLR-2410
> Project: Solr
> Issue Type: Bug
> Affects Versions: 4.0
> Reporter: Yonik Seeley
> Fix For: 4.0
>
>
> ConcurrentLRUCache throws a class cast exception.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]