"scott.stark@jboss.org" wrote:
I don't understand why you don't value.getClass() is not the same ParameterizedType that you get from the field/method getGenericType()/getGenericReturnType().
public void doSomething(HashMap<String, String> map) { HashMap erased = (HashMap) map; // erased.getClass() == plain class HashMap<String, String> unerased = erased; // unerased.getClass() == parameterized type }
assert unerased.getClass() == erased.getClass();
Ok, I see.