changeset 9610:a0da4ed5d7d1

8033712: Fix more serial lint warnings in sun.awt Reviewed-by: alanb, serb, prr
author darcy
date Thu, 13 Mar 2014 12:40:27 -0700
parents c9745e5b7b7b
children 9e9917236cef
files src/solaris/classes/sun/awt/X11/InfoWindow.java src/solaris/classes/sun/awt/X11/XAWTLookAndFeel.java src/solaris/classes/sun/awt/X11/XCreateWindowParams.java src/solaris/classes/sun/awt/X11/XCustomCursor.java src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java src/solaris/classes/sun/awt/X11/XEmbedChildProxy.java src/solaris/classes/sun/awt/X11/XEmbeddedFrame.java src/solaris/classes/sun/awt/X11/XException.java src/solaris/classes/sun/awt/X11/XFileDialogPeer.java src/solaris/classes/sun/awt/X11/XTextAreaPeer.java src/solaris/classes/sun/awt/X11/XTextFieldPeer.java src/solaris/classes/sun/awt/X11/XTrayIconPeer.java src/solaris/classes/sun/awt/X11CustomCursor.java src/windows/classes/sun/awt/shell/Win32ShellFolder2.java src/windows/classes/sun/awt/windows/WCustomCursor.java src/windows/classes/sun/awt/windows/WEmbeddedFrame.java src/windows/classes/sun/awt/windows/WFontMetrics.java src/windows/classes/sun/awt/windows/WPageDialog.java src/windows/classes/sun/awt/windows/WPrintDialog.java src/windows/classes/sun/awt/windows/WPrinterJob.java src/windows/classes/sun/awt/windows/WScrollPanePeer.java
diffstat 21 files changed, 44 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/awt/X11/InfoWindow.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/InfoWindow.java	Thu Mar 13 12:40:27 2014 -0700
@@ -39,6 +39,7 @@
 /**
  * An utility window class. This is a base class for Tooltip and Balloon.
  */
+@SuppressWarnings("serial") // JDK-implementation class
 public abstract class InfoWindow extends Window {
     private Container container;
     private Closer closer;
@@ -146,6 +147,7 @@
         Rectangle getBounds();
     }
 
