From ed756b970066493db85da50ace317ef977186acc Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Sat, 12 Apr 2025 23:36:27 +0000 Subject: [PATCH] 8352922: Refactor client classes javadoc to use @throws instead of @exception Reviewed-by: prr --- .../codepointim/CodePointInputMethodDescriptor.java | 2 +- src/java.desktop/aix/classes/sun/awt/X11InputMethod.java | 2 +- .../com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java | 2 +- .../macosx/classes/sun/lwawt/macosx/CInputMethod.java | 6 +++--- .../macosx/classes/sun/lwawt/macosx/CPrinterJob.java | 4 ++-- src/java.desktop/unix/classes/sun/awt/X11InputMethod.java | 2 +- .../unix/classes/sun/awt/X11InputMethodBase.java | 2 +- src/java.desktop/unix/classes/sun/awt/XSettings.java | 2 +- .../windows/classes/sun/awt/windows/WPrinterJob.java | 4 ++-- .../com/sun/java/accessibility/internal/AccessBridge.java | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/demo/share/jfc/CodePointIM/com/sun/inputmethods/internal/codepointim/CodePointInputMethodDescriptor.java b/src/demo/share/jfc/CodePointIM/com/sun/inputmethods/internal/codepointim/CodePointInputMethodDescriptor.java index 320a1ce7e66..b608c924942 100644 --- a/src/demo/share/jfc/CodePointIM/com/sun/inputmethods/internal/codepointim/CodePointInputMethodDescriptor.java +++ b/src/demo/share/jfc/CodePointIM/com/sun/inputmethods/internal/codepointim/CodePointInputMethodDescriptor.java @@ -63,7 +63,7 @@ public class CodePointInputMethodDescriptor implements InputMethodDescriptor { * Creates a new instance of the Code Point input method. * * @return a new instance of the Code Point input method - * @exception Exception any exception that may occur while creating the + * @throws Exception any exception that may occur while creating the * input method instance */ public InputMethod createInputMethod() throws Exception { diff --git a/src/java.desktop/aix/classes/sun/awt/X11InputMethod.java b/src/java.desktop/aix/classes/sun/awt/X11InputMethod.java index 1db3257af75..93098a04842 100644 --- a/src/java.desktop/aix/classes/sun/awt/X11InputMethod.java +++ b/src/java.desktop/aix/classes/sun/awt/X11InputMethod.java @@ -49,7 +49,7 @@ public abstract class X11InputMethod extends X11InputMethodBase { * Constructs an X11InputMethod instance. It initializes the XIM * environment if it's not done yet. * - * @exception AWTException if XOpenIM() failed. + * @throws AWTException if XOpenIM() failed. */ public X11InputMethod() throws AWTException { super(); diff --git a/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java b/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java index 7aa5fe67d58..3106a73e7eb 100644 --- a/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java +++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java @@ -638,7 +638,7 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing * Returns the baseline for the specified tab. * * @param tab index of tab to get baseline for - * @exception IndexOutOfBoundsException if index is out of range + * @throws IndexOutOfBoundsException if index is out of range * (index < 0 || index >= tab count) * @return baseline or a value < 0 indicating there is no reasonable * baseline diff --git a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java index 64d8a101d69..c0804dbbbd0 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java @@ -101,7 +101,7 @@ public class CInputMethod extends InputMethodAdapter { * method. * * @param context the input method context for this input method - * @exception NullPointerException if {@code context} is null + * @throws NullPointerException if {@code context} is null */ public void setInputMethodContext(InputMethodContext context) { fIMContext = context; @@ -124,7 +124,7 @@ public class CInputMethod extends InputMethodAdapter { * * @param lang locale to input * @return whether the specified locale is supported - * @exception NullPointerException if {@code locale} is null + * @throws NullPointerException if {@code locale} is null */ public boolean setLocale(Locale lang) { return setLocale(lang, false); @@ -216,7 +216,7 @@ public class CInputMethod extends InputMethodAdapter { * This method is called by {@link java.awt.im.InputContext#dispatchEvent InputContext.dispatchEvent}. * * @param event the event being dispatched to the input method - * @exception NullPointerException if {@code event} is null + * @throws NullPointerException if {@code event} is null */ public void dispatchEvent(final AWTEvent event) { // No-op for Mac OS X. diff --git a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java index a336f427812..cb7333c79d6 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java @@ -101,7 +101,7 @@ public final class CPrinterJob extends RasterPrinterJob { * selected by the user. * @return {@code true} if the user does not cancel the dialog; * {@code false} otherwise. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -143,7 +143,7 @@ public final class CPrinterJob extends RasterPrinterJob { * is cancelled; a new {@code PageFormat} object * containing the format indicated by the user if the * dialog is acknowledged. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.2 diff --git a/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java b/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java index 3b556533bc2..fc88957fba8 100644 --- a/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java +++ b/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java @@ -45,7 +45,7 @@ public abstract class X11InputMethod extends X11InputMethodBase { * Constructs an X11InputMethod instance. It initializes the XIM * environment if it's not done yet. * - * @exception AWTException if XOpenIM() failed. + * @throws AWTException if XOpenIM() failed. */ public X11InputMethod() throws AWTException { super(); diff --git a/src/java.desktop/unix/classes/sun/awt/X11InputMethodBase.java b/src/java.desktop/unix/classes/sun/awt/X11InputMethodBase.java index baef82a1add..b9267e02998 100644 --- a/src/java.desktop/unix/classes/sun/awt/X11InputMethodBase.java +++ b/src/java.desktop/unix/classes/sun/awt/X11InputMethodBase.java @@ -162,7 +162,7 @@ public abstract class X11InputMethodBase extends InputMethodAdapter { * Constructs an X11InputMethod instance. It initializes the XIM * environment if it's not done yet. * - * @exception AWTException if XOpenIM() failed. + * @throws AWTException if XOpenIM() failed. */ public X11InputMethodBase() throws AWTException { // supports only the locale in which the VM is started diff --git a/src/java.desktop/unix/classes/sun/awt/XSettings.java b/src/java.desktop/unix/classes/sun/awt/XSettings.java index 4136a350172..86fb8261bef 100644 --- a/src/java.desktop/unix/classes/sun/awt/XSettings.java +++ b/src/java.desktop/unix/classes/sun/awt/XSettings.java @@ -232,7 +232,7 @@ public class XSettings { /** * Parses a particular x setting. * - * @exception IndexOutOfBoundsException if there isn't enough + * @throws IndexOutOfBoundsException if there isn't enough * data for a setting. */ private void updateOne(long currentSerial) diff --git a/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java b/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java index 54e69801324..d7efc54ffd4 100644 --- a/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java +++ b/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java @@ -418,7 +418,7 @@ public final class WPrinterJob extends RasterPrinterJob * is cancelled, or a new PageFormat object containing * the format indicated by the user if the dialog is * acknowledged - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless * @since 1.2 @@ -571,7 +571,7 @@ public final class WPrinterJob extends RasterPrinterJob * print job interactively. * @return false if the user cancels the dialog and * true otherwise. - * @exception HeadlessException if GraphicsEnvironment.isHeadless() + * @throws HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ diff --git a/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java b/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java index 021a13fceac..c932d0f73ff 100644 --- a/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java +++ b/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java @@ -6531,7 +6531,7 @@ public final class AccessBridge { * * @return This component's locale. If this component does not have * a locale, the locale of its parent is returned. - * @exception IllegalComponentStateException + * @throws IllegalComponentStateException * If the Component does not have its own locale and has not yet * been added to a containment hierarchy such that the locale can be * determined from the containing parent.