OpenJDK / jdk / hs
changeset 22618:927e4fe6cb24
8033221: Fix serial lint warnings in sun.swing.*
Reviewed-by: alexsch
line wrap: on
line diff
--- a/jdk/src/share/classes/sun/swing/AbstractFilterComboBoxModel.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/AbstractFilterComboBoxModel.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -34,6 +34,7 @@ /** * Data model for a type-face selection combo-box. */ +@SuppressWarnings("serial") // JDK-implementation class public abstract class AbstractFilterComboBoxModel extends AbstractListModel<FileFilter> implements ComboBoxModel<FileFilter>, PropertyChangeListener {
--- a/jdk/src/share/classes/sun/swing/BakedArrayList.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/BakedArrayList.java Thu Jan 30 09:15:13 2014 -0800 @@ -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 @@ -43,6 +43,7 @@ * * @author Scott Violet */ +@SuppressWarnings("serial") // JDK-implementation class public class BakedArrayList extends ArrayList { /** * The cached hashCode.
--- a/jdk/src/share/classes/sun/swing/FilePane.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/FilePane.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2009, 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 @@ -58,6 +58,7 @@ * * @author Leif Samuelsson */ +@SuppressWarnings("serial") // JDK-implementation class public class FilePane extends JPanel implements PropertyChangeListener { // Constants for actions. These are used for the actions' ACTION_COMMAND_KEY // and as keys in the action maps for FilePane and the corresponding UI classes @@ -391,6 +392,7 @@ firePropertyChange("viewType", oldValue, viewType); } + @SuppressWarnings("serial") // JDK-implementation class class ViewTypeAction extends AbstractAction { private int viewType; @@ -470,6 +472,7 @@ */ public Action[] getActions() { if (actions == null) { + @SuppressWarnings("serial") // JDK-implementation class class FilePaneAction extends AbstractAction { FilePaneAction(String name) { this(name, name); @@ -577,6 +580,8 @@ public JPanel createList() { JPanel p = new JPanel(new BorderLayout()); final JFileChooser fileChooser = getFileChooser(); + + @SuppressWarnings("serial") // anonymous class final JList<Object> list = new JList<Object>() { public int getNextMatch(String prefix, int startIndex, Position.Bias bias) { ListModel model = getModel(); @@ -651,6 +656,7 @@ /** * This model allows for sorting JList */ + @SuppressWarnings("serial") // JDK-implementation class private class SortableListModel extends AbstractListModel<Object> implements TableModelListener, RowSorterListener { @@ -684,6 +690,7 @@ return detailsTableModel; } + @SuppressWarnings("serial") // JDK-implementation class class DetailsTableModel extends AbstractTableModel implements ListDataListener { JFileChooser chooser; BasicDirectoryModel directoryModel; @@ -1003,6 +1010,7 @@ return tableCellEditor; } + @SuppressWarnings("serial") // JDK-implementation class private class DetailsTableCellEditor extends DefaultCellEditor { private final JTextField tf; @@ -1025,7 +1033,7 @@ } } - + @SuppressWarnings("serial") // JDK-implementation class class DetailsTableCellRenderer extends DefaultTableCellRenderer { JFileChooser chooser; DateFormat df; @@ -1129,6 +1137,7 @@ JPanel p = new JPanel(new BorderLayout()); + @SuppressWarnings("serial") // anonymous class final JTable detailsTable = new JTable(getDetailsTableModel()) { // Handle Escape key events here protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) { @@ -1447,6 +1456,7 @@ protected Action newFolderAction; + @SuppressWarnings("serial") // anonymous class inside public Action getNewFolderAction() { if (!readOnly && newFolderAction == null) { newFolderAction = new AbstractAction(newFolderActionLabelText) { @@ -1479,6 +1489,7 @@ return newFolderAction; } + @SuppressWarnings("serial") // JDK-implementation class protected class FileRenderer extends DefaultListCellRenderer { public Component getListCellRendererComponent(JList list, Object value,
--- a/jdk/src/share/classes/sun/swing/ImageIconUIResource.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/ImageIconUIResource.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -35,6 +35,7 @@ * @author Shannon Hickey * */ +@SuppressWarnings("serial") // JDK-implementation class public class ImageIconUIResource extends ImageIcon implements UIResource { /**
--- a/jdk/src/share/classes/sun/swing/JLightweightFrame.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/JLightweightFrame.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -64,6 +64,7 @@ * @author Artem Ananiev * @author Anton Tarasov */ +@SuppressWarnings("serial") // JDK-implementation class public final class JLightweightFrame extends LightweightFrame implements RootPaneContainer { private final JRootPane rootPane = new JRootPane(); @@ -209,6 +210,7 @@ } } + @SuppressWarnings("serial") // anonymous class inside private void initInterior() { contentPane = new JPanel() { @Override
--- a/jdk/src/share/classes/sun/swing/PrintColorUIResource.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/PrintColorUIResource.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -36,6 +36,7 @@ * @author Shannon Hickey * */ +@SuppressWarnings("serial") // JDK-implementation class public class PrintColorUIResource extends ColorUIResource { /** The color to use during printing */
--- a/jdk/src/share/classes/sun/swing/PrintingStatus.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/PrintingStatus.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, 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 @@ -62,6 +62,7 @@ private final AtomicBoolean isAborted = new AtomicBoolean(false); // the action that will abort printing + @SuppressWarnings("serial") // anonymous class private final Action abortAction = new AbstractAction() { public void actionPerformed(ActionEvent ae) { if (!isAborted.get()) {
--- a/jdk/src/share/classes/sun/swing/WindowsPlacesBar.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/WindowsPlacesBar.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, 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 @@ -47,6 +47,7 @@ * * @author Leif Samuelsson */ +@SuppressWarnings("serial") // JDK-implementation class public class WindowsPlacesBar extends JToolBar implements ActionListener, PropertyChangeListener { JFileChooser fc;
--- a/jdk/src/share/classes/sun/swing/icon/SortArrowIcon.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/icon/SortArrowIcon.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 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 @@ -36,6 +36,7 @@ * Sorting icon. * */ +@SuppressWarnings("serial") // JDK-implementation class public class SortArrowIcon implements Icon, UIResource, Serializable { // Height of the arrow, the width is ARROW_HEIGHT private static final int ARROW_HEIGHT = 5;
--- a/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUI.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUI.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, 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 @@ -303,6 +303,7 @@ /** * Responds to a File Name completion request (e.g. Tab) */ + @SuppressWarnings("serial") // JDK-implementation class private class FileNameCompletionAction extends AbstractAction { protected FileNameCompletionAction() { super("fileNameCompletion"); @@ -538,6 +539,7 @@ public void clearIconCache() { } // Copied as SynthBorder is package private in synth + @SuppressWarnings("serial") // JDK-implementation clas private class UIBorder extends AbstractBorder implements UIResource { private Insets _insets; UIBorder(Insets insets) {
--- a/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, 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 @@ -190,6 +190,7 @@ readOnly = UIManager.getBoolean("FileChooser.readOnly"); } + @SuppressWarnings("serial") // anonymous classes inside public void installComponents(JFileChooser fc) { super.installComponents(fc); @@ -734,6 +735,7 @@ /** * Data model for a type-face selection combo-box. */ + @SuppressWarnings("serial") // JDK-implementation class protected class DirectoryComboBoxModel extends AbstractListModel<File> implements ComboBoxModel<File> { Vector<File> directories = new Vector<File>(); int[] depths = null; @@ -863,6 +865,7 @@ /** * Acts when DirectoryComboBox has changed the selected item. */ + @SuppressWarnings("serial") // JDK-implementation class protected class DirectoryComboBoxAction extends AbstractAction { protected DirectoryComboBoxAction() { super("DirectoryComboBoxAction"); @@ -923,6 +926,7 @@ /** * Data model for a type-face selection combo-box. */ + @SuppressWarnings("serial") // JDK-implementation class protected class FilterComboBoxModel extends AbstractFilterComboBoxModel { protected JFileChooser getFileChooser() { return SynthFileChooserUIImpl.this.getFileChooser(); @@ -1012,6 +1016,7 @@ } } + @SuppressWarnings("serial") // JDK-implementation class private class AlignedLabel extends JLabel { private AlignedLabel[] group; private int maxWidth = 0;
--- a/jdk/src/share/classes/sun/swing/plaf/windows/ClassicSortArrowIcon.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/plaf/windows/ClassicSortArrowIcon.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 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 @@ -36,6 +36,7 @@ * Classic sort icons. * */ +@SuppressWarnings("serial") // JDK-implementation class public class ClassicSortArrowIcon implements Icon, UIResource, Serializable{ private static final int X_OFFSET = 9; private boolean ascending;
--- a/jdk/src/share/classes/sun/swing/table/DefaultTableCellHeaderRenderer.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/table/DefaultTableCellHeaderRenderer.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, 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 @@ -39,6 +39,7 @@ import javax.swing.border.Border; import javax.swing.table.*; +@SuppressWarnings("serial") // JDK-implementation class public class DefaultTableCellHeaderRenderer extends DefaultTableCellRenderer implements UIResource { private boolean horizontalTextPositionSet; @@ -187,6 +188,7 @@ return new Point(x, y); } + @SuppressWarnings("serial") // JDK-implementation class private class EmptyIcon implements Icon, Serializable { int width = 0; int height = 0;
--- a/jdk/src/share/classes/sun/swing/text/TextComponentPrintable.java Thu Jan 30 14:38:15 2014 +0000 +++ b/jdk/src/share/classes/sun/swing/text/TextComponentPrintable.java Thu Jan 30 09:15:13 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, 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 @@ -324,6 +324,7 @@ } } } + @SuppressWarnings("serial") // anonymous class inside private JTextComponent createPrintShellOnEDT(final JTextComponent textComponent) { assert SwingUtilities.isEventDispatchThread();