harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r443313 - /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/geom/Area.java
Date Thu, 14 Sep 2006 11:00:03 GMT
Author: hindessm
Date: Thu Sep 14 04:00:03 2006
New Revision: 443313

URL: http://svn.apache.org/viewvc?view=rev&rev=443313
Log:
Applied patch from "[#HARMONY-1404] [classlib][awt] Area doesn't throw
NPE when input parameter is null".

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/geom/Area.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/geom/Area.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/geom/Area.java?view=diff&rev=443313&r1=443312&r2=443313
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/geom/Area.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/geom/Area.java
Thu Sep 14 04:00:03 2006
@@ -35,6 +35,9 @@
     }
 
     public Area(Shape s) {
+        if (s == null) {
+            throw new NullPointerException();
+        }
         this.s = s;
     }
 
@@ -47,10 +50,16 @@
     }
 
     public boolean contains(Point2D p) {
+        if (p == null) {
+            throw new NullPointerException();
+        }
         return s == null ? false : s.contains(p);
     }
 
     public boolean contains(Rectangle2D r) {
+        if (r == null) {
+            throw new NullPointerException();
+        }
         return s == null ? false : s.contains(r);
     }
 
@@ -63,6 +72,9 @@
     }
 
     public boolean intersects(Rectangle2D r) {
+        if (r == null) {
+            throw new NullPointerException();
+        }
         return s == null ? false : s.intersects(r);
     }
 



Mime
View raw message