Community
Participate
Working Groups
Entering the following code gives a warning icon in the LHS margin in 3.1M5: interface Callable<T> { public enum Result { GOOD, BAD }; public Result call(T arg); } public class StaticExample implements Callable<String> { public Result call(String arg) { return Result.GOOD; } // Warning line } The warning appears for the token "Result" on the line indicated. It reads "Type safety: The return type Callable<String>.Result for call(String) from the type StaticExample needs unchecked conversion to conform to Callable.Result from the type Callable<T>." However compiling this with "javac -Xlint StaticExample.java" gives no warnings.
Reproduced. Indeed the warning makes no sense here.
Added GenericTypeTest#test518 *** This bug has been marked as a duplicate of 84944 ***