Community
Participate
Working Groups
This code gives an erroneous type safety error with 3.1M4 % cat Test.java import java.util.concurrent.Callable; public class Test { /** A runnable that increments actual call count. **/ private static final Callable<Integer> toCall = new Callable<Integer>() { public Integer call() { return new Integer(5); } }; } I get this warning Type safety: The return type Integer of the method call() of type new Callable<Integer>(){} needs unchecked conversion to conform to the return type V of inherited method Of course there should be no warning/error.
Dup. Kent - you should add this test case to regression suite *** This bug has been marked as a duplicate of 81618 ***