changeset 9595:be7905e8184e

8033908: Fix serial lint warnings in com.sun.java.swing.plaf Reviewed-by: serb, alanb
author darcy
date Mon, 10 Mar 2014 13:54:25 -0700
parents b1a06d18a23f
children 5393784b8a6f
files src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java src/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java src/share/classes/com/sun/java/swing/plaf/motif/MotifComboBoxUI.java src/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java src/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopPaneUI.java src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java src/share/classes/com/sun/java/swing/plaf/motif/MotifIconFactory.java src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameUI.java src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java src/share/classes/com/sun/java/swing/plaf/motif/MotifOptionPaneUI.java src/share/classes/com/sun/java/swing/plaf/motif/MotifRadioButtonMenuItemUI.java src/share/classes/com/sun/java/swing/plaf/motif/MotifScrollBarButton.java src/share/classes/com/sun/java/swing/plaf/motif/MotifSplitPaneDivider.java src/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java src/share/classes/com/sun/java/swing/plaf/motif/MotifTreeCellRenderer.java src/share/classes/com/sun/java/swing/plaf/motif/MotifTreeUI.java src/share/classes/com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsBorders.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsClassicLookAndFeel.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameUI.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsMenuBarUI.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsPopupWindow.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsScrollBarUI.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsSplitPaneDivider.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsTableHeaderUI.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsTextFieldUI.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsTextUI.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsTreeUI.java src/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java
diffstat 40 files changed, 190 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,7 @@
  *
  * @author Scott Violet
  */
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 class GTKColorChooserPanel extends AbstractColorChooserPanel implements
               ChangeListener {
     private static final float PI_3 = (float)(Math.PI / 3);
@@ -535,6 +536,7 @@
     /**
      * Class responsible for rendering a color wheel and color triangle.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class ColorTriangle extends JPanel {
         /**
          * Cached image of the wheel.
@@ -1229,6 +1231,7 @@
     /**
      * Action class used for colors.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private static class ColorAction extends AbstractAction {
         private int type;
 
@@ -1294,7 +1297,7 @@
         }
     }
 
-
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class OpaqueLabel extends JLabel {
         public boolean isOpaque() {
             return true;
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -549,6 +549,7 @@
 
         fc.add(interior, BorderLayout.CENTER);
 
+        @SuppressWarnings("serial") // anonymous class
         JPanel comboBoxPanel = new JPanel(new FlowLayout(FlowLayout.CENTER,
                                                          0, 0) {
             public void layoutContainer(Container target) {
@@ -660,26 +661,30 @@
         if (currentDirectory != null) {
             curDirName = currentDirectory.getPath();
         }
-        pathField = new JLabel(curDirName) {
+        @SuppressWarnings("serial") // anonymous class
+        JLabel tmp = new JLabel(curDirName) {
             public Dimension getMaximumSize() {
                 Dimension d = super.getMaximumSize();
                 d.height = getPreferredSize().height;
                 return d;
             }
         };
+        pathField =  tmp;
         pathField.setName("GTKFileChooser.pathField");
         align(pathField);
         pathFieldPanel.add(pathField);
         interior.add(pathFieldPanel);
 
         // add the fileName field
-        fileNameTextField = new JTextField() {
+        @SuppressWarnings("serial") // anonymous class
+        JTextField tmp2 = new JTextField() {
             public Dimension getMaximumSize() {
                 Dimension d = super.getMaximumSize();
                 d.height = getPreferredSize().height;
                 return d;
             }
         };
+        fileNameTextField = tmp2;
 
         pathFieldLabel.setLabelFor(fileNameTextField);
 
@@ -905,6 +910,7 @@
         return approveSelectionAction;
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class GTKDirectoryModel extends BasicDirectoryModel {
         FileSystemView fsv;
         private Comparator<File> fileComparator = new Comparator<File>() {
@@ -923,6 +929,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class GTKDirectoryListModel extends AbstractListModel implements ListDataListener {
         File curDir;
         public GTKDirectoryListModel() {
@@ -966,6 +973,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class GTKFileListModel extends AbstractListModel implements ListDataListener {
         public GTKFileListModel() {
             getModel().addListDataListener(this);
@@ -1009,6 +1017,7 @@
     }
 
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class FileCellRenderer extends DefaultListCellRenderer  {
         public Component getListCellRendererComponent(JList list, Object value, int index,
                                                       boolean isSelected, boolean cellHasFocus) {
@@ -1022,6 +1031,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class DirectoryCellRenderer extends DefaultListCellRenderer  {
         public Component getListCellRendererComponent(JList list, Object value, int index,
                                                       boolean isSelected, boolean cellHasFocus) {
@@ -1084,6 +1094,7 @@
     /**
      * Data model for a type-face selection combo-box.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class DirectoryComboBoxModel extends AbstractListModel implements ComboBoxModel {
         Vector<File> directories = new Vector<File>();
         File selectedDirectory = null;
@@ -1160,6 +1171,7 @@
     /**
      * Acts when DirectoryComboBox has changed the selected item.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class DirectoryComboBoxAction extends AbstractAction {
         protected DirectoryComboBoxAction() {
             super("DirectoryComboBoxAction");
@@ -1174,6 +1186,7 @@
     /**
      * Creates a new folder.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class NewFolderAction extends AbstractAction {
         protected NewFolderAction() {
             super(FilePane.ACTION_NEW_FOLDER);
@@ -1209,6 +1222,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class GTKApproveSelectionAction extends ApproveSelectionAction {
         public void actionPerformed(ActionEvent e) {
             if (isDirectorySelected()) {
@@ -1240,6 +1254,7 @@
     /**
      * Renames file
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class RenameFileAction extends AbstractAction {
         protected RenameFileAction() {
             super(FilePane.ACTION_EDIT_FILE_NAME);
@@ -1285,6 +1300,7 @@
     /**
      * Render different filters
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public class FilterComboBoxRenderer extends DefaultListCellRenderer implements UIResource {
         public String getName() {
             // As SynthComboBoxRenderer's are asked for a size BEFORE they
@@ -1328,6 +1344,7 @@
     /**
      * Data model for filter combo-box.
      */
+    @SuppressWarnings("serial") // JDK implementation class
     protected class FilterComboBoxModel extends AbstractListModel
             implements ComboBoxModel, PropertyChangeListener {
         protected FileFilter[] filters;
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,6 +51,7 @@
 /**
  * @author Scott Violet
  */
+@SuppressWarnings("serial") // Superclass not serializable
 public class GTKLookAndFeel extends SynthLookAndFeel {
     private static final boolean IS_22;
 
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1414,6 +1414,7 @@
     }
 
     // Refer to GTKLookAndFeel for details on this.
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class ListTableFocusBorder extends AbstractBorder implements
                           UIResource {
 
@@ -1482,6 +1483,7 @@
     }
 
     // TitledBorder implementation for GTK L&F
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class TitledBorder extends AbstractBorder implements UIResource {
 
         public void paintBorder(Component c, Graphics g, int x, int y,
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,6 +54,7 @@
  */
 public class MotifBorders {
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class BevelBorder extends AbstractBorder implements UIResource {
         private Color darkShadow = UIManager.getColor("controlShadow");
         private Color lightShadow = UIManager.getColor("controlLtHighlight");
@@ -87,6 +88,7 @@
     }
 
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class FocusBorder extends AbstractBorder implements UIResource {
         private Color focus;
         private Color control;
@@ -113,6 +115,7 @@
     }
 
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class ButtonBorder extends AbstractBorder implements UIResource {
         protected Color focus = UIManager.getColor("activeCaptionBorder");
         protected Color shadow = UIManager.getColor("Button.shadow");
@@ -191,6 +194,7 @@
 
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class ToggleButtonBorder extends ButtonBorder {
 
         public ToggleButtonBorder(Color shadow, Color highlight, Color darkShadow, Color focus) {
@@ -224,6 +228,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class MenuBarBorder extends ButtonBorder {
 
         public MenuBarBorder(Color shadow, Color highlight, Color darkShadow, Color focus) {
@@ -249,6 +254,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class FrameBorder extends AbstractBorder implements UIResource {
 
         JComponent jcomp;
@@ -434,6 +440,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class InternalFrameBorder extends FrameBorder {
 
         JInternalFrame frame;
@@ -618,6 +625,7 @@
         g.setColor(oldColor);
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class MotifPopupMenuBorder extends AbstractBorder implements UIResource {
         protected Font   font;
         protected Color  background;
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifComboBoxUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifComboBoxUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,6 +44,7 @@
  *
  * @author Arnaud Weber
  */
+@SuppressWarnings("serial") // Same-version serialization only
 public class MotifComboBoxUI extends BasicComboBoxUI implements Serializable {
     Icon arrowIcon;
     static final int HORIZ_MARGIN = 3;
@@ -93,6 +94,7 @@
     /**
      * Overriden to empty the MouseMotionListener.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class MotifComboPopup extends BasicComboPopup {
 
         public MotifComboPopup( JComboBox comboBox ) {
@@ -279,6 +281,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Same-version serialization only
     static class MotifComboBoxArrowIcon implements Icon, Serializable {
         private Color lightShadow;
         private Color darkShadow;
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -200,6 +200,7 @@
         defaultIcon = newIcon;
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class IconLabel extends JPanel {
         JInternalFrame frame;
 
@@ -291,6 +292,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class IconButton extends JButton {
         Icon icon;
 
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopPaneUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopPaneUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -72,6 +72,7 @@
 ////////////////////////////////////////////////////////////////////////////////////
 ///  DragPane class
 ////////////////////////////////////////////////////////////////////////////////////
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class DragPane extends JComponent {
         public void paint(Graphics g) {
             g.setColor(Color.darkGray);
@@ -82,6 +83,7 @@
 ////////////////////////////////////////////////////////////////////////////////////
 ///  MotifDesktopManager class
 ////////////////////////////////////////////////////////////////////////////////////
+    @SuppressWarnings("serial") // JDK-implementation class
     private class MotifDesktopManager extends DefaultDesktopManager implements Serializable, UIResource {
         JComponent dragPane;
         boolean usingDragPane = false;
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -281,6 +281,7 @@
         fc.setLayout(new BorderLayout(10, 10));
         fc.setAlignmentX(JComponent.CENTER_ALIGNMENT);
 
+        @SuppressWarnings("serial") // anonymous class
         JPanel interior = new JPanel() {
             public Insets getInsets() {
                 return insets;
@@ -303,13 +304,16 @@
         if(currentDirectory != null) {
             curDirName = currentDirectory.getPath();
         }
-        pathField = new JTextField(curDirName) {
+
+        @SuppressWarnings("serial") // anonymous class
+        JTextField tmp1 = new JTextField(curDirName) {
             public Dimension getMaximumSize() {
                 Dimension d = super.getMaximumSize();
                 d.height = getPreferredSize().height;
                 return d;
             }
         };
+        pathField = tmp1;
         pathField.setInheritsPopupMenu(true);
         l.setLabelFor(pathField);
         align(pathField);
@@ -337,13 +341,15 @@
         align(l);
         leftPanel.add(l);
 
-        filterComboBox = new JComboBox<FileFilter>() {
+        @SuppressWarnings("serial") // anonymous class
+        JComboBox tmp2 = new JComboBox<FileFilter>() {
             public Dimension getMaximumSize() {
                 Dimension d = super.getMaximumSize();
                 d.height = getPreferredSize().height;
                 return d;
             }
         };
+        filterComboBox = tmp2;
         filterComboBox.setInheritsPopupMenu(true);
         l.setLabelFor(filterComboBox);
         filterComboBoxModel = createFilterComboBoxModel();
@@ -413,13 +419,15 @@
         align(fileNameLabel);
         interior.add(fileNameLabel);
 
-        filenameTextField = new JTextField() {
+        @SuppressWarnings("serial") // anonymous class
+        JTextField tmp3 = new JTextField() {
             public Dimension getMaximumSize() {
                 Dimension d = super.getMaximumSize();
                 d.height = getPreferredSize().height;
                 return d;
             }
         };
+        filenameTextField = tmp3;
         filenameTextField.setInheritsPopupMenu(true);
         fileNameLabel.setLabelFor(filenameTextField);
         filenameTextField.addActionListener(getApproveSelectionAction());
@@ -436,11 +444,13 @@
         buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
         buttonPanel.add(Box.createGlue());
 
-        approveButton = new JButton(getApproveButtonText(fc)) {
+        @SuppressWarnings("serial") // anonymous class
+        JButton tmp4 = new JButton(getApproveButtonText(fc)) {
             public Dimension getMaximumSize() {
                 return new Dimension(MAX_SIZE.width, this.getPreferredSize().height);
             }
         };
+        approveButton = tmp4;
         approveButton.setMnemonic(getApproveButtonMnemonic(fc));
         approveButton.setToolTipText(getApproveButtonToolTipText(fc));
         approveButton.setInheritsPopupMenu(true);
@@ -450,6 +460,7 @@
         buttonPanel.add(approveButton);
         buttonPanel.add(Box.createGlue());
 
+        @SuppressWarnings("serial") // anonymous class
         JButton updateButton = new JButton(updateButtonText) {
             public Dimension getMaximumSize() {
                 return new Dimension(MAX_SIZE.width, this.getPreferredSize().height);
@@ -464,6 +475,7 @@
         buttonPanel.add(updateButton);
         buttonPanel.add(Box.createGlue());
 
+        @SuppressWarnings("serial") // anonymous class
         JButton cancelButton = new JButton(cancelButtonText) {
             public Dimension getMaximumSize() {
                 return new Dimension(MAX_SIZE.width, this.getPreferredSize().height);
@@ -478,6 +490,7 @@
         buttonPanel.add(cancelButton);
         buttonPanel.add(Box.createGlue());
 
+        @SuppressWarnings("serial") // anonymous class
         JButton helpButton = new JButton(helpButtonText) {
             public Dimension getMaximumSize() {
                 return new Dimension(MAX_SIZE.width, this.getPreferredSize().height);
@@ -640,6 +653,7 @@
         c.setAlignmentY(JComponent.TOP_ALIGNMENT);
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class FileCellRenderer extends DefaultListCellRenderer  {
         public Component getListCellRendererComponent(JList list, Object value, int index,
                                                       boolean isSelected, boolean cellHasFocus) {
@@ -651,6 +665,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class DirectoryCellRenderer extends DefaultListCellRenderer  {
         public Component getListCellRendererComponent(JList list, Object value, int index,
                                                       boolean isSelected, boolean cellHasFocus) {
@@ -662,6 +677,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class MotifDirectoryListModel extends AbstractListModel<File> implements ListDataListener {
         public MotifDirectoryListModel() {
             getModel().addListDataListener(this);
@@ -698,6 +714,7 @@
 
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class MotifFileListModel extends AbstractListModel<File> implements ListDataListener {
         public MotifFileListModel() {
             getModel().addListDataListener(this);
@@ -759,6 +776,7 @@
     /**
      * Render different type sizes and styles.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public class FilterComboBoxRenderer extends DefaultListCellRenderer {
         public Component getListCellRendererComponent(JList list,
             Object value, int index, boolean isSelected,
@@ -777,6 +795,7 @@
     /**
      * Data model for a type-face selection combo-box.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class FilterComboBoxModel extends AbstractListModel<FileFilter> implements ComboBoxModel<FileFilter>,
             PropertyChangeListener {
         protected FileFilter[] filters;
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifIconFactory.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifIconFactory.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,6 +50,7 @@
  * 1.20 04/27/99
  * @author Georges Saab
  */
+@SuppressWarnings("serial") // Same-version serialization only
 public class MotifIconFactory implements Serializable
 {
     private static Icon checkBoxIcon;
@@ -90,6 +91,7 @@
         return radioButtonIcon;
     }
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class CheckBoxIcon implements Icon, UIResource, Serializable  {
         final static int csize = 13;
 
@@ -264,6 +266,7 @@
             }
     } // end class CheckBoxIcon
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class RadioButtonIcon implements Icon, UIResource, Serializable {
         private Color dot = UIManager.getColor("activeCaptionBorder");
         private Color highlight = UIManager.getColor("controlHighlight");
@@ -355,6 +358,7 @@
         }
     } // end class RadioButtonIcon
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class MenuItemCheckIcon implements Icon, UIResource, Serializable
     {
         public void paintIcon(Component c,Graphics g, int x, int y)
@@ -365,6 +369,7 @@
     }  // end class MenuItemCheckIcon
 
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class MenuItemArrowIcon implements Icon, UIResource, Serializable
     {
         public void paintIcon(Component c,Graphics g, int x, int y)
@@ -374,6 +379,7 @@
         public int getIconHeight() { return 0; }
     }  // end class MenuItemArrowIcon
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class MenuArrowIcon implements Icon, UIResource, Serializable
     {
         private Color focus = UIManager.getColor("windowBorder");
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,7 @@
  *
  * @since 1.3
  */
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 public class MotifInternalFrameTitlePane
     extends BasicInternalFrameTitlePane implements LayoutManager, ActionListener, PropertyChangeListener
 {
@@ -232,6 +233,7 @@
 
     static Dimension buttonDimension = new Dimension(BUTTON_SIZE, BUTTON_SIZE);
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private abstract class FrameButton extends JButton {
 
         FrameButton() {
@@ -276,6 +278,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class MinimizeButton extends FrameButton {
         public void paintComponent(Graphics g) {
             super.paintComponent(g);
@@ -288,7 +291,8 @@
         }
     }
 
-    private class MaximizeButton extends FrameButton {
+   @SuppressWarnings("serial") // Superclass is not serializable across versions
+   private class MaximizeButton extends FrameButton {
         public void paintComponent(Graphics g) {
             super.paintComponent(g);
             int max = BUTTON_SIZE - 5;
@@ -302,6 +306,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class SystemButton extends FrameButton {
         public boolean isFocusTraversable() { return false; }
         public void requestFocus() {}
@@ -317,6 +322,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class Title extends FrameButton {
         Title(String title) {
             super();
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -130,6 +130,7 @@
       }
     }
 
+    @SuppressWarnings("serial") // anonymous class
     protected void setupMenuOpenKey(){
         super.setupMenuOpenKey();
         ActionMap map = SwingUtilities.getUIActionMap(frame);
@@ -149,6 +150,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // anonymous class
     protected void setupMenuCloseKey(){
         ActionMap map = SwingUtilities.getUIActionMap(frame);
         if (map != null) {
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java	Mon Mar 10 13:54:25 2014 -0700
@@ -60,6 +60,7 @@
  *
  * @author unattributed
  */
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 public class MotifLookAndFeel extends BasicLookAndFeel
 {
     public String getName() {
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifOptionPaneUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifOptionPaneUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -77,6 +77,7 @@
         return null;
     }
 
+    @SuppressWarnings("serial") // anonymous class
     protected Container createSeparator() {
         return new JPanel() {
 
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifRadioButtonMenuItemUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifRadioButtonMenuItemUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -71,6 +71,7 @@
         return new ChangeHandler();
     }
 
+    @SuppressWarnings("serial") // Same-version serialization only
     protected class ChangeHandler implements ChangeListener, Serializable {
         public void stateChanged(ChangeEvent e) {
             JMenuItem c = (JMenuItem)e.getSource();
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifScrollBarButton.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifScrollBarButton.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,6 +43,7 @@
  * version of Swing.  A future release of Swing will provide support for
  * long term persistence.
  */
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 public class MotifScrollBarButton extends BasicArrowButton
 {
     private Color darkShadow = UIManager.getColor("controlShadow");
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifSplitPaneDivider.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifSplitPaneDivider.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,6 +45,7 @@
  *
  * @author Jeff Dinkins
  */
+@SuppressWarnings("serial") // Same-version serialization only
 public class MotifSplitPaneDivider extends BasicSplitPaneDivider
 {
     /**
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -66,6 +66,7 @@
      * version of Swing.  A future release of Swing will provide support for
      * long term persistence.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class MotifCaret extends DefaultCaret implements UIResource {
 
         /**
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifTreeCellRenderer.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifTreeCellRenderer.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,6 +46,7 @@
  *
  * @author Jeff Dinkins
  */
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 public class MotifTreeCellRenderer extends DefaultTreeCellRenderer
 {
     static final int LEAF_SIZE = 13;
@@ -69,6 +70,7 @@
      * version of Swing.  A future release of Swing will provide support for
      * long term persistence.
      */
+    @SuppressWarnings("serial") // Same-version serialization only
     public static class TreeLeafIcon implements Icon, Serializable {
 
         Color bg;
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifTreeUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifTreeUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -91,6 +91,7 @@
      * version of Swing.  A future release of Swing will provide support for
      * long term persistence.
      */
+    @SuppressWarnings("serial") // Same-version serialization only
     public static class MotifExpandedIcon implements Icon, Serializable {
         static Color bg;
         static Color fg;
@@ -139,6 +140,7 @@
      * version of Swing.  A future release of Swing will provide support for
      * long term persistence.
      */
+    @SuppressWarnings("serial") // Same-version serialization only
     public static class MotifCollapsedIcon extends MotifExpandedIcon {
         public static Icon createCollapsedIcon() {
             return new MotifCollapsedIcon();
--- a/src/share/classes/com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,5 +30,6 @@
  * @deprecated Use {@link javax.swing.plaf.nimbus.NimbusLookAndFeel} instead.
  */
 @Deprecated
+@SuppressWarnings("serial") // Superclass not serializable
 public class NimbusLookAndFeel extends javax.swing.plaf.nimbus.NimbusLookAndFeel {
 }
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsBorders.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsBorders.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -114,6 +114,7 @@
         return internalFrameBorder;
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class ProgressBarBorder extends AbstractBorder implements UIResource {
         protected Color shadow;
         protected Color highlight;
@@ -144,6 +145,7 @@
      * <p>
      * @since 1.4
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class ToolBarBorder extends AbstractBorder implements UIResource, SwingConstants {
         protected Color shadow;
         protected Color highlight;
@@ -247,6 +249,7 @@
      * This class is an implementation of a dashed border.
      * @since 1.4
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class DashedBorder extends LineBorder implements UIResource {
         public DashedBorder(Color color) {
             super(color);
@@ -272,6 +275,7 @@
      * A dashed border that paints itself in the complementary color
      * of the component's background color.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class ComplementDashedBorder extends LineBorder implements UIResource {
         private Color origColor;
         private Color paintColor;
@@ -297,6 +301,7 @@
      * This class is an implementation of the InternalFrameLine border.
      * @since 1.4
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class InternalFrameLineBorder extends LineBorder implements
             UIResource {
         protected Color activeColor;
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsClassicLookAndFeel.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsClassicLookAndFeel.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,7 @@
  *
  * @since 1.5
  */
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 public class WindowsClassicLookAndFeel extends WindowsLookAndFeel {
     public String getName() {
         return "Windows Classic";
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -407,6 +407,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class XPComboBoxButton extends XPStyle.GlyphButton {
         public XPComboBoxButton() {
             super(null,
@@ -459,6 +460,7 @@
      * @deprecated As of Java 2 platform v1.4.
      */
     @Deprecated
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class WindowsComboPopup extends BasicComboPopup {
 
         public WindowsComboPopup( JComboBox cBox ) {
@@ -510,6 +512,7 @@
      * Subclassed to set opacity {@code false} on the renderer
      * and to show border for focused cells.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private static class WindowsComboBoxRenderer
           extends BasicComboBoxRenderer.UIResource {
         private static final Object BORDER_KEY
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,6 +51,7 @@
  * @see javax.swing.DefaultDesktopManager
  * @author Thomas Ball
  */
+@SuppressWarnings("serial") // JDK-implementation class
 public class WindowsDesktopManager extends DefaultDesktopManager
         implements java.io.Serializable, javax.swing.plaf.UIResource {
 
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -225,7 +225,8 @@
         fc.add(topPanel, BorderLayout.NORTH);
 
         // ComboBox Label
-        lookInLabel = new JLabel(lookInLabelText, JLabel.TRAILING) {
+        @SuppressWarnings("serial") // anonymous class
+        JLabel tmp1 = new JLabel(lookInLabelText, JLabel.TRAILING) {
             public Dimension getPreferredSize() {
                 return getMinimumSize();
             }
@@ -238,6 +239,7 @@
                 return d;
             }
         };
+        lookInLabel = tmp1;
         lookInLabel.setDisplayedMnemonic(lookInLabelMnemonic);
         lookInLabel.setAlignmentX(JComponent.LEFT_ALIGNMENT);
         lookInLabel.setAlignmentY(JComponent.CENTER_ALIGNMENT);
@@ -245,7 +247,8 @@
         topPanel.add(Box.createRigidArea(new Dimension(8,0)));
 
         // CurrentDir ComboBox
-        directoryComboBox = new JComboBox<File>() {
+        @SuppressWarnings("serial") // anonymous class
+        JComboBox<File> tmp2 = new JComboBox<File>() {
             public Dimension getMinimumSize() {
                 Dimension d = super.getMinimumSize();
                 d.width = 60;
@@ -259,6 +262,7 @@
                 return d;
             }
         };
+        directoryComboBox = tmp2;
         directoryComboBox.putClientProperty( "JComboBox.lightweightKeyboardNavigation", "Lightweight" );
         lookInLabel.setLabelFor(directoryComboBox);
         directoryComboBoxModel = createDirectoryComboBoxModel(fc);
@@ -416,12 +420,13 @@
         fileAndFilterPanel.add(Box.createRigidArea(vstrut8));
         fileAndFilterPanel.setLayout(new BoxLayout(fileAndFilterPanel, BoxLayout.Y_AXIS));
 
-
-        filenameTextField = new JTextField(35) {
+        @SuppressWarnings("serial") // anonymous class
+        JTextField tmp3 = new JTextField(35) {
             public Dimension getMaximumSize() {
                 return new Dimension(Short.MAX_VALUE, super.getPreferredSize().height);
             }
         };
+        filenameTextField = tmp3;
 
         fileNameLabel.setLabelFor(filenameTextField);
         filenameTextField.addFocusListener(
@@ -456,12 +461,14 @@
         // buttons
         getButtonPanel().setLayout(new BoxLayout(getButtonPanel(), BoxLayout.Y_AXIS));
 
-        approveButton = new JButton(getApproveButtonText(fc)) {
+        @SuppressWarnings("serial") // anonymous class
+        JButton tmp4 = new JButton(getApproveButtonText(fc)) {
             public Dimension getMaximumSize() {
                 return approveButton.getPreferredSize().width > cancelButton.getPreferredSize().width ?
                        approveButton.getPreferredSize() : cancelButton.getPreferredSize();
             }
         };
+        approveButton = tmp4;
         Insets buttonMargin = approveButton.getMargin();
         buttonMargin = new InsetsUIResource(buttonMargin.top,    buttonMargin.left  + 5,
                                             buttonMargin.bottom, buttonMargin.right + 5);
@@ -473,12 +480,14 @@
         getButtonPanel().add(approveButton);
         getButtonPanel().add(Box.createRigidArea(vstrut4));
 
-        cancelButton = new JButton(cancelButtonText) {
+        @SuppressWarnings("serial") // anonymous class
+        JButton tmp5 = new JButton(cancelButtonText) {
             public Dimension getMaximumSize() {
                 return approveButton.getPreferredSize().width > cancelButton.getPreferredSize().width ?
                        approveButton.getPreferredSize() : cancelButton.getPreferredSize();
             }
         };
+        cancelButton = tmp5;
         cancelButton.setMargin(buttonMargin);
         cancelButton.setToolTipText(cancelButtonToolTipText);
         cancelButton.addActionListener(getCancelSelectionAction());
@@ -589,6 +598,7 @@
     }
 
     // Obsolete class, not used in this version.
+    @SuppressWarnings("serial")
     protected class WindowsNewFolderAction extends NewFolderAction {
     }
 
@@ -597,6 +607,7 @@
     }
 
     // Obsolete class, not used in this version.
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class FileRenderer extends DefaultListCellRenderer  {
     }
 
@@ -917,6 +928,7 @@
         return new DirectoryComboBoxRenderer();
     }
 
+    @SuppressWarnings("serial") // anonymous class
     private static JButton createToolButton(Action a, Icon defaultIcon, String toolTipText, String accessibleName) {
         final JButton result = new JButton(a);
 
@@ -979,6 +991,7 @@
     //
     // Renderer for DirectoryComboBox
     //
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     class DirectoryComboBoxRenderer extends DefaultListCellRenderer  {
         IndentIcon ii = new IndentIcon();
         public Component getListCellRendererComponent(JList list, Object value,
@@ -1036,6 +1049,7 @@
     /**
      * Data model for a type-face selection combo-box.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class DirectoryComboBoxModel extends AbstractListModel<File> implements ComboBoxModel<File> {
         Vector<File> directories = new Vector<File>();
         int[] depths = null;
@@ -1168,6 +1182,7 @@
     /**
      * Render different type sizes and styles.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public class FilterComboBoxRenderer extends DefaultListCellRenderer {
         public Component getListCellRendererComponent(JList list,
             Object value, int index, boolean isSelected,
@@ -1193,6 +1208,7 @@
     /**
      * Data model for a type-face selection combo-box.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     protected class FilterComboBoxModel extends AbstractListModel<FileFilter> implements ComboBoxModel<FileFilter>,
             PropertyChangeListener {
         protected FileFilter[] filters;
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,6 +51,7 @@
  * @author Georges Saab
  * @author Rich Schiavi
  */
+@SuppressWarnings("serial") // Same-version serialization only
 public class WindowsIconFactory implements Serializable
 {
     private static Icon frame_closeIcon;
@@ -160,6 +161,7 @@
     }
 
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class FrameButtonIcon implements Icon, Serializable {
         private Part part;
 
@@ -296,6 +298,7 @@
 
 
 
+        @SuppressWarnings("serial") // Same-version serialization only
         private static class ResizeIcon implements Icon, Serializable {
             public void paintIcon(Component c, Graphics g, int x, int y) {
                 g.setColor(UIManager.getColor("InternalFrame.resizeIconHighlight"));
@@ -315,6 +318,7 @@
             public int getIconHeight() { return 13; }
         };
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class CheckBoxIcon implements Icon, Serializable
     {
         final static int csize = 13;
@@ -428,6 +432,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class RadioButtonIcon implements Icon, UIResource, Serializable
     {
         public void paintIcon(Component c, Graphics g, int x, int y) {
@@ -542,6 +547,7 @@
     } // end class RadioButtonIcon
 
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class CheckBoxMenuItemIcon implements Icon, UIResource, Serializable
     {
         public void paintIcon(Component c, Graphics g, int x, int y) {
@@ -567,6 +573,7 @@
     } // End class CheckBoxMenuItemIcon
 
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class RadioButtonMenuItemIcon implements Icon, UIResource, Serializable
     {
         public void paintIcon(Component c, Graphics g, int x, int y) {
@@ -583,6 +590,7 @@
     } // End class RadioButtonMenuItemIcon
 
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class MenuItemCheckIcon implements Icon, UIResource, Serializable{
         public void paintIcon(Component c, Graphics g, int x, int y) {
             /* For debugging:
@@ -597,6 +605,7 @@
 
     } // End class MenuItemCheckIcon
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class MenuItemArrowIcon implements Icon, UIResource, Serializable {
         public void paintIcon(Component c, Graphics g, int x, int y) {
             /* For debugging:
@@ -611,6 +620,7 @@
 
     } // End class MenuItemArrowIcon
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class MenuArrowIcon implements Icon, UIResource, Serializable {
         public void paintIcon(Component c, Graphics g, int x, int y) {
             if (WindowsMenuItemUI.isVistaPainting()) {
@@ -722,6 +732,7 @@
          * JRadioButtonMenuItem.
          * Note: to be used on Vista only.
          */
+        @SuppressWarnings("serial") // Same-version serialization only
         private static class VistaMenuItemCheckIcon
               implements Icon, UIResource, Serializable {
 
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java	Mon Mar 10 13:54:25 2014 -0700
@@ -41,6 +41,7 @@
 import static com.sun.java.swing.plaf.windows.TMSchema.*;
 import static com.sun.java.swing.plaf.windows.XPStyle.Skin;
 
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 public class WindowsInternalFrameTitlePane extends BasicInternalFrameTitlePane {
     private Color selectedTitleGradientColor;
     private Color notSelectedTitleGradientColor;
@@ -267,7 +268,8 @@
         systemPopupMenu = new JPopupMenu();
         addSystemMenuItems(systemPopupMenu);
         enableActions();
-        systemLabel = new JLabel(frame.getFrameIcon()) {
+        @SuppressWarnings("serial") // anonymous class
+        JLabel tmp = new JLabel(frame.getFrameIcon()) {
             protected void paintComponent(Graphics g) {
                 int x = 0;
                 int y = 0;
@@ -303,6 +305,7 @@
                 g.dispose();
             }
         };
+        systemLabel = tmp;
         systemLabel.addMouseListener(new MouseAdapter() {
             public void mouseClicked(MouseEvent e) {
                 if (e.getClickCount() == 2 && frame.isClosable() &&
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -88,6 +88,7 @@
         return titlePane;
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class XPBorder extends AbstractBorder {
         private Skin leftSkin   = xp.getSkin(frame, Part.WP_FRAMELEFT);
         private Skin rightSkin  = xp.getSkin(frame, Part.WP_FRAMERIGHT);
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,6 +92,7 @@
  *
  * @author unattributed
  */
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 public class WindowsLookAndFeel extends BasicLookAndFeel
 {
     /**
@@ -2018,6 +2019,7 @@
      *
      * @since 1.4
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private static class AudioAction extends AbstractAction {
         private Runnable audioRunnable;
         private String audioResource;
@@ -2560,4 +2562,4 @@
         }
     }
 
-}
\ No newline at end of file
+}
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsMenuBarUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsMenuBarUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -134,6 +134,7 @@
      * Action that activates the menu (e.g. when F10 is pressed).
      * Unlike BasicMenuBarUI.TakeFocus, this Action will not show menu popup.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private static class TakeFocus extends AbstractAction {
         public void actionPerformed(ActionEvent e) {
             JMenuBar menuBar = (JMenuBar)e.getSource();
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsPopupWindow.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsPopupWindow.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,7 @@
  *
  * @author Amy Fowler
  */
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 class WindowsPopupWindow extends JWindow {
 
     static final int UNDEFINED_WINDOW_TYPE      = 0;
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsScrollBarUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsScrollBarUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -273,6 +273,7 @@
      * document up/down. It differs from BasicArrowButton in that the
      * preferred size is always a square.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class WindowsArrowButton extends BasicArrowButton {
 
         public WindowsArrowButton(int direction, Color background, Color shadow,
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsSplitPaneDivider.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsSplitPaneDivider.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,6 +44,7 @@
  *
  * @author Jeff Dinkins
  */
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 public class WindowsSplitPaneDivider extends BasicSplitPaneDivider
 {
 
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTableHeaderUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTableHeaderUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -71,6 +71,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // JDK-implementation class
     private class XPDefaultRenderer extends DefaultTableCellHeaderRenderer {
         Skin skin;
         boolean isSelected, hasFocus, hasRollover;
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTextFieldUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTextFieldUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -100,6 +100,7 @@
      * WindowsFieldCaret has different scrolling behavior than
      * DefaultCaret.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class WindowsFieldCaret extends DefaultCaret implements UIResource {
 
         public WindowsFieldCaret() {
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTextUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTextUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -62,6 +62,7 @@
     static LayeredHighlighter.LayerPainter WindowsPainter = new WindowsHighlightPainter(null);
 
     /* public */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class WindowsCaret extends DefaultCaret
                      implements UIResource {
         /**
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTreeUI.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTreeUI.java	Mon Mar 10 13:54:25 2014 -0700
@@ -127,6 +127,7 @@
      * version of Swing.  A future release of Swing will provide support for
      * long term persistence.
      */
+    @SuppressWarnings("serial") // Same-version serialization only
     public static class ExpandedIcon implements Icon, Serializable {
 
         static public Icon createExpandedIcon() {
@@ -179,6 +180,7 @@
      * version of Swing.  A future release of Swing will provide support for
      * long term persistence.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class CollapsedIcon extends ExpandedIcon {
         static public Icon createCollapsedIcon() {
             return new CollapsedIcon();
@@ -195,6 +197,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public class WindowsTreeCellRenderer extends DefaultTreeCellRenderer {
 
         /**
--- a/src/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -305,6 +305,7 @@
         return border;
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class XPFillBorder extends LineBorder implements UIResource {
         XPFillBorder(Color color, int thickness) {
             super(color, thickness);
@@ -333,6 +334,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class XPStatefulFillBorder extends XPFillBorder {
         private final Part part;
         private final Prop prop;
@@ -360,6 +362,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class XPImageBorder extends AbstractBorder implements UIResource {
         Skin skin;
 
@@ -399,6 +402,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class XPEmptyBorder extends EmptyBorder implements UIResource {
         XPEmptyBorder(Insets m) {
             super(m.top+2, m.left+2, m.bottom+2, m.right+2);
@@ -674,6 +678,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class GlyphButton extends JButton {
         private Skin skin;
 
--- a/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java	Fri Mar 07 13:04:49 2014 -0800
+++ b/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java	Mon Mar 10 13:54:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,6 +63,7 @@
  * @since 1.5
  * @author Scott Violet
  */
+@SuppressWarnings("serial") // Per above comment, not actually serializable
 public class SynthLookAndFeel extends BasicLookAndFeel {
     /**
      * Used in a handful of places where we need an empty Insets.