Mercurial > hg > jdk9-shenandoah > jdk
changeset 12700:4473fc82087c
8133807: java.desktop docs: replace some invalid "@returns" tags
Reviewed-by: alexsch
line wrap: on
line diff
--- a/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeType.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.datatransfer/share/classes/java/awt/datatransfer/MimeType.java Thu Aug 27 18:09:09 2015 +0300 @@ -224,7 +224,7 @@ * Set the value to be associated with the given name, replacing * any previous association. * - * @throw IllegalArgumentException if parameter or value is illegal + * @throws IllegalArgumentException if parameter or value is illegal */ public void setParameter(String name, String value) { parameters.set(name, value); @@ -233,7 +233,7 @@ /** * Remove any value associated with the given name. * - * @throw IllegalArgumentException if parameter may not be deleted + * @throws IllegalArgumentException if parameter may not be deleted */ public void removeParameter(String name) { parameters.remove(name);
--- a/src/java.desktop/share/classes/java/awt/MultipleGradientPaintContext.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/share/classes/java/awt/MultipleGradientPaintContext.java Thu Aug 27 18:09:09 2015 +0300 @@ -517,7 +517,7 @@ * * @param position the unmanipulated position, which will be mapped * into the range 0 to 1 - * @returns integer color to display + * @return integer color to display */ protected final int indexIntoGradientsArrays(float position) { // first, manipulate position value depending on the cycle method
--- a/src/java.desktop/share/classes/java/awt/Toolkit.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/share/classes/java/awt/Toolkit.java Thu Aug 27 18:09:09 2015 +0300 @@ -448,7 +448,7 @@ * * @param s the error message * @param e the original exception - * @throw the new AWTError including the cause (the original exception) + * @throws the new AWTError including the cause (the original exception) */ private static void newAWTError(Throwable e, String s) { AWTError newAWTError = new AWTError(s);
--- a/src/java.desktop/share/classes/javax/swing/plaf/LayerUI.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/share/classes/javax/swing/plaf/LayerUI.java Thu Aug 27 18:09:09 2015 +0300 @@ -90,7 +90,7 @@ * and set the layer event mask to {@code 0} * in {@link #uninstallUI(javax.swing.JComponent)} after that. * By default this method calls the appropriate - * {@code process<event type>Event} + * {@code process<event} {@code type>Event} * method for the given class of event. * <p> * <b>Note:</b> Events are processed only for displayable {@code JLayer}s.
--- a/src/java.desktop/share/classes/javax/swing/text/rtf/RTFReader.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/share/classes/javax/swing/text/rtf/RTFReader.java Thu Aug 27 18:09:09 2015 +0300 @@ -298,8 +298,8 @@ * Handles a parameterless RTF keyword. This is called by the superclass * (RTFParser) when a keyword is found in the input stream. * - * @returns <code>true</code> if the keyword is recognized and handled; - * <code>false</code> otherwise + * @return true if the keyword is recognized and handled; + * false otherwise * @see RTFParser#handleKeyword */ public boolean handleKeyword(String keyword) @@ -444,8 +444,8 @@ * This is called by the superclass * (RTFParser) when a keyword is found in the input stream. * - * @returns <code>true</code> if the keyword is recognized and handled; - * <code>false</code> otherwise + * @return true if the keyword is recognized and handled; + * false otherwise * @see RTFParser#handleKeyword */ public boolean handleKeyword(String keyword, int parameter) @@ -553,7 +553,7 @@ * array of characters, mapping unsigned byte values to their Unicode * equivalents. The character set is loaded if necessary. * - * @returns the character set + * @return the character set */ public static Object getCharacterSet(final String name) @@ -577,7 +577,7 @@ * must contain 256 decimal integers, separated by whitespace, with * no punctuation. B- and C- style comments are allowed. * - * @returns the newly read character set + * @return the newly read character set */ static char[] readCharset(InputStream strm) throws IOException @@ -1349,7 +1349,7 @@ * Calculates the current text (character) attributes in a form suitable * for SwingText from the current parser state. * - * @returns a new MutableAttributeSet containing the text attributes. + * @return a new MutableAttributeSet containing the text attributes. */ MutableAttributeSet currentTextAttributes() { @@ -1410,7 +1410,7 @@ * Calculates the current paragraph attributes (with keys * as given in StyleConstants) from the current parser state. * - * @returns a newly created MutableAttributeSet. + * @return a newly created MutableAttributeSet. * @see StyleConstants */ MutableAttributeSet currentParagraphAttributes() @@ -1449,7 +1449,7 @@ * Calculates the current section attributes * from the current parser state. * - * @returns a newly created MutableAttributeSet. + * @return a newly created MutableAttributeSet. */ public AttributeSet currentSectionAttributes() {
--- a/src/java.desktop/share/classes/sun/awt/shell/DefaultShellFolder.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/share/classes/sun/awt/shell/DefaultShellFolder.java Thu Aug 27 18:09:09 2015 +0300 @@ -50,7 +50,7 @@ * this default implementation can always be represented with a * <code>java.io.File</code> object instead. * - * @returns a <code>java.io.File</code> replacement object. + * @return a java.io.File replacement object. */ protected Object writeReplace() throws java.io.ObjectStreamException { return new File(getPath());
--- a/src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java Thu Aug 27 18:09:09 2015 +0300 @@ -67,8 +67,8 @@ * <code>java.io.File</code> instead. If not, then the object is most likely * depending on some internal (native) state and cannot be serialized. * - * @returns a <code>java.io.File</code> replacement object, or <code>null</code> - * if no suitable replacement can be found. + * @return a java.io.File replacement object, or null + * if no suitable replacement can be found. */ protected abstract Object writeReplace() throws java.io.ObjectStreamException;
--- a/src/java.desktop/share/classes/sun/print/PSPrinterJob.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/share/classes/sun/print/PSPrinterJob.java Thu Aug 27 18:09:09 2015 +0300 @@ -419,8 +419,8 @@ /** * Presents the user a dialog for changing properties of the * print job interactively. - * @returns false if the user cancels the dialog and - * true otherwise. + * @return false if the user cancels the dialog and + * true otherwise. * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless
--- a/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java Thu Aug 27 18:09:09 2015 +0300 @@ -964,8 +964,8 @@ /** * Presents the user a dialog for changing properties of the * print job interactively. - * @returns false if the user cancels the dialog and - * true otherwise. + * @return false if the user cancels the dialog and + * true otherwise. * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless
--- a/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDDragSourceProtocol.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDDragSourceProtocol.java Thu Aug 27 18:09:09 2015 +0300 @@ -96,7 +96,7 @@ /** * Processes the specified client message event. * - * @returns true if the event was successfully processed. + * @return true if the event was successfully processed. */ public boolean processClientMessage(XClientMessageEvent xclient) { if (xclient.get_message_type() !=
--- a/src/java.desktop/unix/classes/sun/awt/X11/XDnDDragSourceProtocol.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/unix/classes/sun/awt/X11/XDnDDragSourceProtocol.java Thu Aug 27 18:09:09 2015 +0300 @@ -68,7 +68,7 @@ /** * Performs protocol-specific drag initialization. * - * @returns true if the initialized successfully. + * @return true if the initialized successfully. */ protected void initializeDragImpl(int actions, Transferable contents, Map<Long, DataFlavor> formatMap, long[] formats)
--- a/src/java.desktop/unix/classes/sun/awt/X11/XDragSourceContextPeer.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/unix/classes/sun/awt/X11/XDragSourceContextPeer.java Thu Aug 27 18:09:09 2015 +0300 @@ -379,7 +379,7 @@ /** * Updates the source action according to the specified state. * - * @returns true if the source + * @return true if the source */ private boolean updateSourceAction(int state) { int action = SunDragSourceContextPeer.convertModifiersToDropAction(XWindow.getModifiers(state, 0, 0), @@ -570,7 +570,7 @@ /** * The caller must own awtLock. * - * @returns true if the even was processed and shouldn't be passed along. + * @return true if the event was processed and shouldn't be passed along. */ private boolean doProcessEvent(XEvent ev) { assert XToolkit.isAWTLockHeldByCurrentThread();
--- a/src/java.desktop/unix/classes/sun/awt/X11/XDragSourceProtocol.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/unix/classes/sun/awt/X11/XDragSourceProtocol.java Thu Aug 27 18:09:09 2015 +0300 @@ -140,7 +140,7 @@ /** * Processes the specified client message event. * - * @returns true if the event was successfully processed. + * @return true if the event was successfully processed. */ public abstract boolean processClientMessage(XClientMessageEvent xclient) throws XException;
--- a/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java Thu Aug 27 18:09:09 2015 +0300 @@ -293,7 +293,7 @@ /** * Query and then return the current composition state. - * @returns the composition state if isCompositionEnabled call + * @return the composition state if isCompositionEnabled call * is successful. Otherwise, it returns false. */ private boolean getCompositionState() {
--- a/src/java.desktop/windows/classes/sun/awt/Win32GraphicsEnvironment.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/windows/classes/sun/awt/Win32GraphicsEnvironment.java Thu Aug 27 18:09:09 2015 +0300 @@ -97,14 +97,14 @@ * Returns the number of pixels per logical inch along the screen width. * In a system with multiple display monitors, this value is the same for * all monitors. - * @returns number of pixels per logical inch in X direction + * @return number of pixels per logical inch in X direction */ public native int getXResolution(); /** * Returns the number of pixels per logical inch along the screen height. * In a system with multiple display monitors, this value is the same for * all monitors. - * @returns number of pixels per logical inch in Y direction + * @return number of pixels per logical inch in Y direction */ public native int getYResolution();
--- a/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java Thu Aug 27 18:09:09 2015 +0300 @@ -556,8 +556,8 @@ /** * Presents the user a dialog for changing properties of the * print job interactively. - * @returns false if the user cancels the dialog and - * true otherwise. + * @return false if the user cancels the dialog and + * true otherwise. * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless
--- a/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java Wed Aug 26 09:07:21 2015 -0700 +++ b/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java Thu Aug 27 18:09:09 2015 +0300 @@ -201,8 +201,8 @@ * - it's one of the classes likely to have custom rendering worth * accelerating * - * @returns true if we can use a d3d surface for this peer's onscreen - * rendering + * @return true if we can use a d3d surface for this peer's onscreen + * rendering */ public static boolean canUseD3DOnScreen(final WComponentPeer peer, final Win32GraphicsConfig gc,