Skip to content

Commit c7551c3

Browse files
committed
8256014: Eliminate the warning about serialization in non-public API of Swing
Reviewed-by: prr, psadhukhan
1 parent 2d6c28d commit c7551c3

File tree

67 files changed

+708
-1004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+708
-1004
lines changed

src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,6 @@
2525

2626
package com.sun.java.swing.plaf.motif;
2727

28-
import sun.swing.SwingUtilities2;
29-
import javax.swing.*;
30-
import javax.swing.border.*;
31-
import javax.swing.plaf.*;
32-
3328
import java.awt.Color;
3429
import java.awt.Component;
3530
import java.awt.Dimension;
@@ -40,15 +35,21 @@
4035
import java.awt.Point;
4136
import java.awt.Rectangle;
4237

38+
import javax.swing.AbstractButton;
39+
import javax.swing.ButtonModel;
40+
import javax.swing.JButton;
41+
import javax.swing.JComponent;
42+
import javax.swing.JInternalFrame;
43+
import javax.swing.JMenuBar;
44+
import javax.swing.JPopupMenu;
45+
import javax.swing.UIManager;
46+
import javax.swing.border.AbstractBorder;
47+
import javax.swing.plaf.UIResource;
48+
49+
import sun.swing.SwingUtilities2;
50+
4351
/**
4452
* Factory object that can vend Icons appropriate for the basic {@literal L & F}.
45-
* <p>
46-
* <strong>Warning:</strong>
47-
* Serialized objects of this class will not be compatible with
48-
* future Swing releases. The current serialization support is appropriate
49-
* for short term storage or RMI between applications running the same
50-
* version of Swing. A future release of Swing will provide support for
51-
* long term persistence.
5253
*
5354
* @author Amy Fowler
5455
*/

src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifButtonUI.java

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,24 +25,27 @@
2525

2626
package com.sun.java.swing.plaf.motif;
2727

28-
import sun.awt.AppContext;
28+
import java.awt.Color;
29+
import java.awt.Dimension;
30+
import java.awt.Graphics;
31+
import java.awt.Insets;
32+
import java.awt.Rectangle;
33+
import java.awt.Shape;
34+
35+
import javax.swing.AbstractButton;
36+
import javax.swing.JComponent;
37+
import javax.swing.LookAndFeel;
38+
import javax.swing.SwingUtilities;
39+
import javax.swing.UIManager;
40+
import javax.swing.border.AbstractBorder;
41+
import javax.swing.plaf.ComponentUI;
42+
import javax.swing.plaf.basic.BasicButtonListener;
43+
import javax.swing.plaf.basic.BasicButtonUI;
2944

30-
import javax.swing.*;
31-
import javax.swing.border.*;
32-
import javax.swing.plaf.basic.*;
33-
import java.awt.*;
34-
import java.awt.event.*;
35-
import javax.swing.plaf.*;
45+
import sun.awt.AppContext;
3646

3747
/**
3848
* MotifButton implementation
39-
* <p>
40-
* <strong>Warning:</strong>
41-
* Serialized objects of this class will not be compatible with
42-
* future Swing releases. The current serialization support is appropriate
43-
* for short term storage or RMI between applications running the same
44-
* version of Swing. A future release of Swing will provide support for
45-
* long term persistence.
4649
*
4750
* @author Rich Schiavi
4851
*/

src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifCheckBoxUI.java

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,23 +25,15 @@
2525

2626
package com.sun.java.swing.plaf.motif;
2727

28-
import sun.awt.AppContext;
29-
30-
import javax.swing.*;
28+
import javax.swing.AbstractButton;
29+
import javax.swing.JComponent;
30+
import javax.swing.UIManager;
31+
import javax.swing.plaf.ComponentUI;
3132

32-
import javax.swing.plaf.*;
33-
34-
import java.awt.*;
33+
import sun.awt.AppContext;
3534

3635
/**
3736
* MotifCheckBox implementation
38-
* <p>
39-
* <strong>Warning:</strong>
40-
* Serialized objects of this class will not be compatible with
41-
* future Swing releases. The current serialization support is appropriate
42-
* for short term storage or RMI between applications running the same
43-
* version of Swing. A future release of Swing will provide support for
44-
* long term persistence.
4537
*
4638
* @author Rich Schiavi
4739
*/

src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifComboBoxUI.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,7 @@
5252
import javax.swing.plaf.basic.ComboPopup;
5353

5454
/**
55-
* ComboBox motif look and feel
56-
* <p>
57-
* <strong>Warning:</strong>
58-
* Serialized objects of this class will not be compatible with
59-
* future Swing releases. The current serialization support is appropriate
60-
* for short term storage or RMI between applications running the same
61-
* version of Swing. A future release of Swing will provide support for
62-
* long term persistence.
55+
* ComboBox motif look and feel.
6356
*
6457
* @author Arnaud Weber
6558
*/

src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopPaneUI.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,25 +25,26 @@
2525

2626
package com.sun.java.swing.plaf.motif;
2727

28-
import javax.swing.*;
29-
import java.awt.Rectangle;
30-
import java.awt.Dimension;
31-
import java.awt.Insets;
3228
import java.awt.Color;
33-
import java.awt.Graphics;
3429
import java.awt.Component;
30+
import java.awt.Dimension;
31+
import java.awt.Graphics;
32+
import java.awt.Insets;
3533
import java.awt.Point;
36-
import javax.swing.plaf.*;
34+
import java.awt.Rectangle;
3735
import java.io.Serializable;
3836

