Say I have a class like this:
class ParameterizedType<T>{
    public boolean equals(Object o){
        if (ParameterizedType<T>.class.isInstance(o)){
            ParameterizedType<T> other = (ParameterizedType<T>) o;
            return this.toString() == other.toString();
        }
        return false;
    }
}
I can get two different warnings from eclipse in such a method.
- ParameterizedType<T>.classis not syntactically correct
- (ParameterizedType<T>)o is an unchecked cast
How could one get around this?
 
     
    