diff --git a/src/share/classes/java/awt/Component.java b/src/share/classes/java/awt/Component.java index f8bdac15d408678cc4dc03a70c69de30c6aa8270..cff463b3526c0d7eadf1ddabfdc061189f3faf23 100644 --- a/src/share/classes/java/awt/Component.java +++ b/src/share/classes/java/awt/Component.java @@ -2154,6 +2154,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * * @param d the dimension specifying the new size * of this component + * @throws NullPointerException if {@code d} is {@code null} * @see #setSize * @see #setBounds * @see #invalidate @@ -2351,6 +2352,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * invalidates the component hierarchy. * * @param r the new bounding rectangle for this component + * @throws NullPointerException if {@code r} is {@code null} * @see #getBounds * @see #setLocation(int, int) * @see #setLocation(Point) @@ -4545,6 +4547,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * where the point's x and y coordinates are defined * to be relative to the coordinate system of this component. * @param p the point + * @throws NullPointerException if {@code p} is {@code null} * @see #getComponentAt(Point) * @since JDK1.1 */ @@ -5879,7 +5882,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * @exception ClassCastException if listenerType * doesn't specify a class or interface that implements * java.util.EventListener - * + * @throws NullPointerException if {@code listenerType} is {@code null} * @see #getComponentListeners * @see #getFocusListeners * @see #getHierarchyListeners @@ -8038,6 +8041,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * Prints a listing of this component to the specified output * stream. * @param out a print stream + * @throws NullPointerException if {@code out} is {@code null} * @since JDK1.0 */ public void list(PrintStream out) { @@ -8050,6 +8054,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * @param out a print stream * @param indent number of spaces to indent * @see java.io.PrintStream#println(java.lang.Object) + * @throws NullPointerException if {@code out} is {@code null} * @since JDK1.0 */ public void list(PrintStream out, int indent) { @@ -8062,6 +8067,7 @@ public abstract class Component implements ImageObserver, MenuContainer, /** * Prints a listing to the specified print writer. * @param out the print writer to print to + * @throws NullPointerException if {@code out} is {@code null} * @since JDK1.1 */ public void list(PrintWriter out) { @@ -8073,6 +8079,7 @@ public abstract class Component implements ImageObserver, MenuContainer, * the specified print writer. * @param out the print writer to print to * @param indent the number of spaces to indent + * @throws NullPointerException if {@code out} is {@code null} * @see java.io.PrintStream#println(java.lang.Object) * @since JDK1.1 */ diff --git a/src/share/classes/java/awt/Container.java b/src/share/classes/java/awt/Container.java index bf635fd45acd364b4e9298ee55f93d9c4307d2c1..a7ee77e16cbf5a711e34256fade7a0d46796b97e 100644 --- a/src/share/classes/java/awt/Container.java +++ b/src/share/classes/java/awt/Container.java @@ -1231,6 +1231,7 @@ public class Container extends Component { * reflect the changes. * * @param comp the component to be removed + * @throws NullPointerException if {@code comp} is {@code null} * @see #add * @see #invalidate * @see #validate @@ -2154,6 +2155,7 @@ public class Container extends Component { * @exception ClassCastException if listenerType * doesn't specify a class or interface that implements * java.util.EventListener + * @exception NullPointerException if {@code listenerType} is {@code null} * * @see #getContainerListeners * @@ -2705,6 +2707,7 @@ public class Container extends Component { * If there is no child component at the requested point and the * point is within the bounds of the container the container itself * is returned. + * @throws NullPointerException if {@code p} is {@code null} * @see Component#contains * @see #getComponentAt * @since 1.2 @@ -2969,6 +2972,7 @@ public class Container extends Component { * * @param out a print stream * @param indent the number of spaces to indent + * @throws NullPointerException if {@code out} is {@code null} * @see Component#list(java.io.PrintStream, int) * @since JDK1.0 */ @@ -2995,6 +2999,7 @@ public class Container extends Component { * * @param out a print writer * @param indent the number of spaces to indent + * @throws NullPointerException if {@code out} is {@code null} * @see Component#list(java.io.PrintWriter, int) * @since JDK1.1 */ diff --git a/src/share/classes/java/awt/ScrollPane.java b/src/share/classes/java/awt/ScrollPane.java index 6a06acb5403bc6d4cb96bda60b8e6919c32cd55a..104318abf6f292f7b2c05ec014accca1e612b484 100644 --- a/src/share/classes/java/awt/ScrollPane.java +++ b/src/share/classes/java/awt/ScrollPane.java @@ -377,6 +377,7 @@ public class ScrollPane extends Container implements Accessible { * This is a convenience method which interfaces with the Adjustable * objects which represent the state of the scrollbars. * @param p the Point representing the position to scroll to + * @throws NullPointerException if {@code p} is {@code null} */ public void setScrollPosition(Point p) { setScrollPosition(p.x, p.y); diff --git a/src/share/classes/java/awt/Window.java b/src/share/classes/java/awt/Window.java index 7dce80e9564de856c0cab5f1bfddfee284375171..03dbd535e9f0d5f146c83ba2ad6247399096e1e6 100644 --- a/src/share/classes/java/awt/Window.java +++ b/src/share/classes/java/awt/Window.java @@ -1888,6 +1888,7 @@ public class Window extends Container implements Accessible { * @exception ClassCastException if listenerType * doesn't specify a class or interface that implements * java.util.EventListener + * @exception NullPointerException if {@code listenerType} is {@code null} * * @see #getWindowListeners * @since 1.3