It's all about the answers!

Ask a question

3.0 SDK & generics

Jeff Care (1.0k3733) | 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 many of the methods in this class return collections but all with the exception of one return raw collections;, 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.
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 for a bit of discussion of this.

Your answer

Register or to post your answer.