I have the following code:
class ParametrizedObject<T> {...}
...
if (unknownObject instanceof ParametrizedObject) {
ParametrizedObject casted = (ParametrizedObject) unknownObject;
}
This code triggers a rawtypes warning. Is there a way / best practice to avoid it ?
Note: The class ParametrizedObject is part of a framework, I can't change it.