37+
import javax.swing.DefaultDesktopManager;
38+
import javax.swing.JComponent;
39+
import javax.swing.JDesktopPane;
40+
import javax.swing.JInternalFrame;
41+
import javax.swing.JLayeredPane;
42+
import javax.swing.SwingUtilities;
43+
import javax.swing.plaf.ComponentUI;
44+
import javax.swing.plaf.UIResource;
45+
3946
/**
40-
* <p>
41-
* <strong>Warning:</strong>
42-
* Serialized objects of this class will not be compatible with
43-
* future Swing releases. The current serialization support is appropriate
44-
* for short term storage or RMI between applications running the same
45-
* version of Swing. A future release of Swing will provide support for
46-
* long term persistence.
47+
* Motif desktop pane.
4748
*
4849
* @author David Kloba
4950
*/

src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifEditorPaneUI.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -22,22 +22,16 @@
2222
* or visit www.oracle.com if you need additional information or have any
2323
* questions.
2424
*/
25+
2526
package com.sun.java.swing.plaf.motif;
2627

27-
import javax.swing.*;
28-
import javax.swing.text.*;
29-
import javax.swing.plaf.*;
28+
import javax.swing.JComponent;
29+
import javax.swing.plaf.ComponentUI;
3030
import javax.swing.plaf.basic.BasicEditorPaneUI;
31+
import javax.swing.text.Caret;
3132

3233
/**
3334
* Provides the look and feel for an pluggable content-type text editor.
34-
* <p>
35-
* <strong>Warning:</strong>
36-
* Serialized objects of this class will not be compatible with
37-
* future Swing releases. The current serialization support is appropriate
38-
* for short term storage or RMI between applications running the same
39-
* version of Swing. A future release of Swing will provide support for
40-
* long term persistence.
4135
*
4236
* @author Timothy Prinzing
4337
*/

src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifIconFactory.java

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,29 +25,21 @@
2525

2626
package com.sun.java.swing.plaf.motif;
2727

28-
import javax.swing.*;
29-
30-
import javax.swing.plaf.UIResource;
31-
3228
import java.awt.Color;
3329
import java.awt.Component;
34-
import java.awt.Dimension;
3530
import java.awt.Graphics;
36-
import java.awt.Polygon;
37-
3831
import java.io.Serializable;
3932

33+
import javax.swing.AbstractButton;
34+
import javax.swing.ButtonModel;
35+
import javax.swing.Icon;
36+
import javax.swing.JCheckBox;
37+
import javax.swing.UIManager;
38+
import javax.swing.plaf.UIResource;
39+
4040
/**
4141
* Icon factory for the CDE/Motif Look and Feel
42-
* <p>
43-
* <strong>Warning:</strong>
44-
* Serialized objects of this class will not be compatible with
45-
* future Swing releases. The current serialization support is appropriate
46-
* for short term storage or RMI between applications running the same
47-
* version of Swing. A future release of Swing will provide support for
48-
* long term persistence.
4942
*
50-
* 1.20 04/27/99
5143
* @author Georges Saab
5244
*/
5345
@SuppressWarnings("serial") // Same-version serialization only

src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameUI.java

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,27 +25,29 @@
2525

2626
package com.sun.java.swing.plaf.motif;
2727

28-
import java.awt.*;
29-
import java.awt.event.*;
30-
import javax.swing.*;
31-
import javax.swing.event.*;
32-
33-
import java.util.EventListener;
34-
35-
import javax.swing.plaf.basic.*;
36-
import javax.swing.border.*;
37-
import javax.swing.plaf.*;
38-
28+
import java.awt.Color;
29+
import java.awt.Dimension;
30+
import java.awt.Toolkit;
31+
import java.awt.event.ActionEvent;
32+
import java.awt.event.KeyEvent;
33+
34+
import javax.swing.AbstractAction;
35+
import javax.swing.ActionMap;
36+
import javax.swing.InputMap;
37+
import javax.swing.JComponent;
38+
import javax.swing.JInternalFrame;
39+
import javax.swing.KeyStroke;
40+
import javax.swing.LookAndFeel;
41+
import javax.swing.SwingUtilities;
42+
import javax.swing.UIManager;
43+
import javax.swing.border.Border;
44+
import javax.swing.plaf.ActionMapUIResource;
45+
import javax.swing.plaf.ComponentUI;
46+
import javax.swing.plaf.UIResource;
47+
import javax.swing.plaf.basic.BasicInternalFrameUI;
3948

4049
/**
4150
* A Motif {@literal L&F} implementation of InternalFrame.
42-
* <p>
43-
* <strong>Warning:</strong>
44-
* Serialized objects of this class will not be compatible with
45-
* future Swing releases. The current serialization support is appropriate
46-
* for short term storage or RMI between applications running the same
47-
* version of Swing. A future release of Swing will provide support for
48-
* long term persistence.
4951
*
5052
* @author Tom Ball
5153
*/

src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifLabelUI.java

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,22 +25,15 @@
2525

2626
package com.sun.java.swing.plaf.motif;
2727

28-
import sun.awt.AppContext;
29-
30-
import javax.swing.*;
31-
import javax.swing.plaf.basic.BasicLabelUI;
28+
import javax.swing.JComponent;
3229
import javax.swing.plaf.ComponentUI;
30+
import javax.swing.plaf.basic.BasicLabelUI;
31+
32+
import sun.awt.AppContext;
3333

3434
/**
3535
* A Motif {@literal L&F} implementation of LabelUI.
3636
* This merely sets up new default values in MotifLookAndFeel.
37-
* <p>
38-
* <strong>Warning:</strong>
39-
* Serialized objects of this class will not be compatible with
40-
* future Swing releases. The current serialization support is appropriate
41-
* for short term storage or RMI between applications running the same
42-
* version of Swing. A future release of Swing will provide support for
43-
* long term persistence.
4437
*
4538
* @author Amy Fowler
4639
*/

0 commit comments

Comments
 (0)