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. |
One answer
![]()
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
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.