Community
Participate
Working Groups
3.4.0 Following code should yield an unchecked cast from List<Object> to Throwable. import java.util.Collections; public class X { X() { Throwable t = (Throwable) Collections.emptyList(); } }
import java.util.*; public class X { X(List rawList, List<?> unboundList) { Throwable t0 = (Throwable) Collections.emptyList(); // unchecked Throwable t1 = (Throwable) rawList; // no warn Throwable t2 = (Throwable) unboundList; // unchecked } }
Created attachment 117437 [details] Proposed patch
Added GenericTypeTest#test1405
Released for 3.5M4. Fixed
After second thought, I don't think this one should be flagged as unchecked any longer. Will back out the change.
Backed out the change, and added more unchecked warning tests: GenericTypeTest#1408-1415
Verified for 3.5M4