8278254: Cleanup doclint warnings in java.desktop module

Reviewed-by: aivanov, serb
This commit is contained in:
Prasanta Sadhukhan 2022-02-02 10:04:50 +00:00
parent de826ba18a
commit ae2504b469
19 changed files with 251 additions and 82 deletions

@ -33,7 +33,6 @@ package java.awt;
* @author Michael Martak
* @since 1.4
*/
@SuppressWarnings("doclint:missing")
public class BufferCapabilities implements Cloneable {
private ImageCapabilities frontCaps;
@ -63,6 +62,8 @@ public class BufferCapabilities implements Cloneable {
}
/**
* Returns the image capabilities of the front (displayed) buffer.
*
* @return the image capabilities of the front (displayed) buffer
*/
public ImageCapabilities getFrontBufferCapabilities() {
@ -70,6 +71,9 @@ public class BufferCapabilities implements Cloneable {
}
/**
* Returns the image capabilities of all back buffers (intermediate buffers
* are considered back buffers).
*
* @return the image capabilities of all back buffers (intermediate buffers
* are considered back buffers)
*/
@ -78,27 +82,31 @@ public class BufferCapabilities implements Cloneable {
}
/**
* @return whether or not the buffer strategy uses page flipping; a set of
* buffers that uses page flipping
* Returns whether or not the buffer strategy uses page flipping.
* A set of buffers that uses page flipping
* can swap the contents internally between the front buffer and one or
* more back buffers by switching the video pointer (or by copying memory
* internally). A non-flipping set of
* buffers uses blitting to copy the contents from one buffer to
* another; when this is the case, {@code getFlipContents} returns
* {@code null}
* {@code null}.
*
* @return whether or not the buffer strategy uses page flipping
*/
public boolean isPageFlipping() {
return (getFlipContents() != null);
}
/**
* @return the resulting contents of the back buffer after page-flipping.
* Returns the resulting contents of the back buffer after page-flipping.
* This value is {@code null} when the {@code isPageFlipping}
* returns {@code false}, implying blitting. It can be one of
* {@code FlipContents.UNDEFINED}
* (the assumed default), {@code FlipContents.BACKGROUND},
* {@code FlipContents.PRIOR}, or
* {@code FlipContents.COPIED}.
*
* @return the resulting contents of the back buffer after page-flipping
* @see #isPageFlipping
* @see FlipContents#UNDEFINED
* @see FlipContents#BACKGROUND
@ -110,9 +118,11 @@ public class BufferCapabilities implements Cloneable {
}
/**
* @return whether page flipping is only available in full-screen mode. If this
* Returns whether page flipping is only available in full-screen mode. If this
* is {@code true}, full-screen exclusive mode is required for
* page-flipping.
*
* @return whether page flipping is only available in full-screen mode
* @see #isPageFlipping
* @see GraphicsDevice#setFullScreenWindow
*/
@ -121,9 +131,12 @@ public class BufferCapabilities implements Cloneable {
}
/**
* @return whether or not
* Returns whether or not
* page flipping can be performed using more than two buffers (one or more
* intermediate buffers as well as the front and back buffer).
*
* @return whether or not
* page flipping can be performed using more than two buffers
* @see #isPageFlipping
*/
public boolean isMultiBufferAvailable() {

@ -214,7 +214,6 @@ import static sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.VSYNC_ON;
* @author Arthur van Hoff
* @author Sami Shaio
*/
@SuppressWarnings("doclint:missing")
public abstract class Component implements ImageObserver, MenuContainer,
Serializable
{
@ -4133,7 +4132,9 @@ public abstract class Component implements ImageObserver, MenuContainer,
}
/**
* @return direct access to the back buffer, as an image.
* Provides direct access to the back buffer as an image.
*
* @return the back buffer as an image
* @exception IllegalStateException if the buffers have not yet
* been created
*/
@ -4693,9 +4694,12 @@ public abstract class Component implements ImageObserver, MenuContainer,
}
/**
* @return whether or not paint messages received from the operating system
* Returns whether or not paint messages received from the operating system
* should be ignored.
*
* @return whether or not paint messages received from the operating system
* should be ignored
*
* @since 1.4
* @see #setIgnoreRepaint
*/

@ -151,7 +151,6 @@ import sun.awt.AWTAccessor;
*
* @since 1.1
*/
@SuppressWarnings("doclint:missing")
public class KeyEvent extends InputEvent {
/**
@ -650,53 +649,142 @@ public class KeyEvent extends InputEvent {
public static final int VK_KP_RIGHT = 0xE3;
/* For European keyboards */
/** @since 1.2 */
/**
* Constant for the Dead Grave key.
* @since 1.2
*/
public static final int VK_DEAD_GRAVE = 0x80;
/** @since 1.2 */
/**
* Constant for the Dead Acute key.
* @since 1.2
*/
public static final int VK_DEAD_ACUTE = 0x81;
/** @since 1.2 */
/**
* Constant for the Dead Circumflex key.
* @since 1.2
*/
public static final int VK_DEAD_CIRCUMFLEX = 0x82;
/** @since 1.2 */
/**
* Constant for the Dead Tilde key.
* @since 1.2
*/
public static final int VK_DEAD_TILDE = 0x83;
/** @since 1.2 */
/**
* Constant for the Dead Macron key.
* @since 1.2
*/
public static final int VK_DEAD_MACRON = 0x84;
/** @since 1.2 */
/**
* Constant for the Dead Breve key.
* @since 1.2
*/
public static final int VK_DEAD_BREVE = 0x85;
/** @since 1.2 */
/**
* Constant for the Dead Above Dot key.
* @since 1.2
*/
public static final int VK_DEAD_ABOVEDOT = 0x86;
/** @since 1.2 */
/**
* Constant for the Dead Diaeresis key.
* @since 1.2
*/
public static final int VK_DEAD_DIAERESIS = 0x87;
/** @since 1.2 */
/**
* Constant for the Dead Above Ring key.
* @since 1.2
*/
public static final int VK_DEAD_ABOVERING = 0x88;
/** @since 1.2 */
/**
* Constant for the Dead Double Acute key.
* @since 1.2
*/
public static final int VK_DEAD_DOUBLEACUTE = 0x89;
/** @since 1.2 */
/**
* Constant for the Dead Caron key.
* @since 1.2
*/
public static final int VK_DEAD_CARON = 0x8a;
/** @since 1.2 */
/**
* Constant for the Dead Cedilla key.
* @since 1.2
*/
public static final int VK_DEAD_CEDILLA = 0x8b;
/** @since 1.2 */
/**
* Constant for the Dead Ogonek key.
* @since 1.2
*/
public static final int VK_DEAD_OGONEK = 0x8c;
/** @since 1.2 */
/**
* Constant for the Dead Iota key.
* @since 1.2
*/
public static final int VK_DEAD_IOTA = 0x8d;
/** @since 1.2 */
/**
* Constant for the Dead Voiced Sound key.
* @since 1.2
*/
public static final int VK_DEAD_VOICED_SOUND = 0x8e;
/** @since 1.2 */
/**
* Constant for the Dead Semivoiced Sound key.
* @since 1.2
*/
public static final int VK_DEAD_SEMIVOICED_SOUND = 0x8f;
/** @since 1.2 */
/**
* Constant for the "&" key.
* @since 1.2
*/
public static final int VK_AMPERSAND = 0x96;
/** @since 1.2 */
/**
* Constant for the "*" key.
* @since 1.2
*/
public static final int VK_ASTERISK = 0x97;
/** @since 1.2 */
/**
* Constant for the """" key.
* @since 1.2
*/
public static final int VK_QUOTEDBL = 0x98;
/** @since 1.2 */
/**
* Constant for the "<" key.
* @since 1.2
*/
public static final int VK_LESS = 0x99;
/** @since 1.2 */
/**
* Constant for the ">" key.
* @since 1.2
*/
public static final int VK_GREATER = 0xa0;
/** @since 1.2 */
/**
* Constant for the "{" key.
* @since 1.2
*/
public static final int VK_BRACELEFT = 0xa1;
/** @since 1.2 */
/**
* Constant for the "}" key.
* @since 1.2
*/
public static final int VK_BRACERIGHT = 0xa2;
/**
@ -926,21 +1014,52 @@ public class KeyEvent extends InputEvent {
public static final int VK_INPUT_METHOD_ON_OFF = 0x0107;
/* for Sun keyboards */
/** @since 1.2 */
/**
* Constant for the Cut key.
* @since 1.2
*/
public static final int VK_CUT = 0xFFD1;
/** @since 1.2 */
/**
* Constant for the Copy key.
* @since 1.2
*/
public static final int VK_COPY = 0xFFCD;
/** @since 1.2 */
/**
* Constant for the Paste key.
* @since 1.2
*/
public static final int VK_PASTE = 0xFFCF;
/** @since 1.2 */
/**
* Constant for the Undo key.
* @since 1.2
*/
public static final int VK_UNDO = 0xFFCB;
/** @since 1.2 */
/**
* Constant for the Again key.
* @since 1.2
*/
public static final int VK_AGAIN = 0xFFC9;
/** @since 1.2 */
/**
* Constant for the Find key.
* @since 1.2
*/
public static final int VK_FIND = 0xFFD0;
/** @since 1.2 */
/**
* Constant for the Props key.
* @since 1.2
*/
public static final int VK_PROPS = 0xFFCA;
/** @since 1.2 */
/**
* Constant for the Stop key.
* @since 1.2
*/
public static final int VK_STOP = 0xFFC8;
/**

@ -54,7 +54,6 @@ import java.util.TooManyListenersException;
* @author Laurence P. G. Cable
* @since 1.2
*/
@SuppressWarnings("doclint:missing")
public class BeanContextServicesSupport extends BeanContextSupport
implements BeanContextServices {
@ -157,6 +156,10 @@ public class BeanContextServicesSupport extends BeanContextSupport
* when the BeanContextSupport is serialized.
*/
/**
* A protected nested class containing per-child information
* in the {@code children} hashtable.
*/
protected class BCSSChild extends BeanContextSupport.BCSChild {
/**
@ -787,6 +790,10 @@ public class BeanContextServicesSupport extends BeanContextSupport
* to an enclosing BeanContext.
*/
/**
* Subclasses may subclass this nested class to represent a proxy for
* each BeanContextServiceProvider.
*/
protected class BCSSProxyServiceProvider implements BeanContextServiceProvider, BeanContextServiceRevokedListener {
BCSSProxyServiceProvider(BeanContextServices bcs) {

@ -59,7 +59,6 @@ import java.util.Map;
* @author Laurence P. G. Cable
* @since 1.2
*/
@SuppressWarnings("doclint:missing")
public class BeanContextSupport extends BeanContextChildSupport
implements BeanContext,
Serializable,
@ -305,13 +304,17 @@ public class BeanContextSupport extends BeanContextChildSupport
* when the BeanContextSupport is serialized.
*/
/**
* A protected nested class containing per-child information
* in the {@code children} hashtable.
*/
protected class BCSChild implements Serializable {
/**
* Use serialVersionUID from JDK 1.7 for interoperability.
*/
@Serial
private static final long serialVersionUID = -5815286101609939109L;
/**
* Use serialVersionUID from JDK 1.7 for interoperability.
*/
@Serial
private static final long serialVersionUID = -5815286101609939109L;
BCSChild(Object bcc, Object peer) {
super();

@ -50,8 +50,7 @@ import javax.swing.event.*;
* @see ListSelectionModel
* @since 1.2
*/
@SuppressWarnings({"serial", // Same-version serialization only
"doclint:missing"})
@SuppressWarnings({"serial"}) // Same-version serialization only
public class DefaultListSelectionModel implements ListSelectionModel, Cloneable, Serializable
{
private static final int MIN = -1;
@ -206,6 +205,11 @@ public class DefaultListSelectionModel implements ListSelectionModel, Cloneable,
}
/**
* Notifies <code>ListSelectionListeners</code> that the value
* of the selection, in the closed interval <code>firstIndex</code>,
* <code>lastIndex</code>, has changed and if this is the final change
* in the series of adjustments.
*
* @param firstIndex the first index in the interval
* @param lastIndex the last index in the interval
* @param isAdjusting true if this is the final change in a series of

@ -99,13 +99,15 @@ import javax.accessibility.AccessibleContext;
@Deprecated(since = "9", forRemoval = true)
@JavaBean(defaultProperty = "JMenuBar", description = "Swing's Applet subclass.")
@SwingContainer(delegate = "getContentPane")
@SuppressWarnings({"serial", "removal", // Same-version serialization only
"doclint:missing"})
@SuppressWarnings({"serial", "removal"}) // Same-version serialization only
public class JApplet extends Applet implements Accessible,
RootPaneContainer,
TransferHandler.HasGetTransferHandler
{
/**
* The <code>JRootPane</code> instance that manages the
* <code>contentPane</code>.
*
* @see #getRootPane
* @see #setRootPane
*/

@ -95,8 +95,7 @@ import javax.accessibility.*;
*/
@JavaBean(defaultProperty = "JMenuBar", description = "A toplevel window for creating dialog boxes.")
@SwingContainer(delegate = "getContentPane")
@SuppressWarnings({"serial", // Same-version serialization only
"doclint:missing"})
@SuppressWarnings({"serial"}) // Same-version serialization only
public class JDialog extends Dialog implements WindowConstants,
Accessible,
RootPaneContainer,
@ -112,6 +111,9 @@ public class JDialog extends Dialog implements WindowConstants,
private int defaultCloseOperation = HIDE_ON_CLOSE;
/**
* The <code>JRootPane</code> instance that manages the
* <code>contentPane</code>.
*
* @see #getRootPane
* @see #setRootPane
*/

@ -83,8 +83,7 @@ import javax.swing.plaf.ScrollBarUI;
*/
@JavaBean(defaultProperty = "UI", description = "A component that helps determine the visible content range of an area.")
@SwingContainer(false)
@SuppressWarnings({"serial", // Same-version serialization only
"doclint:missing"})
@SuppressWarnings({"serial"}) // Same-version serialization only
public class JScrollBar extends JComponent implements Adjustable, Accessible
{
/**
@ -109,18 +108,26 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
/**
* Orientation of this scrollBar.
*
* @see #setOrientation
*/
protected int orientation;
/**
* Stores the amount by which the value of the scrollbar is changed
* upon a unit up/down request.
*
* @see #setUnitIncrement
*/
protected int unitIncrement;
/**
* Stores the amount by which the value of the scrollbar is changed
* upon a block (usually "page") up/down request.
*
* @see #setBlockIncrement
*/
protected int blockIncrement;

@ -65,7 +65,6 @@ import sun.awt.shell.ShellFolder;
// PENDING(jeff) - need to provide a specification for
// how Mac/OS2/BeOS/etc file systems can modify FileSystemView
// to handle their particular type of file system.
@SuppressWarnings("doclint:missing")
public abstract class FileSystemView {
static FileSystemView windowsFileSystemView = null;
@ -348,13 +347,14 @@ public abstract class FileSystemView {
}
/**
* Returns a <code>File</code> object which is normally constructed with <code>new
* File(parent, fileName)</code> except when the parent and child are both
* special folders, in which case the <code>File</code> is a wrapper containing
* a ShellFolder object.
*
* @param parent a <code>File</code> object representing a directory or special folder
* @param fileName a name of a file or folder which exists in <code>parent</code>
* @return a File object. This is normally constructed with <code>new
* File(parent, fileName)</code> except when parent and child are both
* special folders, in which case the <code>File</code> is a wrapper containing
* a <code>ShellFolder</code> object.
* @return a File object.
* @since 1.4
*/
public File getChild(File parent, String fileName) {

@ -45,7 +45,6 @@ import sun.swing.*;
* @author Arnaud Weber
* @author Fredrik Lagerblad
*/
@SuppressWarnings("doclint:missing")
public class BasicMenuItemUI extends MenuItemUI
{
/**
@ -257,6 +256,7 @@ public class BasicMenuItemUI extends MenuItemUI
}
/**
* Registers the subcomponents of the menu.
*
* @param menuItem a menu item
* @since 1.3

@ -46,7 +46,6 @@ import java.util.ArrayList;
* @author David Karlton
* @author Arnaud Weber
*/
@SuppressWarnings("doclint:missing")
public class BasicMenuUI extends BasicMenuItemUI
{
/**

@ -47,7 +47,6 @@ import sun.swing.SwingUtilities2;
* Factory object that can vend Borders appropriate for the metal L &amp; F.
* @author Steve Wilson
*/
@SuppressWarnings("doclint:missing")
public class MetalBorders {
/**
@ -926,7 +925,7 @@ public class MetalBorders {
}
/**
* The class represents the border of a {@code JTestField}.
* Border for a {@code JTextField}.
*/
@SuppressWarnings("serial") // Superclass is not serializable across versions
public static class TextFieldBorder extends Flush3DBorder {
@ -1027,6 +1026,8 @@ public class MetalBorders {
}
/**
* Border for a {@code JToggleButton}.
*
* @since 1.3
*/
@SuppressWarnings("serial") // Superclass is not serializable across versions

@ -28,12 +28,13 @@ import java.awt.Graphics;
import java.awt.Shape;
/**
* Implementation of {@code Highlighter} interface to mark up the
* background of leaf views with colored areas.
*
* @author Scott Violet
* @author Timothy Prinzing
* @see Highlighter
*/
@SuppressWarnings("doclint:missing")
public abstract class LayeredHighlighter implements Highlighter {
/**
* Constructor for subclasses to call.
@ -68,6 +69,8 @@ public abstract class LayeredHighlighter implements Highlighter {
protected LayerPainter() {}
/**
* Paints a portion of a highlight.
*
* @return a shape
* @param g Graphics used to draw
* @param p0 starting offset of view

@ -43,7 +43,6 @@ import javax.swing.text.StyleContext;
* @author Sunita Mani
*
*/
@SuppressWarnings("doclint:missing")
public class HTML {
/**
@ -60,7 +59,11 @@ public class HTML {
*/
public static class Tag {
/** @since 1.3 */
/**
* Constructs a {@code Tag}.
*
* @since 1.3
*/
public Tag() {}
/**

@ -216,8 +216,7 @@ import static java.nio.charset.StandardCharsets.ISO_8859_1;
*
* @author Timothy Prinzing
*/
@SuppressWarnings({"serial", // Same-version serialization only
"doclint:missing"})
@SuppressWarnings({"serial"}) // Same-version serialization only
public class HTMLEditorKit extends StyledEditorKit implements Accessible {
private JEditorPane theEditor;
@ -1684,6 +1683,8 @@ public class HTMLEditorKit extends StyledEditorKit implements Accessible {
}
/**
* Returns <code>HTMLDocument</code> of the given <code>JEditorPane</code>.
*
* @param e the JEditorPane
* @return HTMLDocument of <code>e</code>.
*/
@ -1696,6 +1697,8 @@ public class HTMLEditorKit extends StyledEditorKit implements Accessible {
}
/**
* Returns <code>HTMLEditorKit</code> of the given <code>JEditorPane</code>.
*
* @param e the JEditorPane
* @return HTMLEditorKit for <code>e</code>.
*/

@ -44,8 +44,7 @@ import java.io.*;
* @author Arthur Van Hoff
*
*/
@SuppressWarnings({"serial", // Same-version serialization only
"doclint:missing"})
@SuppressWarnings({"serial"}) // Same-version serialization only
public final
class AttributeList implements DTDConstants, Serializable {
@ -111,14 +110,14 @@ class AttributeList implements DTDConstants, Serializable {
}
/**
* @return attribute name
* {@return the attribute name}
*/
public String getName() {
return name;
}
/**
* @return attribute type
* {@return the attribute type}
* @see DTDConstants
*/
public int getType() {
@ -126,7 +125,7 @@ class AttributeList implements DTDConstants, Serializable {
}
/**
* @return attribute modifier
* {@return the attribute modifier}
* @see DTDConstants
*/
public int getModifier() {
@ -134,21 +133,21 @@ class AttributeList implements DTDConstants, Serializable {
}
/**
* @return possible attribute values
* {@return possible attribute values}
*/
public Enumeration<?> getValues() {
return (values != null) ? values.elements() : null;
}
/**
* @return default attribute value
* {@return default attribute value}
*/
public String getValue() {
return value;
}
/**
* @return the next attribute in the list
* {@return the next attribute in the list}
*/
public AttributeList getNext() {
return next;

@ -75,7 +75,6 @@ import java.net.URL;
* @author Arthur van Hoff
* @author Sunita Mani
*/
@SuppressWarnings("doclint:missing")
public
class Parser implements DTDConstants {
@ -211,6 +210,8 @@ class Parser implements DTDConstants {
/**
* Returns the line number of the line currently being parsed.
*
* @return the line number of the line currently being parsed
*/
protected int getCurrentLine() {

@ -33,7 +33,6 @@ import java.util.*;
*
* @author Ray Ryan
*/
@SuppressWarnings("doclint:missing")
public class UndoableEditSupport {
/**
* The update level.
@ -148,7 +147,7 @@ public class UndoableEditSupport {
}
/**
*
* Starts a compound edit update.
*/
public synchronized void beginUpdate() {
if (updateLevel == 0) {