Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

3.0 SDK & generics

I've been working with the RTC 3.0 SDK and I've noticed that it's terribly inconsistent with regard to using Java generics.

For example, consider com.ibm.team.scm.client.IConfiguration: many of the methods in this class return collections but all with the exception of one return raw collections; com.ibm.team.scm.client.IConfiguration.fetchAncestorsByName(String, IProgressMonitor) is the exception.

Can anyone explain this inconsistency? It's not a show-stopping issue but my code is now littered with casts and @SuppressWarnings ("unchecked") and I find this very annoying.

0 votes



One answer

Permanent link
I think the situation was that a lot of code got written before a generics-capable JDK started getting used. It would have been a very large effort to convert all existing interfaces, and would have broken API capability for existing consumers, so the older code was not updated.

See https://jazz.net/wiki/bin/view/Main/Java5AndJazzAPIs for a bit of discussion of this.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,016

Question asked: Mar 12 '11, 10:51 a.m.

Question was seen: 5,690 times

Last updated: Aug 17 '12, 10:14 a.m.

Confirmation Cancel Confirm