It's all about the answers!

Ask a question

3.0 SDK & generics


Jeff Care (1.0k3833) | asked Mar 12 '11, 10:51 a.m.
edited Aug 17 '12, 10:14 a.m.
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.

One answer



permanent link
John Vasta (2.6k15) | answered Mar 29 '11, 3:49 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
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.

Your answer


Register or 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.