lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-2410) ConcurrentLRUCache can throw class cast exception
Date Mon, 07 Mar 2011 23:27:02 GMT

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

Dawid Weiss commented on SOLR-2410:
-----------------------------------

Yonik, try this and it should be clear why the above doesn't work:

{noformat}

public class Example
{
    public static class A<T> {
        @SuppressWarnings("unchecked") // it is here for a reason :)
        public T[] array = (T[]) new Object [1]; 
    }
    
    public static void main(String [] args)
    {
        A<Integer> clazzA = new A<Integer>();
        System.out.println(clazzA.array[0]);
    }
}
{noformat}

> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message