harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r447348 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java
Date Mon, 18 Sep 2006 10:08:33 GMT
Author: pyang
Date: Mon Sep 18 03:08:28 2006
New Revision: 447348

URL: http://svn.apache.org/viewvc?view=rev&rev=447348
Log:
Patch applied for HARMONY-855 ([Classlib][util]Some java.uiti.Collections methods do not throw
unspecified NPE while RI does)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java?view=diff&rev=447348&r1=447347&r2=447348
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java
Mon Sep 18 03:08:28 2006
@@ -2568,7 +2568,7 @@
          *        constructed.
          */
         public CheckedCollection(Collection<E> c, Class<E> type) {
-            if (c == null) {
+            if (c == null || type == null) {
                 throw new NullPointerException();
             }
             this.c = c;
@@ -2971,7 +2971,7 @@
          *        constructed.
          */
         private CheckedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType)
{
-            if (m == null) {
+            if (m == null || keyType == null || valueType == null) {
                 throw new NullPointerException();
             }
             this.m = m;



Mime
View raw message