Community
Participate
Working Groups
Eclipse version 3.1.0, build 200411230838 Given the following code below plus Java 5.0 compiler option: "Unsafe type operation involving raw types" - set to "Warning" ===================== interface F<A,B> { B something(A x); } public class Test1 { public static void main(String[] args) { F<String, Integer> res = new F<String, Integer>() { public Integer something(String arg0) { // "Integer" is highlighted on the previous line as a warning. return new Integer(0); } }; Integer x = res.something("demo"); } } ================= and the warning message is: "Type safety: The return type Integer of the method something(String) of type new F<String,Integer>(){} needs unchecked conversion to conform to the return type B of inherited method" This shouldn't need a conversion. This also appears if F is declared as an abstract class as well.
*** This bug has been marked as a duplicate of 79687 ***
As of the I20050104-1300 build, it no longer gives me the warning. Thanks!