Re: Method chaining with generics
- From: Raymond DeCampo <nospam@xxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 21:46:34 GMT
Oliver Wong wrote:
"Hemal Pandya" <hemalpandya@xxxxxxxxx> wrote in message news:1125423582.687861.85530@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Actually I don't quite understand why cast from List to List<Object> is a warning at all.
The warning says that the runtime environment can't actually tell whether the cast succeeds or not (due to type erasure), so basically, the code that you wrote down is not actually hapenning. I think that warrants a warning.
I think your point is valid when dealing with List and List<Foo>, but Hemal was specifically referring to List<Object>. Is there any case when casting a List to List<Object> would cause a problem?
Ray
-- XML is the programmer's duct tape. .
- Follow-Ups:
- Re: Method chaining with generics
- From: Chris Uppal
- Re: Method chaining with generics
- From: Hemal Pandya
- Re: Method chaining with generics
- References:
- Method chaining with generics
- From: iksrazal
- Re: Method chaining with generics
- From: Hemal Pandya
- Re: Method chaining with generics
- From: Oliver Wong
- Method chaining with generics
- Prev by Date: Re: Commenting in Java
- Next by Date: Re: Certification training in greater NYC area?
- Previous by thread: Re: Method chaining with generics
- Next by thread: Re: Method chaining with generics
- Index(es):
Relevant Pages
|
|