Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359761 - [Help] Warnings for Generics showing in org.eclipse.help.base after switch to J2SE-1.5
Summary: [Help] Warnings for Generics showing in org.eclipse.help.base after switch to...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 trivial (vote)
Target Milestone: 3.8 M3   Edit
Assignee: Chris Goldthorpe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-03 15:51 EDT by Chris Goldthorpe CLA
Modified: 2011-11-01 13:55 EDT (History)
1 user (show)

See Also:


Attachments
List of warnings (88.23 KB, text/html)
2011-10-03 15:51 EDT, Chris Goldthorpe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Goldthorpe CLA 2011-10-03 15:51:07 EDT
A test build after committing the fix for Bug 338845 showed 226 warnings, mostly for use of raw types. See attachment.
Comment 1 Chris Goldthorpe CLA 2011-10-03 15:51:39 EDT
Created attachment 204471 [details]
List of warnings
Comment 2 Chris Goldthorpe CLA 2011-10-04 19:21:06 EDT
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
Comment 3 Chris Goldthorpe CLA 2011-10-05 17:18:26 EDT
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?
Comment 4 Chris Goldthorpe CLA 2011-10-07 12:40:24 EDT
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
Comment 5 Dani Megert CLA 2011-10-12 09:11:37 EDT
(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.
Comment 6 Chris Goldthorpe CLA 2011-10-13 17:02:34 EDT
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.