Problems with "type swallowing" in sub-interfaces of ListModel caused by adding Generics in Java 7 (x-post from swing-dev)

steve mcjones steve.mcjones at googlemail.com
Mon Jan 17 07:03:16 PST 2011


Hi,

There was an earlier article from Joe Darcy about efforts to update the JDK
codebase to use new features of the language. Ok, Generics aren't _that_ new
but some new classes/interfaces in Swing finally got generified in Java 7.

But is there a reason why javax.swing.ListModel was generified, but not its
sub-interfaces like ComboBoxModel?

This "type swallowing" actually caused non-fixable compiler errors in Scala,
where the scala-swing package can't be built anymore against the Java 7 code
base.

The relevant bug ticket in Scala's trac is
https://lampsvn.epfl.ch/trac/scala/ticket/3634


 <https://lampsvn.epfl.ch/trac/scala/ticket/3634>

Maybe Oracle has already some bug about it? (Didn't bother to look since
Oracle started to make more and more bug reports not visible anymore.)
Are there any ongoing efforts to add Generics to the remaining classes of
Swing? Swing seems to be one of the last places where Generics are still
missing in a few places ...


Thanks and bye!

Steve

(Crossposting this from swing-dev. It seems that swing-dev is more or less
used for swing related change notifications and less for asking for advice.)


More information about the jdk7-dev mailing list