| Author |
Generics
|
Nikhil Jain
Ranch Hand
Joined: May 15, 2005
Posts: 383
|
|
Eclipse gives a warning for the above code. Type safety: The cast from Object to HashMap<String,Object> is actually checking against the erased type HashMap How will we return something of object type in generics without getting the warning ...
|
SCJP 1.4, SCWCD 1.4, SCBCD 1.5
|
 |
Kaydell Leavitt
Ranch Hand
Joined: Nov 18, 2006
Posts: 682
|
|
|
I'm not sure why, but I believe that you need to replace <String, Object> with <String, ?>
|
 |
 |
|
|
subject: Generics
|
|
|