diff options
author | Tania Bento <tbento@redhat.com> | 2006-10-02 17:31:28 +0000 |
---|---|---|
committer | Tania Bento <tbento@redhat.com> | 2006-10-02 17:31:28 +0000 |
commit | 8df4fe22d75150183a900baa424a01ad217d1bbd (patch) | |
tree | f865945db030e0f2760737787cca429c77a636a8 | |
parent | 7c2fa5fc198d857672592740a91f30418ef32687 (diff) | |
download | classpath-8df4fe22d75150183a900baa424a01ad217d1bbd.tar.gz |
2006-10-02 Tania Bento <tbento@redhat.com>
* java/ast/Rectangle.java:
(Rectangle(Rectangle)): Do not throw NPE.
(Rectangle(Point, Dimension)): Same.
(Rectangle(Point)): Same.
(Rectangle(Dimension)): Same.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | java/awt/Rectangle.java | 20 |
2 files changed, 11 insertions, 19 deletions
@@ -1,3 +1,11 @@ +2006-10-02 Tania Bento <tbento@redhat.com> + + * java/ast/Rectangle.java: + (Rectangle(Rectangle)): Do not throw NPE. + (Rectangle(Point, Dimension)): Same. + (Rectangle(Point)): Same. + (Rectangle(Dimension)): Same. + 2006-09-29 Casey Marshall <csm@gnu.org> PR 29190 @@ -26,7 +34,7 @@ more reliable. (repaint): Forward repaint() to parent as is specified. -2006-08-29 Tania Bento <tbento@redhat.com> +2006-09-29 Tania Bento <tbento@redhat.com> * javax/swing/plaf/basic/BasicTableUI.java (getPreferredSize): The number of iterations for the for-loop should be diff --git a/java/awt/Rectangle.java b/java/awt/Rectangle.java index c9ee21f7c..ac2494ee0 100644 --- a/java/awt/Rectangle.java +++ b/java/awt/Rectangle.java @@ -119,14 +119,10 @@ public class Rectangle extends Rectangle2D implements Shape, Serializable * coordinates of the specified rectangle. * * @param r the rectangle to copy from - * @throws NullPointerException if r is null * @since 1.1 */ public Rectangle(Rectangle r) { - if (r == null) - throw new NullPointerException(); - x = r.x; y = r.y; width = r.width; @@ -171,13 +167,9 @@ public class Rectangle extends Rectangle2D implements Shape, Serializable * * @param p the upper left corner of the rectangle * @param d the width and height of the rectangle - * @throws NullPointerException if p or d is null */ public Rectangle(Point p, Dimension d) { - if (p == null || d == null) - throw new NullPointerException(); - x = p.x; y = p.y; width = d.width; @@ -189,13 +181,9 @@ public class Rectangle extends Rectangle2D implements Shape, Serializable * corner at the specified point and a width and height of zero. * * @param p the upper left corner of the rectangle - * @throws NullPointerException if p is null */ public Rectangle(Point p) - { - if (p == null) - throw new NullPointerException(); - + { x = p.x; y = p.y; } @@ -206,13 +194,9 @@ public class Rectangle extends Rectangle2D implements Shape, Serializable * by the specified dimension. * * @param d the width and height of the rectangle - * @throws NullPointerException if d is null */ public Rectangle(Dimension d) - { - if (d == null) - throw new NullPointerException(); - + { width = d.width; height = d.height; } |