Community
Participate
Working Groups
Eclipse 3.1 200411101000 does not warn about the following unchecked cast ====== package test.cheetah; import java.util.List; public class Test<T> { List<T> list; void add(Object abs) { list.add((T) abs); // unchecked cast } } ======
Added support to detect unsafe cast to type variable. Added regression test: GenericTypeTest#test438. Also tuned unsafe cast message to read: 1. WARNING in d:\...\src\X.java (at line 6) list.add((T) abs); // unchecked cast ^^^^^^^ Type safety: The cast from Object to T will actually check against the erased type Object at runtime
Fix will be released once M4 is declared
*** Bug 78810 has been marked as a duplicate of this bug. ***
*** Bug 82288 has been marked as a duplicate of this bug. ***
*** Bug 83215 has been marked as a duplicate of this bug. ***
Verified in I20050214