Community
Participate
Working Groups
Here are some warnings expected: class TriGClass <R,U,V> { private U u; private V v; public TriGClass(U u,V v) { this.u= u; this.v= v; } public R getU() { return (R)u; } // Warning public R getV() { return (R)v; } // Warning }
Cloesly related example: class GCT<T> { Object o; public T getT() { return (T)o; } // Warning }
I am getting warnings for the 3 of them: ---------- 1. WARNING in d:\X.java (at line 5) public R getU() { return (R)u; } // Warning ^^^^ Unnecessary cast from U to R ---------- ---------- 2. WARNING in d:\src\X.java (at line 6) public R getV() { return (R)v; } // Warning ^^^^ Unnecessary cast from V to R ---------- ---------- 3. WARNING in d:\src\X.java (at line 11) public T getT() { return (T)o; } // Warning ^^^^ Unnecessary cast from Object to T ----------
Fixed. Test case added: GenericTypeTest#test381()
Ooops, test case is #test386()
These warnings were already raised with 3.1 M2. So, it's sound more like a WORKSFORME than a FIXED bug... Reopen to change status.
Open date is post 3.1 M2, so bug status must be WORKSFORME and should not appear in JDT/Core buildnotes...