src/share/classes/javax/swing/JComboBox.java

Print this page

        

@@ -1098,11 +1098,11 @@
             }
             firePropertyChange("action", oldValue, action);
         }
     }
 
-    private boolean isListener(Class c, ActionListener a) {
+    private boolean isListener(Class<?> c, ActionListener a) {
         boolean isListener = false;
         Object[] listeners = listenerList.getListenerList();
         for (int i = listeners.length-2; i>=0; i-=2) {
             if (listeners[i]==c && listeners[i+1]==a) {
                     isListener=true;

@@ -1528,15 +1528,15 @@
          * @param aModel a ComboBoxModel -- the component's data model, containing
          *               the list of selectable items
          * @return an int equal to the selected row, where 0 is the
          *         first item and -1 is none.
          */
-        int selectionForKey(char aKey,ComboBoxModel aModel);
+        int selectionForKey(char aKey,ComboBoxModel<?> aModel);
     }
 
     class DefaultKeySelectionManager implements KeySelectionManager, Serializable {
-        public int selectionForKey(char aKey,ComboBoxModel aModel) {
+        public int selectionForKey(char aKey,ComboBoxModel<?> aModel) {
             int i,c;
             int currentSelection = -1;
             Object selectedItem = aModel.getSelectedItem();
             String v;
             String pattern;

@@ -1654,11 +1654,11 @@
     @SuppressWarnings("serial") // Same-version serialization only
     protected class AccessibleJComboBox extends AccessibleJComponent
     implements AccessibleAction, AccessibleSelection {
 
 
-        private JList popupList; // combo box popup list
+        private JList<?> popupList; // combo box popup list
         private Accessible previousSelectedAccessible = null;
 
         /**
          * Returns an AccessibleJComboBox instance
          * @since 1.4

@@ -1978,11 +1978,12 @@
                 JComboBox.this.getUI().getAccessibleChild(JComboBox.this, 0);
             if (a != null &&
                 a instanceof javax.swing.plaf.basic.ComboPopup) {
 
                 // get the popup list
-                JList list = ((javax.swing.plaf.basic.ComboPopup)a).getList();
+                @SuppressWarnings("unchecked")
+                JList<?> list = ((javax.swing.plaf.basic.ComboPopup)a).getList();
 
                 // return the i-th selection in the popup list
                 AccessibleContext ac = list.getAccessibleContext();
                 if (ac != null) {
                     AccessibleSelection as = ac.getAccessibleSelection();