+    @SuppressWarnings("serial") // JDK-implementation class
     public static class Tooltip extends InfoWindow {
 
         public interface LiveArguments extends InfoWindow.LiveArguments {
@@ -239,6 +241,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // JDK-implementation class
     public static class Balloon extends InfoWindow {
 
         public interface LiveArguments extends InfoWindow.LiveArguments {
--- a/src/solaris/classes/sun/awt/X11/XAWTLookAndFeel.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/XAWTLookAndFeel.java	Thu Mar 13 12:40:27 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2007, 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
@@ -38,6 +38,7 @@
 import com.sun.java.swing.plaf.motif.*;
 import sun.awt.X11.XComponentPeer;
 
+@SuppressWarnings("serial") // JDK-implementation class
 class XAWTLookAndFeel extends MotifLookAndFeel {
 
     /**
--- a/src/solaris/classes/sun/awt/X11/XCreateWindowParams.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/XCreateWindowParams.java	Thu Mar 13 12:40:27 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, 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
@@ -29,6 +29,7 @@
 import java.util.Iterator;
 import java.util.Map;
 
+@SuppressWarnings("serial") // JDK-implementation class
 public class XCreateWindowParams extends HashMap {
     public XCreateWindowParams() {
     }
--- a/src/solaris/classes/sun/awt/X11/XCustomCursor.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/XCustomCursor.java	Thu Mar 13 12:40:27 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, 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
@@ -35,6 +35,7 @@
  * @author      Thomas Ball
  * @author      Bino George
  */
+@SuppressWarnings("serial") // JDK-implementation class
 public class XCustomCursor extends X11CustomCursor {
 
     public XCustomCursor(Image cursor, Point hotSpot, String name)
--- a/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java	Thu Mar 13 12:40:27 2014 -0700
@@ -688,6 +688,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // JDK-implementation class
     private static class XEmbedDropTarget extends DropTarget {
         public void addDropTargetListener(DropTargetListener dtl)
           throws TooManyListenersException {
--- a/src/solaris/classes/sun/awt/X11/XEmbedChildProxy.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/XEmbedChildProxy.java	Thu Mar 13 12:40:27 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2007, 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
@@ -29,6 +29,7 @@
 import java.awt.Toolkit;
 import sun.awt.AWTAccessor;
 
+@SuppressWarnings("serial") // JDK-implementation class
 public class XEmbedChildProxy extends Component {
     long handle;
     XEmbeddingContainer container;
--- a/src/solaris/classes/sun/awt/X11/XEmbeddedFrame.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/XEmbeddedFrame.java	Thu Mar 13 12:40:27 2014 -0700
@@ -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
@@ -30,6 +30,7 @@
 import java.awt.AWTKeyStroke;
 import java.util.logging.Logger;
 
+@SuppressWarnings("serial") // JDK-implementation class
 public class XEmbeddedFrame extends EmbeddedFrame {
 
     private static final Logger log = Logger.getLogger(XEmbeddedFrame.class.getName());
--- a/src/solaris/classes/sun/awt/X11/XException.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/XException.java	Thu Mar 13 12:40:27 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
@@ -30,6 +30,7 @@
  *
  * @since 1.5
  */
+@SuppressWarnings("serial") // JDK-implementation class
 public class XException extends RuntimeException {
     public XException() {
         super();
--- a/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java	Thu Mar 13 12:40:27 2014 -0700
@@ -199,12 +199,13 @@
         // After showing we should display 'user.dir' as current directory
         // if user didn't set directory programatically
         pathField = new TextField(savedDir != null ? savedDir : userDir);
-
-        pathChoice = new Choice() {
+        @SuppressWarnings("serial") // Anonymous class
+        Choice tmp = new Choice() {
                 public Dimension getPreferredSize() {
                     return new Dimension(PATH_CHOICE_WIDTH, pathField.getPreferredSize().height);
                 }
             };
+        pathChoice = tmp;
         pathPanel = new Panel();
         pathPanel.setLayout(new BorderLayout());
 
@@ -845,6 +846,7 @@
     }
 }
 
+@SuppressWarnings("serial") // JDK-implementation class
 class Separator extends Canvas {
     public final static int HORIZONTAL = 0;
     public final static int VERTICAL = 1;
--- a/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java	Thu Mar 13 12:40:27 2014 -0700
@@ -63,7 +63,6 @@
 import sun.awt.AWTAccessor;
 import sun.awt.SunToolkit;
 
-
 final class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
 
     private final AWTTextPane textPane;
@@ -615,7 +614,7 @@
         }
     }
 
-
+    @SuppressWarnings("serial") // JDK-implementation class
     static final class XAWTCaret extends DefaultCaret {
         @Override
         public void focusGained(FocusEvent e) {
@@ -647,6 +646,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // JDK-implementation class
     final class XAWTScrollBarButton extends BasicArrowButton {
 
         private UIDefaults uidefaults = XToolkit.getUIDefaults();
@@ -907,6 +907,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // JDK-implementation class
     final class AWTTextArea extends JTextArea implements DocumentListener {
 
         private boolean isFocused = false;
@@ -1105,6 +1106,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // JDK-implementation class
     private class AWTTextPane extends JScrollPane implements FocusListener {
 
         private final JTextArea jtext;
@@ -1190,6 +1192,7 @@
             return xwin.getGraphics();
         }
 
+        @SuppressWarnings("serial") // JDK-implementation class
         final class XAWTScrollBar extends ScrollBar {
 
             XAWTScrollBar(int i) {
@@ -1205,6 +1208,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // JDK-implementation class
     static class BevelBorder extends AbstractBorder implements UIResource {
         private Color darkShadow = SystemColor.controlDkShadow;
         private Color lightShadow = SystemColor.controlLtHighlight;
--- a/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java	Thu Mar 13 12:40:27 2014 -0700
@@ -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
@@ -541,6 +541,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // JDK-implementation class
     final class XAWTTextField extends JPasswordField
             implements ActionListener, DocumentListener {
 
--- a/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java	Thu Mar 13 12:40:27 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
@@ -501,6 +501,7 @@
     // Special embedded frame for tray icon
     // ***************************************
 
+    @SuppressWarnings("serial") // JDK-implementation class
     private static class XTrayIconEmbeddedFrame extends XEmbeddedFrame {
         public XTrayIconEmbeddedFrame(){
             super(XToolkit.getDefaultRootWindow(), true, true);
@@ -527,6 +528,7 @@
     // Classes for painting an image on canvas
     // ***************************************
 
+    @SuppressWarnings("serial") // JDK-implementation class
     static class TrayIconCanvas extends IconCanvas {
         TrayIcon target;
         boolean autosize;
@@ -548,6 +550,7 @@
         }
     }
 
+    @SuppressWarnings("serial") // JDK-implementation class
     public static class IconCanvas extends Canvas {
         volatile Image image;
         IconObserver observer;
--- a/src/solaris/classes/sun/awt/X11CustomCursor.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/solaris/classes/sun/awt/X11CustomCursor.java	Thu Mar 13 12:40:27 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
@@ -36,6 +36,7 @@
  * @see Component#setCursor
  * @author      Thomas Ball
  */
+@SuppressWarnings("serial") // JDK-implementation class
 public abstract class X11CustomCursor extends CustomCursor {
 
     public X11CustomCursor(Image cursor, Point hotSpot, String name)
--- a/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Thu Mar 13 12:40:27 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, 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
@@ -68,7 +68,7 @@
  * @author Leif Samuelsson
  * @author Kenneth Russell
  * @since 1.4 */
-
+@SuppressWarnings("serial") // JDK-implementation class
 final class Win32ShellFolder2 extends ShellFolder {
 
     private static native void initIDs();
--- a/src/windows/classes/sun/awt/windows/WCustomCursor.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/windows/classes/sun/awt/windows/WCustomCursor.java	Thu Mar 13 12:40:27 2014 -0700
@@ -38,6 +38,7 @@
  * @see Component#setCursor
  * @author      ThomasBall
  */
+@SuppressWarnings("serial") // JDK-implementation class
 final class WCustomCursor extends CustomCursor {
 
     WCustomCursor(Image cursor, Point hotSpot, String name)
--- a/src/windows/classes/sun/awt/windows/WEmbeddedFrame.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/windows/classes/sun/awt/windows/WEmbeddedFrame.java	Thu Mar 13 12:40:27 2014 -0700
@@ -35,6 +35,7 @@
 import java.security.PrivilegedAction;
 import  java.security.AccessController;
 
+@SuppressWarnings("serial") // JDK-implementation class
 public class WEmbeddedFrame extends EmbeddedFrame {
 
     static {
--- a/src/windows/classes/sun/awt/windows/WFontMetrics.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/windows/classes/sun/awt/windows/WFontMetrics.java	Thu Mar 13 12:40:27 2014 -0700
@@ -33,6 +33,7 @@
  *
  * @author Jim Graham
  */
+@SuppressWarnings("serial") // JDK-implementation class
 final class WFontMetrics extends FontMetrics {
 
     static {
--- a/src/windows/classes/sun/awt/windows/WPageDialog.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/windows/classes/sun/awt/windows/WPageDialog.java	Thu Mar 13 12:40:27 2014 -0700
@@ -34,6 +34,7 @@
 import java.awt.print.PageFormat;
 import java.awt.print.Printable;
 
+@SuppressWarnings("serial") // JDK-implementation class
 final class WPageDialog extends WPrintDialog {
     static {
         initIDs();
--- a/src/windows/classes/sun/awt/windows/WPrintDialog.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/windows/classes/sun/awt/windows/WPrintDialog.java	Thu Mar 13 12:40:27 2014 -0700
@@ -32,6 +32,7 @@
 
 import sun.awt.AWTAccessor;
 
+@SuppressWarnings("serial") // JDK-implementation class
 class WPrintDialog extends Dialog {
     static {
         initIDs();
--- a/src/windows/classes/sun/awt/windows/WPrinterJob.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/windows/classes/sun/awt/windows/WPrinterJob.java	Thu Mar 13 12:40:27 2014 -0700
@@ -2194,6 +2194,7 @@
 
     }
 
+@SuppressWarnings("serial") // JDK-implementation class
 class PrintToFileErrorDialog extends Dialog implements ActionListener{
     public PrintToFileErrorDialog(Frame parent, String title, String message,
                            String buttonText) {
--- a/src/windows/classes/sun/awt/windows/WScrollPanePeer.java	Thu Mar 13 20:48:33 2014 +0400
+++ b/src/windows/classes/sun/awt/windows/WScrollPanePeer.java	Thu Mar 13 12:40:27 2014 -0700
@@ -1,4 +1,4 @@
-/*
+h/*
  * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -164,6 +164,7 @@
      * scroll bar thumbs and paint the exposed area in one synchronous
      * operation.
      */
+    @SuppressWarnings("serial") // JDK-implementation class
     class ScrollEvent extends PeerEvent {
         ScrollEvent(Object source, Runnable runnable) {
             super(source, runnable, 0L);