Skip to content

Commit b335ea9

Browse files
committed
8347122: Add missing @serial tags to module java.desktop
Reviewed-by: prr
1 parent df28cec commit b335ea9

Some content is hidden

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

47 files changed

+173
-134
lines changed

src/java.desktop/share/classes/java/applet/Applet.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2025, 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
@@ -541,7 +541,7 @@ public void destroy() {
541541
//
542542

543543
/**
544-
* The accessible context associated with this {@code Applet}.
544+
* @serial The accessible context associated with this {@code Applet}.
545545
*/
546546
@SuppressWarnings("serial") // Not statically typed as Serializable
547547
AccessibleContext accessibleContext = null;

src/java.desktop/share/classes/java/awt/AWTEvent.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 2025, 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
@@ -87,7 +87,7 @@
8787
public abstract class AWTEvent extends EventObject {
8888

8989
/**
90-
* The private data.
90+
* @serial The private data.
9191
*/
9292
private byte[] bdata;
9393

src/java.desktop/share/classes/java/awt/AWTKeyStroke.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2025, 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
@@ -86,22 +86,22 @@ public class AWTKeyStroke implements Serializable {
8686
private static AWTKeyStroke APP_CONTEXT_KEYSTROKE_KEY = new AWTKeyStroke();
8787

8888
/**
89-
* The character value for a keyboard key.
89+
* @serial The character value for a keyboard key.
9090
*/
9191
private char keyChar = KeyEvent.CHAR_UNDEFINED;
9292

9393
/**
94-
* The key code for this {@code AWTKeyStroke}.
94+
* @serial The key code for this {@code AWTKeyStroke}.
9595
*/
9696
private int keyCode = KeyEvent.VK_UNDEFINED;
9797

9898
/**
99-
* The bitwise-ored combination of any modifiers.
99+
* @serial The bitwise-ored combination of any modifiers.
100100
*/
101101
private int modifiers;
102102

103103
/**
104-
* {@code true} if this {@code AWTKeyStroke} corresponds to a key release;
104+
* @serial {@code true} if this {@code AWTKeyStroke} corresponds to a key release;
105105
* {@code false} otherwise.
106106
*/
107107
private boolean onKeyRelease;

src/java.desktop/share/classes/java/awt/Component.java

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2025, 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
@@ -305,7 +305,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
305305
volatile Font font;
306306

307307
/**
308-
* The font which the peer is currently using.
308+
* @serial The font which the peer is currently using.
309309
* ({@code null} if no peer exists.)
310310
*/
311311
Font peerFont;
@@ -508,7 +508,7 @@ static class AWTTreeLock {}
508508
Dimension minSize;
509509

510510
/**
511-
* Whether or not setMinimumSize has been invoked with a non-null value.
511+
* @serial Whether or not setMinimumSize has been invoked with a non-null value.
512512
*/
513513
boolean minSizeSet;
514514

@@ -521,7 +521,7 @@ static class AWTTreeLock {}
521521
Dimension prefSize;
522522

523523
/**
524-
* Whether or not setPreferredSize has been invoked with a non-null value.
524+
* @serial Whether or not setPreferredSize has been invoked with a non-null value.
525525
*/
526526
boolean prefSizeSet;
527527

@@ -533,7 +533,7 @@ static class AWTTreeLock {}
533533
Dimension maxSize;
534534

535535
/**
536-
* Whether or not setMaximumSize has been invoked with a non-null value.
536+
* @serial Whether or not setMaximumSize has been invoked with a non-null value.
537537
*/
538538
boolean maxSizeSet;
539539

@@ -698,12 +698,12 @@ Object getObjectLock() {
698698
}
699699

700700
/**
701-
* Whether the component is packed or not;
701+
* @serial Whether the component is packed or not;
702702
*/
703703
boolean isPacked = false;
704704

705705
/**
706-
* Pseudoparameter for direct Geometry API (setLocation, setBounds setSize
706+
* @serial Pseudoparameter for direct Geometry API (setLocation, setBounds setSize
707707
* to signal setBounds what's changing. Should be used under TreeLock.
708708
* This is only needed due to the inability to change the cross-calling
709709
* order of public and deprecated methods.
@@ -8290,7 +8290,7 @@ public boolean isFocusOwner() {
82908290
}
82918291

82928292
/**
8293-
* Used to disallow auto-focus-transfer on disposal of the focus owner
8293+
* @serial Used to disallow auto-focus-transfer on disposal of the focus owner
82948294
* in the process of disposing its parent container.
82958295
*/
82968296
private boolean autoFocusTransferOnDisposal = true;
@@ -9234,6 +9234,7 @@ Window getContainingWindow() {
92349234

92359235
/**
92369236
* The {@code AccessibleContext} associated with this {@code Component}.
9237+
* @serial
92379238
*/
92389239
@SuppressWarnings("serial") // Not statically typed as Serializable
92399240
protected AccessibleContext accessibleContext = null;
@@ -9290,13 +9291,15 @@ protected AccessibleAWTComponent() {
92909291
/**
92919292
* A component listener to track show/hide/resize events
92929293
* and convert them to PropertyChange events.
9294+
* @serial
92939295
*/
92949296
@SuppressWarnings("serial") // Not statically typed as Serializable
92959297
protected ComponentListener accessibleAWTComponentHandler = null;
92969298

92979299
/**
92989300
* A listener to track focus events
92999301
* and convert them to PropertyChange events.
9302+
* @serial
93009303
*/
93019304
@SuppressWarnings("serial") // Not statically typed as Serializable
93029305
protected FocusListener accessibleAWTFocusHandler = null;

src/java.desktop/share/classes/java/awt/ComponentOrientation.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2025, 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
@@ -200,7 +200,7 @@ public static ComponentOrientation getOrientation(ResourceBundle bdl)
200200
}
201201

202202
/**
203-
* The bitwise-ored combination of flags.
203+
* @serial The bitwise-ored combination of flags.
204204
*/
205205
private int orientation;
206206

src/java.desktop/share/classes/java/awt/Container.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2025, 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
@@ -3853,6 +3853,7 @@ public Accessible getAccessibleAt(Point p) {
38533853
/**
38543854
* The handler to fire {@code PropertyChange}
38553855
* when children are added or removed
3856+
* @serial
38563857
*/
38573858
@SuppressWarnings("serial") // Not statically typed as Serializable
38583859
protected ContainerListener accessibleContainerHandler = null;

src/java.desktop/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2025, 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
@@ -66,12 +66,12 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
6666
private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.ContainerOrderFocusTraversalPolicy");
6767

6868
/**
69-
* This constant is used when the forward focus traversal order is active.
69+
* @serial This constant is used when the forward focus traversal order is active.
7070
*/
7171
private final int FORWARD_TRAVERSAL = 0;
7272

7373
/**
74-
* This constant is used when the backward focus traversal order is active.
74+
* @serial This constant is used when the backward focus traversal order is active.
7575
*/
7676
private final int BACKWARD_TRAVERSAL = 1;
7777

@@ -82,7 +82,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
8282
private static final long serialVersionUID = 486933713763926351L;
8383

8484
/**
85-
* Whether this {@code ContainerOrderFocusTraversalPolicy} transfers focus
85+
* @serial Whether this {@code ContainerOrderFocusTraversalPolicy} transfers focus
8686
* down-cycle implicitly.
8787
*/
8888
private boolean implicitDownCycleTraversal = true;

src/java.desktop/share/classes/java/awt/FlowLayout.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2025, 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
@@ -188,7 +188,7 @@ public class FlowLayout implements LayoutManager, java.io.Serializable {
188188
int vgap;
189189

190190
/**
191-
* If true, components will be aligned on their baseline.
191+
* @serial If true, components will be aligned on their baseline.
192192
*/
193193
private boolean alignOnBaseline;
194194

src/java.desktop/share/classes/java/awt/Frame.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2025, 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
@@ -347,7 +347,7 @@ public class Frame extends Window implements MenuContainer {
347347
boolean mbManagement = false; /* used only by the Motif impl. */
348348

349349
/**
350-
* The bitwise mask of frame state constants.
350+
* @serial The bitwise mask of frame state constants.
351351
*/
352352
// XXX: uwe: abuse old field for now
353353
// will need to take care of serialization

src/java.desktop/share/classes/java/awt/GridBagLayout.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2025, 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
@@ -473,7 +473,7 @@ public class GridBagLayout implements LayoutManager2,
473473
public double[] rowWeights;
474474

475475
/**
476-
* The component being positioned. This is set before calling into
476+
* @serial The component being positioned. This is set before calling into
477477
* {@code adjustForGravity}.
478478
*/
479479
private Component componentAdjusting;

src/java.desktop/share/classes/java/awt/GridBagLayoutInfo.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2006, 2025, 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
@@ -45,56 +45,56 @@ public final class GridBagLayoutInfo implements java.io.Serializable {
4545
private static final long serialVersionUID = -4899416460737170217L;
4646

4747
/**
48-
* The number of cells: horizontal and vertical.
48+
* @serial The number of cells: horizontal and vertical.
4949
*/
5050
int width, height;
5151

5252
/**
53-
* The starting point for layout.
53+
* @serial The starting point for layout.
5454
*/
5555
int startx, starty;
5656

5757
/**
58-
* The largest minWidth in each column.
58+
* @serial The largest minWidth in each column.
5959
*/
6060
int[] minWidth;
6161

6262
/**
63-
* The largest minHeight in each row.
63+
* @serial The largest minHeight in each row.
6464
*/
6565
int[] minHeight;
6666

6767
/**
68-
* The largest weight in each column.
68+
* @serial The largest weight in each column.
6969
*/
7070
double[] weightX;
7171

7272
/**
73-
* The largest weight in each row.
73+
* @serial The largest weight in each row.
7474
*/
7575
double[] weightY;
7676

7777
/**
78-
* Whether or not baseline layout has been requested and one of the
78+
* @serial Whether or not baseline layout has been requested and one of the
7979
* components has a valid baseline.
8080
*/
8181
boolean hasBaseline;
8282

8383
// These are only valid if hasBaseline is true and are indexed by
8484
// row.
8585
/**
86-
* The type of baseline for a particular row. A mix of the
86+
* @serial The type of baseline for a particular row. A mix of the
8787
* BaselineResizeBehavior constants {@code (1 << ordinal())}
8888
*/
8989
short[] baselineType;
9090

9191
/**
92-
* Max ascent (baseline).
92+
* @serial Max ascent (baseline).
9393
*/
9494
int[] maxAscent;
9595

9696
/**
97-
* Max descent (height - baseline)
97+
* @serial Max descent (height - baseline)
9898
*/
9999
int[] maxDescent;
100100

src/java.desktop/share/classes/java/awt/List.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2025, 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
@@ -1552,12 +1552,12 @@ protected class AccessibleAWTListChild extends AccessibleAWTComponent
15521552
// [[[FIXME]]] need to finish implementing this!!!
15531553

15541554
/**
1555-
* The parent {@code List}.
1555+
* @serial The parent {@code List}.
15561556
*/
15571557
private List parent;
15581558

15591559
/**
1560-
* The index in the parent.
1560+
* @serial The index in the parent.
15611561
*/
15621562
private int indexInParent;
15631563

src/java.desktop/share/classes/java/awt/MenuComponent.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2025, 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
@@ -436,7 +436,7 @@ private void readObject(ObjectInputStream s)
436436
* --- Accessibility Support ---
437437
*/
438438
/**
439-
* MenuComponent will contain all of the methods in interface Accessible,
439+
* @serial MenuComponent will contain all of the methods in interface Accessible,
440440
* though it won't actually implement the interface - that will be up
441441
* to the individual objects which extend MenuComponent.
442442
*/

src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2025, 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
@@ -140,7 +140,7 @@ public final class ScrollPaneAdjustable implements Adjustable, Serializable {
140140
private int blockIncrement = 1;
141141

142142
/**
143-
* Specified adjustment listener to receive adjustment events from this
143+
* @serial Specified adjustment listener to receive adjustment events from this
144144
* {@code ScrollPaneAdjustable}.
145145
*/
146146
@SuppressWarnings("serial") // Not statically typed as Serializable

0 commit comments

Comments
 (0)