Why is there no warning for the code below?
public void some(Object a){ Map<?, ?> map = **(Map<?,?>)a**;
I expected the RHS to have an unverified warning.
So far, this code has a warning:
public void some(Object a){ Map<Object, Object> map = **(Map<Object,Object>)a**;
In addition, there are no warnings for the following case:
String str = (String) request.getAttribute("asd")
Does this mean that unverified warnings appeared with generics? Were there no such warnings before the introduction of generics in Java?
java generics
pinkpanther
source share