[concurrency-interest] LinkedBlockingQueue does not throw ClassCastException
szabolcs.ferenczi at gmail.com
Mon Apr 16 18:35:07 EDT 2007
On 17/04/07, David Holmes <dcholmes at optusnet.com.au> wrote:
> And you'll get the ClassCastException when you attempt to extract the String
> as an Integer.
> The line in Collection.add that says "... others will impose restrictions on
> the type of elements that may be added." is not referring to Generics, but
> specific concrete implementations that might impose their own direct
> instanceof checks eg pre-generic ListInteger, SetString etc.
Thanks a lot. So what is your suggestion for the test exactly?
More information about the Concurrency-interest