--- old/src/share/classes/javax/swing/JSlider.java 2014-08-07 11:49:42.000000000 -0700 +++ new/src/share/classes/javax/swing/JSlider.java 2014-08-07 11:49:42.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 11:49:43.000000000 -0700 +++ new/src/share/classes/javax/swing/JTable.java 2014-08-07 11:49:43.000000000 -0700 @@ -669,7 +669,7 @@ * @param rowData the data for the new table * @param columnNames names of each column */ - public JTable(Vector> rowData, Vector columnNames) { + public JTable(Vector> rowData, Vector columnNames) { this(new DefaultTableModel(rowData, columnNames)); } --- old/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java 2014-08-07 11:49:44.000000000 -0700 +++ new/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java 2014-08-07 11:49:43.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 11:49:45.000000000 -0700 +++ new/src/share/classes/javax/swing/plaf/synth/SynthSliderUI.java 2014-08-07 11:49:44.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 11:49:45.000000000 -0700 +++ new/src/share/classes/javax/swing/table/DefaultTableModel.java 2014-08-07 11:49:45.000000000 -0700 @@ -73,7 +73,13 @@ protected Vector> dataVector; /** The Vector of column identifiers. */ - protected Vector columnIdentifiers; + @SuppressWarnings("rawtypes") + protected Vector columnIdentifiers; + // Unfortunately, for greater source compatibility this Vector 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 @@ -156,7 +162,7 @@ * @see #getDataVector * @see #setDataVector */ - public DefaultTableModel(Vector> data, Vector columnNames) { + public DefaultTableModel(Vector> data, Vector columnNames) { setDataVector(data, columnNames); } @@ -220,7 +226,7 @@ * @see #getDataVector */ public void setDataVector(Vector> dataVector, - Vector columnIdentifiers) { + Vector columnIdentifiers) { this.dataVector = nonNullVector(dataVector); this.columnIdentifiers = nonNullVector(columnIdentifiers); justifyRows(0, getRowCount()); @@ -484,7 +490,7 @@ * to zero columns * @see #setNumRows */ - public void setColumnIdentifiers(Vector columnIdentifiers) { + public void setColumnIdentifiers(Vector columnIdentifiers) { setDataVector(dataVector, columnIdentifiers); } @@ -550,6 +556,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 +659,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); } /** @@ -668,8 +674,7 @@ * column was given */ 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); } --- old/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java 2014-08-07 11:49:47.000000000 -0700 +++ new/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java 2014-08-07 11:49:47.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 11:49:51.000000000 -0700 +++ new/src/share/classes/javax/swing/tree/TreeNode.java 2014-08-07 11:49:50.000000000 -0700 @@ -99,5 +99,5 @@ * * @return the children of the receiver as an {@code Enumeration} */ - Enumeration children(); + Enumeration children(); }