Yet another Java Generics unchecked cast question coming up:
We have something like the following:
public abstract class A<T extends A> {
public final T doSomething() {
return (T)this; //unchecked cast A<T> to T
}
}
So, is this unchecked cast something we can surpress or is there really a case where this can fail?