In my current project, I have classes which are modeled like the following. At some point, a method like
getReturnTypeForGetId() is called on classes
B. Calling the method with
Integer as expected, but
What am I missing here? Am I getting bitten by some heinous erasure thing, or am I just missing out on some sort of generic context-clobbering?
EDIT: Adding an over-ridden
getId() method to
B fixes the problem, but I would still like to understand what I am running into.
I've also asked this question on stackoverflow.