| Summary: | [Help] Warnings for Generics showing in org.eclipse.help.base after switch to J2SE-1.5 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Chris Goldthorpe <cgold> | ||||
| Component: | User Assistance | Assignee: | Chris Goldthorpe <cgold> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | trivial | ||||||
| Priority: | P3 | CC: | daniel_megert | ||||
| Version: | 3.8 | ||||||
| Target Milestone: | 3.8 M3 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Chris Goldthorpe
Created attachment 204471 [details]
List of warnings
I have fixed some of these with a commit with commit message: Part 1 of fix for Bug 359761 - [Help] Warnings for Generics showing in org.eclipse.help.base after switch to J2SE-1.5 Dani, I have a question about generics which show up in the API I have two cases of public functions in API classes which return a raw type, these are public Set getAllDocuments(String locale) public Set getContributingPlugins() In both cases the actual return type is a set containing only objects of class String. What is the right thing to do here, my preference would be to change the return type to Set<String> but would that be considered an API breaking change? I have eliminated another 100 or so warnings. There are still about 70 or so remaining but they may be harder to eliminate. I have not changed the signature of any API methods to add generic parameters. Part 2 of fix for Bug 359761 - [Help] Warnings for Generics showing in org.eclipse.help.base after switch to J2SE-1.5 (In reply to comment #3) > Dani, I have a question about generics which show up in the API > > I have two cases of public functions in API classes which return a raw type, > these are > > public Set getAllDocuments(String locale) > > public Set getContributingPlugins() > > In both cases the actual return type is a set containing only objects of class > String. > > What is the right thing to do here, my preference would be to change the return > type to Set<String> but would that be considered an API breaking change? Sorry Chris for the late response. You can safely add the type argument. This is binary compatible. For a more detailed explanation see http://wiki.eclipse.org/Evolving_Java-based_APIs_2#Turning_non-generic_types_and_methods_into_generic_ones. I added the type arguments. There are still some warnings left, most of which result from calling methods in org.eclipse.help ( which has is not yet converted to Java 5 ) and are not completely trivial to resolve. I will mark this bug as fixed. |