# HG changeset patch # User darcy # Date 1569374754 25200 # Node ID c6f8b2c3dc66d0bf94370386df039bd423a24b9d # Parent b7192797f434147f8685b0c1c958d4648f6ebbeb 8231334: Suppress warnings on non-serializable instance fields in client libs serializable classes Reviewed-by: prr diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/applet/Applet.java --- a/src/java.desktop/share/classes/java/applet/Applet.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/applet/Applet.java Tue Sep 24 18:25:54 2019 -0700 @@ -544,6 +544,7 @@ /** * The accessible context associated with this {@code Applet}. */ + @SuppressWarnings("serial") // Not statically typed as Serializable AccessibleContext accessibleContext = null; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/Component.java --- a/src/java.desktop/share/classes/java/awt/Component.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/Component.java Tue Sep 24 18:25:54 2019 -0700 @@ -469,6 +469,7 @@ * @see #getFocusTraversalKeys * @since 1.4 */ + @SuppressWarnings("serial") // Not statically typed as Serializable Set[] focusTraversalKeys; private static final String[] focusTraversalKeyPropertyNames = { @@ -9293,6 +9294,7 @@ /** * The {@code AccessibleContext} associated with this {@code Component}. */ + @SuppressWarnings("serial") // Not statically typed as Serializable protected AccessibleContext accessibleContext = null; /** @@ -9344,12 +9346,14 @@ * A component listener to track show/hide/resize events * and convert them to PropertyChange events. */ + @SuppressWarnings("serial") // Not statically typed as Serializable protected ComponentListener accessibleAWTComponentHandler = null; /** * A listener to track focus events * and convert them to PropertyChange events. */ + @SuppressWarnings("serial") // Not statically typed as Serializable protected FocusListener accessibleAWTFocusHandler = null; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/Container.java --- a/src/java.desktop/share/classes/java/awt/Container.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/Container.java Tue Sep 24 18:25:54 2019 -0700 @@ -3851,6 +3851,7 @@ * The handler to fire {@code PropertyChange} * when children are added or removed */ + @SuppressWarnings("serial") // Not statically typed as Serializable protected ContainerListener accessibleContainerHandler = null; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/Event.java --- a/src/java.desktop/share/classes/java/awt/Event.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/Event.java Tue Sep 24 18:25:54 2019 -0700 @@ -455,6 +455,7 @@ * @serial * @see java.awt.AWTEvent#getSource() */ + @SuppressWarnings("serial") // Not statically typed as Serializable public Object target; /** @@ -537,6 +538,7 @@ * * @serial */ + @SuppressWarnings("serial") // Not statically typed as Serializable public Object arg; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/FileDialog.java --- a/src/java.desktop/share/classes/java/awt/FileDialog.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/FileDialog.java Tue Sep 24 18:25:54 2019 -0700 @@ -125,6 +125,7 @@ * @see #setFilenameFilter() * @see FileNameFilter */ + @SuppressWarnings("serial") // Not statically typed as Serializable FilenameFilter filter; private static final String base = "filedlg"; diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/MediaTracker.java --- a/src/java.desktop/share/classes/java/awt/MediaTracker.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/MediaTracker.java Tue Sep 24 18:25:54 2019 -0700 @@ -185,6 +185,7 @@ * @see #addImage(Image, int) * @see #removeImage(Image) */ + @SuppressWarnings("serial") // Not statically typed as Serializable MediaEntry head; /* @@ -922,8 +923,10 @@ } } +@SuppressWarnings("serial") // MediaEntry does not have a no-arg ctor class ImageMediaEntry extends MediaEntry implements ImageObserver, java.io.Serializable { + @SuppressWarnings("serial") // Not statically typed as Serializable Image image; int width; int height; diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/MenuComponent.java --- a/src/java.desktop/share/classes/java/awt/MenuComponent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/MenuComponent.java Tue Sep 24 18:25:54 2019 -0700 @@ -470,7 +470,7 @@ * though it won't actually implement the interface - that will be up * to the individual objects which extend MenuComponent. */ - + @SuppressWarnings("serial") // Not statically typed as Serializable AccessibleContext accessibleContext = null; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java --- a/src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java Tue Sep 24 18:25:54 2019 -0700 @@ -138,6 +138,7 @@ */ private int blockIncrement = 1; + @SuppressWarnings("serial") // Not statically typed as Serializable private AdjustmentListener adjustmentListener; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/SentEvent.java --- a/src/java.desktop/share/classes/java/awt/SentEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/SentEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -47,6 +47,7 @@ boolean dispatched; private AWTEvent nested; + @SuppressWarnings("serial") // Not statically typed as Serializable private AppContext toNotify; SentEvent() { diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/SequencedEvent.java --- a/src/java.desktop/share/classes/java/awt/SequencedEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/SequencedEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -55,11 +55,13 @@ private static final LinkedList list = new LinkedList<>(); private final AWTEvent nested; + @SuppressWarnings("serial") // Not statically typed as Serializable private AppContext appContext; private boolean disposed; private final LinkedList pendingEvents = new LinkedList<>(); private static boolean fxAppThreadIsDispatchThread; + @SuppressWarnings("serial") // Not statically typed as Serializable private Thread fxCheckSequenceThread; static { AWTAccessor.setSequencedEventAccessor(new AWTAccessor.SequencedEventAccessor() { diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/Window.java --- a/src/java.desktop/share/classes/java/awt/Window.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/Window.java Tue Sep 24 18:25:54 2019 -0700 @@ -371,6 +371,7 @@ * @see #setShape(Shape) * @since 1.7 */ + @SuppressWarnings("serial") // Not statically typed as Serializable private Shape shape = null; private static final String base = "win"; diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java --- a/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -47,6 +47,7 @@ /** * The list of files. */ + @SuppressWarnings("serial") // Not statically typed as Serializable final List files; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/event/AdjustmentEvent.java --- a/src/java.desktop/share/classes/java/awt/event/AdjustmentEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/event/AdjustmentEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -104,6 +104,7 @@ * @serial * @see #getAdjustable */ + @SuppressWarnings("serial") // Not statically typed as Serializable Adjustable adjustable; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/event/InvocationEvent.java --- a/src/java.desktop/share/classes/java/awt/event/InvocationEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/event/InvocationEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -85,6 +85,7 @@ /** * The Runnable whose run() method will be called. */ + @SuppressWarnings("serial") // Not statically typed as Serializable protected Runnable runnable; /** @@ -94,6 +95,7 @@ * * @see #isDispatched */ + @SuppressWarnings("serial") // Not statically typed as Serializable protected volatile Object notifier; /** @@ -103,6 +105,7 @@ * @see #isDispatched * @since 1.8 */ + @SuppressWarnings("serial") // Not statically typed as Serializable private final Runnable listener; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/awt/event/ItemEvent.java --- a/src/java.desktop/share/classes/java/awt/event/ItemEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/event/ItemEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -95,6 +95,7 @@ * @serial * @see #getItem() */ + @SuppressWarnings("serial") // Not statically typed as Serializable Object item; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/beans/PropertyChangeEvent.java --- a/src/java.desktop/share/classes/java/beans/PropertyChangeEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/beans/PropertyChangeEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -130,12 +130,14 @@ * New value for property. May be null if not known. * @serial */ + @SuppressWarnings("serial") // Not statically typed as Serializable private Object newValue; /** * Previous value for property. May be null if not known. * @serial */ + @SuppressWarnings("serial") // Not statically typed as Serializable private Object oldValue; /** @@ -143,6 +145,7 @@ * @serial * @see #getPropagationId */ + @SuppressWarnings("serial") // Not statically typed as Serializable private Object propagationId; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/beans/beancontext/BeanContextChildSupport.java --- a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextChildSupport.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextChildSupport.java Tue Sep 24 18:25:54 2019 -0700 @@ -348,6 +348,7 @@ * The {@code BeanContext} in which * this {@code BeanContextChild} is nested. */ + @SuppressWarnings("serial") // Not statically typed as Serializable public BeanContextChild beanContextChildPeer; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/beans/beancontext/BeanContextEvent.java --- a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -100,5 +100,6 @@ /** * The {@code BeanContext} from which this event was propagated */ + @SuppressWarnings("serial") // Not statically typed as Serializable protected BeanContext propagatedFrom; } diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java --- a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -130,6 +130,7 @@ * The list of children affected by this * event notification. */ - @SuppressWarnings("rawtypes") + @SuppressWarnings({"rawtypes", + "serial"}) // Not statically typed as Serializable protected Collection children; } diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/beans/beancontext/BeanContextServicesSupport.java --- a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServicesSupport.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServicesSupport.java Tue Sep 24 18:25:54 2019 -0700 @@ -616,7 +616,7 @@ /** * The service provider. */ - + @SuppressWarnings("serial") // Not statically typed as Serializable protected BeanContextServiceProvider serviceProvider; } diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java --- a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java Tue Sep 24 18:25:54 2019 -0700 @@ -338,7 +338,9 @@ */ + @SuppressWarnings("serial") // Not statically typed as Serializable private Object child; + @SuppressWarnings("serial") // Not statically typed as Serializable private Object proxyPeer; private transient boolean removePending; diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/javax/imageio/metadata/IIOInvalidTreeException.java --- a/src/java.desktop/share/classes/javax/imageio/metadata/IIOInvalidTreeException.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/javax/imageio/metadata/IIOInvalidTreeException.java Tue Sep 24 18:25:54 2019 -0700 @@ -50,6 +50,7 @@ * The {@code Node} that led to the parsing error, or * {@code null}. */ + @SuppressWarnings("serial") // Not statically typed as Serializable protected Node offendingNode = null; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/javax/imageio/spi/DigraphNode.java --- a/src/java.desktop/share/classes/javax/imageio/spi/DigraphNode.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/javax/imageio/spi/DigraphNode.java Tue Sep 24 18:25:54 2019 -0700 @@ -43,12 +43,14 @@ private static final long serialVersionUID = 5308261378582246841L; /** The data associated with this node. */ + @SuppressWarnings("serial") // Not statically typed as Serializable protected E data; /** * A {@code Set} of neighboring nodes pointed to by this * node. */ + @SuppressWarnings("serial") // Not statically typed as Serializable protected Set> outNodes = new HashSet<>(); /** The in-degree of the node. */ @@ -58,6 +60,7 @@ * A {@code Set} of neighboring nodes that point to this * node. */ + @SuppressWarnings("serial") // Not statically typed as Serializable private Set> inNodes = new HashSet<>(); public DigraphNode(E data) { diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/javax/print/attribute/AttributeSetUtilities.java --- a/src/java.desktop/share/classes/javax/print/attribute/AttributeSetUtilities.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/javax/print/attribute/AttributeSetUtilities.java Tue Sep 24 18:25:54 2019 -0700 @@ -86,6 +86,7 @@ /** * The attribute set. */ + @SuppressWarnings("serial") // Not statically typed as Serializable private AttributeSet attrset; /** @@ -346,6 +347,7 @@ /** * The attribute set. */ + @SuppressWarnings("serial") // Not statically typed as Serializable private AttributeSet attrset; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/javax/print/event/PrintJobAttributeEvent.java --- a/src/java.desktop/share/classes/javax/print/event/PrintJobAttributeEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/javax/print/event/PrintJobAttributeEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -44,6 +44,7 @@ /** * The printing service attributes that changed. */ + @SuppressWarnings("serial") // Not statically typed as Serializable private PrintJobAttributeSet attributes; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/javax/print/event/PrintServiceAttributeEvent.java --- a/src/java.desktop/share/classes/javax/print/event/PrintServiceAttributeEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/javax/print/event/PrintServiceAttributeEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -44,6 +44,7 @@ /** * The printing service attributes that changed. */ + @SuppressWarnings("serial") // Not statically typed as Serializable private PrintServiceAttributeSet attributes; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java --- a/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java Tue Sep 24 18:25:54 2019 -0700 @@ -60,6 +60,7 @@ * @see #getType * @serial */ + @SuppressWarnings("serial") // Not statically typed as Serializable private final Type type; /** diff -r b7192797f434 -r c6f8b2c3dc66 src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java --- a/src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java Tue Sep 24 22:57:28 2019 +0100 +++ b/src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java Tue Sep 24 18:25:54 2019 -0700 @@ -56,6 +56,7 @@ private boolean isCursorAllowed = true; private boolean supportsXEmbed = false; + @SuppressWarnings("serial") // Not statically typed as Serializable private KeyboardFocusManager appletKFM; // JDK 1.1 compatibility private static final long serialVersionUID = 2967042741780317130L;