Community
Participate
Working Groups
Build Identifier: Building a GWT 2.0.4 project. I have the following declarations: public void getAvailableKeySpaces (String species, AsyncCallback<List<KeyspaceInfo>> callback); class GetKeySpacesImpl implements AsyncCallback<List<KeyspaceInfo>> .... gDataRetriever.getAvailableKeySpaces (species, new GetKeySpacesImpl (...)); Eclipse gives me the following warning: type safety: the expression of type GetKeySpacesImpl needs unchecked conversion to conform to AsyncCallback<List<KeyspaceInfo>> It does this for each of 10+ difference classes that have been declared to handle the different AsyncCallbacks. However, if I declare ANY ONE of those classes to be generic: class GetSpeciesImpl<E> implements AsyncCallback<List<String>> , and then uselessly parametrize its call: gDataRetriever.getAvailableSpecies (new GetSpeciesImpl<List<String>> (this)); ALL the Warnings disappear. Reproducible: Always Steps to Reproduce: 1. Declare a class that extends a particular parametrization for a typed interface 2. Try to use that class. Get a warning. 3. Fix the Warning with Suppress Warnings, get a Warning that the Suppress Warnings isn't needed.
Sorry. Build Identifier is 20100617-1415
Srikanth, please follow up! Thanks!
(In reply to comment #0) > Build Identifier: > > Building a GWT 2.0.4 project. I have the following declarations: Please attach a test case: I have tried the following and don't see any warnings: import java.util.List; class DataRetriver { public void getAvailableKeySpaces (String species, AsyncCallback<List<KeyspaceInfo>> callback) {} } interface AsyncCallback<T> {} class KeyspaceInfo {} class GetKeySpacesImpl implements AsyncCallback<List<KeyspaceInfo>> {} public class Bug { public static void main(String[] args) { new DataRetriver().getAvailableKeySpaces ("species", new GetKeySpacesImpl ()); } } We love a defect reporter who provides a test case that will fit in a single editor (where possible) and their defects get priority. :)
You may also want to compile your program with javac and see if you get any warnings. Use -Xlint:unchecked option to javac.
As things stand, no progress can be made. There are no known issues in this area. I plan to close this WORKSFORME. If you manage to dig up a case you can reopen it then.
Please reopen if a test case becomes available. As it is no progress can be made.
Verified for 3.7M2 using I20100914-0100