--- old/src/share/classes/javax/swing/JSlider.java 2014-08-07 14:51:23.000000000 -0700 +++ new/src/share/classes/javax/swing/JSlider.java 2014-08-07 14:51:23.000000000 -0700 @@ -138,7 +138,7 @@ /** * {@code Dictionary} of what labels to draw at which values */ - private Dictionary labelTable; + private Dictionary labelTable; /** @@ -773,7 +773,7 @@ } // Check that there is a label with such image - Enumeration elements = labelTable.elements(); + Enumeration elements = labelTable.elements(); while (elements.hasMoreElements()) { JComponent component = elements.nextElement(); @@ -797,7 +797,7 @@ * @return the Dictionary containing labels and * where to draw them */ - public Dictionary getLabelTable() { + public Dictionary getLabelTable() { /* if ( labelTable == null && getMajorTickSpacing() > 0 ) { setLabelTable( createStandardLabels( getMajorTickSpacing() ) ); @@ -830,8 +830,8 @@ * attribute: visualUpdate true * description: Specifies what labels will be drawn for any given value. */ - public void setLabelTable( Dictionary labels ) { - Dictionary oldTable = labelTable; + public void setLabelTable( Dictionary labels ) { + Dictionary oldTable = labelTable; labelTable = labels; updateLabelUIs(); firePropertyChange("labelTable", oldTable, labelTable ); @@ -852,7 +852,7 @@ * @see JComponent#updateUI */ protected void updateLabelUIs() { - Dictionary labelTable = getLabelTable(); + Dictionary labelTable = getLabelTable(); if (labelTable == null) { return; @@ -866,9 +866,9 @@ } private void updateLabelSizes() { - Dictionary labelTable = getLabelTable(); + Dictionary labelTable = getLabelTable(); if (labelTable != null) { - Enumeration labels = labelTable.elements(); + Enumeration labels = labelTable.elements(); while (labels.hasMoreElements()) { JComponent component = labels.nextElement(); component.setSize(component.getPreferredSize()); @@ -1017,7 +1017,7 @@ SmartHashtable table = new SmartHashtable( increment, start ); - Dictionary labelTable = getLabelTable(); + Dictionary labelTable = getLabelTable(); if (labelTable != null && (labelTable instanceof PropertyChangeListener)) { removePropertyChangeListener((PropertyChangeListener) labelTable); --- old/src/share/classes/javax/swing/JTable.java 2014-08-07 14:51:24.000000000 -0700 +++ new/src/share/classes/javax/swing/JTable.java 2014-08-07 14:51:24.000000000 -0700 @@ -669,7 +669,8 @@ * @param rowData the data for the new table * @param columnNames names of each column */ - public JTable(Vector> rowData, Vector columnNames) { + @SuppressWarnings("rawtypes") + public JTable(Vector rowData, Vector columnNames) { this(new DefaultTableModel(rowData, columnNames)); } --- old/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java 2014-08-07 14:51:24.000000000 -0700 +++ new/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java 2014-08-07 14:51:24.000000000 -0700 @@ -397,10 +397,10 @@ protected boolean labelsHaveSameBaselines() { if (!checkedLabelBaselines) { checkedLabelBaselines = true; - Dictionary dictionary = slider.getLabelTable(); + Dictionary dictionary = slider.getLabelTable(); if (dictionary != null) { sameLabelBaselines = true; - Enumeration elements = dictionary.elements(); + Enumeration elements = dictionary.elements(); int baseline = -1; while (elements.hasMoreElements()) { JComponent label = elements.nextElement(); @@ -753,7 +753,7 @@ } protected int getWidthOfWidestLabel() { - Dictionary dictionary = slider.getLabelTable(); + Dictionary dictionary = slider.getLabelTable(); int widest = 0; if ( dictionary != null ) { Enumeration keys = dictionary.keys(); @@ -766,7 +766,7 @@ } protected int getHeightOfTallestLabel() { - Dictionary dictionary = slider.getLabelTable(); + Dictionary dictionary = slider.getLabelTable(); int tallest = 0; if ( dictionary != null ) { Enumeration keys = dictionary.keys(); @@ -871,7 +871,7 @@ * @since 1.6 */ protected Integer getLowestValue() { - Dictionary dictionary = slider.getLabelTable(); + Dictionary dictionary = slider.getLabelTable(); if (dictionary == null) { return null; @@ -1121,7 +1121,7 @@ public void paintLabels( Graphics g ) { Rectangle labelBounds = labelRect; - Dictionary dictionary = slider.getLabelTable(); + Dictionary dictionary = slider.getLabelTable(); if ( dictionary != null ) { Enumeration keys = dictionary.keys(); int minValue = slider.getMinimum(); --- old/src/share/classes/javax/swing/plaf/synth/SynthSliderUI.java 2014-08-07 14:51:25.000000000 -0700 +++ new/src/share/classes/javax/swing/plaf/synth/SynthSliderUI.java 2014-08-07 14:51:25.000000000 -0700 @@ -392,7 +392,7 @@ trackRect.x = insetCache.left; trackRect.width = contentRect.width; - Dictionary dictionary = slider.getLabelTable(); + Dictionary dictionary = slider.getLabelTable(); if (dictionary != null) { int minValue = slider.getMinimum(); int maxValue = slider.getMaximum(); --- old/src/share/classes/javax/swing/table/DefaultTableModel.java 2014-08-07 14:51:26.000000000 -0700 +++ new/src/share/classes/javax/swing/table/DefaultTableModel.java 2014-08-07 14:51:26.000000000 -0700 @@ -70,10 +70,18 @@ * The Vector of Vectors of * Object values. */ - protected Vector> dataVector; + @SuppressWarnings("rawtypes") + protected Vector dataVector; /** The Vector of column identifiers. */ - protected Vector columnIdentifiers; + @SuppressWarnings("rawtypes") + protected Vector columnIdentifiers; + // Unfortunately, for greater source compatibility the inner-most + // Vector in the two fields above is being left raw. The Vector is + // read as well as written so using Vector is not suitable and + // using Vector (without adding copying of input Vectors), + // would disallow existing code that used, say, a Vector + // as an input parameter. // // Constructors @@ -121,7 +129,7 @@ * @see #setDataVector * @see #setValueAt */ - public DefaultTableModel(Vector columnNames, int rowCount) { + public DefaultTableModel(Vector columnNames, int rowCount) { setDataVector(newVector(rowCount), columnNames); } @@ -156,7 +164,8 @@ * @see #getDataVector * @see #setDataVector */ - public DefaultTableModel(Vector> data, Vector columnNames) { + @SuppressWarnings("rawtypes") + public DefaultTableModel(Vector data, Vector columnNames) { setDataVector(data, columnNames); } @@ -191,7 +200,8 @@ * @see #newRowsAdded * @see #setDataVector */ - public Vector> getDataVector() { + @SuppressWarnings("rawtypes") + public Vector getDataVector() { return dataVector; } @@ -219,8 +229,9 @@ * @param columnIdentifiers the names of the columns * @see #getDataVector */ - public void setDataVector(Vector> dataVector, - Vector columnIdentifiers) { + @SuppressWarnings("rawtypes") + public void setDataVector(Vector dataVector, + Vector columnIdentifiers) { this.dataVector = nonNullVector(dataVector); this.columnIdentifiers = nonNullVector(columnIdentifiers); justifyRows(0, getRowCount()); @@ -267,7 +278,7 @@ if (dataVector.elementAt(i) == null) { dataVector.setElementAt(new Vector<>(), i); } - ((Vector)dataVector.elementAt(i)).setSize(getColumnCount()); + dataVector.elementAt(i).setSize(getColumnCount()); } } @@ -374,7 +385,7 @@ * @param rowData optional data of the row being added * @exception ArrayIndexOutOfBoundsException if the row was invalid */ - public void insertRow(int row, Vector rowData) { + public void insertRow(int row, Vector rowData) { dataVector.insertElementAt(rowData, row); justifyRows(row, row+1); fireTableRowsInserted(row, row); @@ -484,7 +495,7 @@ * to zero columns * @see #setNumRows */ - public void setColumnIdentifiers(Vector columnIdentifiers) { + public void setColumnIdentifiers(Vector columnIdentifiers) { setDataVector(dataVector, columnIdentifiers); } @@ -550,6 +561,7 @@ * @param columnName the identifier of the column being added * @param columnData optional data of the column being added */ + @SuppressWarnings("unchecked") // Adding element to raw columnIdentifiers public void addColumn(Object columnName, Vector columnData) { columnIdentifiers.addElement(columnName); if (columnData != null) { @@ -652,8 +664,7 @@ * column was given */ public Object getValueAt(int row, int column) { - Vector rowVector = dataVector.elementAt(row); - return rowVector.elementAt(column); + return dataVector.elementAt(row).elementAt(column); } /** @@ -667,9 +678,9 @@ * @exception ArrayIndexOutOfBoundsException if an invalid row or * column was given */ + @SuppressWarnings("unchecked") public void setValueAt(Object aValue, int row, int column) { - Vector rowVector = dataVector.elementAt(row); - rowVector.setElementAt(aValue, column); + dataVector.elementAt(row).setElementAt(aValue, column); fireTableCellUpdated(row, column); } @@ -700,11 +711,13 @@ * @return the new vector of vectors; if anArray is * null, returns null */ - protected static Vector> convertToVector(Object[][] anArray) { + @SuppressWarnings("rawtypes") + protected static Vector convertToVector(Object[][] anArray) { if (anArray == null) { return null; } - Vector> v = new Vector<>(anArray.length); + @SuppressWarnings("rawtypes") + Vector v = new Vector<>(anArray.length); for (Object[] o : anArray) { v.addElement(convertToVector(o)); } --- old/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java 2014-08-07 14:51:26.000000000 -0700 +++ new/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java 2014-08-07 14:51:26.000000000 -0700 @@ -1308,7 +1308,7 @@ } private final class PreorderEnumeration implements Enumeration { - private final Stack> stack = new Stack<>(); + private final Stack> stack = new Stack<>(); public PreorderEnumeration(TreeNode rootNode) { super(); @@ -1322,10 +1322,9 @@ } public TreeNode nextElement() { - Enumeration enumer = stack.peek(); + Enumeration enumer = stack.peek(); TreeNode node = enumer.nextElement(); - @SuppressWarnings("unchecked") - Enumeration children = node.children(); + Enumeration children = node.children(); if (!enumer.hasMoreElements()) { stack.pop(); @@ -1342,7 +1341,7 @@ final class PostorderEnumeration implements Enumeration { protected TreeNode root; - protected Enumeration children; + protected Enumeration children; protected Enumeration subtree; public PostorderEnumeration(TreeNode rootNode) { --- old/src/share/classes/javax/swing/tree/TreeNode.java 2014-08-07 14:51:27.000000000 -0700 +++ new/src/share/classes/javax/swing/tree/TreeNode.java 2014-08-07 14:51:27.000000000 -0700 @@ -99,5 +99,5 @@ * * @return the children of the receiver as an {@code Enumeration} */ - Enumeration children(); + Enumeration children(); } --- old/src/share/classes/sun/tools/jconsole/inspector/TableSorter.java 2014-08-07 14:51:28.000000000 -0700 +++ new/src/share/classes/sun/tools/jconsole/inspector/TableSorter.java 2014-08-07 14:51:27.000000000 -0700 @@ -146,7 +146,7 @@ // update row heights in XMBeanAttributes (required by expandable cells) if (attrs != null) { for (int i = 0; i < getRowCount(); i++) { - Vector data = (Vector) dataVector.elementAt(i); + Vector data = dataVector.elementAt(i); attrs.updateRowHeight(data.elementAt(1), i); } } @@ -217,6 +217,7 @@ } } + @SuppressWarnings("unchecked") private Vector getRow(int row) { return dataVector.elementAt(row); }