Project: JDT
Bug 26288 use supertype - doesn't get all possible cases [refactoring]
Reported: 2002-11-14 08:51:19 | Status: resolved fixed

I-20021113 w2k: Use supertype A instead of B: The first example doesn't touch the unnecessary cast to B, while the second example works as expected. class Test1 { class A {} class B extends A {} void foo() { B b= null; A a= (B) b; String s= a.toString(); } } class Test2 { class A {} class B extends A {} void foo() { B b= null; String s= ((B) b).toString(); } }

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/UseSupertypeWherePossibleUtil.java