<Swing Dev> JDK 9 RFR of JDK-8043548: Fix raw and unchecked lint warnings in javax.swing.plaf.*
Joe Darcy
joe.darcy at oracle.com
Sat Jun 14 23:44:51 UTC 2014
Hello,
Please review the (unexpected large) fix for
JDK-8043548: Fix raw and unchecked lint warnings in javax.swing.plaf.*
http://cr.openjdk.java.net/~darcy/8043548.0/
In most of the javax.swing.multi.MultiFoo.java type, I replaced a raw
Vector with a Vector<ComponentUI> and was then able to delete a number
of now redundant casts. In some of the MultiFoo classes,
src/share/classes/javax/swing/plaf/multi/MultiPopupMenuUI.java
src/share/classes/javax/swing/plaf/multi/MultiTabbedPaneUI.java
src/share/classes/javax/swing/plaf/multi/MultiTextUI.java
src/share/classes/javax/swing/plaf/multi/MultiTreeUI.java
all the elements stored are actually a more specific type than
ComponentUI, say, PopupMenuUI. In those cases, I still used a
Vector<ComponentUI> rather than, say, a Vector<PopupMenuUI> to deal with
other aspects of the API. In particular, the MultiFoo classes have a method
ComponentUI[] getUIs() methods
which is computed over in MultiLookAndFeel. Generifying methods in
MultiLookAndFeel, particularly creatUIs, to work properly in the face of
generics would unfortunately be problematic.
A few classes in javax.swing had to be updated now to fully clear the
warnings in plaf; the rest of javax.swing will be handled in future work
(JDK-8043550: Fix raw and unchecked lint warnings in javax.swing.*).
Some additional changes were needed in sun/swing/BakedArrayList.java,
but that class should probably be removed from the platform.
I ran SwingSet2 with a build having these changes and nothing appeared
obviously wrong.
Thanks,
-Joe
More information about the swing-dev
mailing list