harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r991505 - /harmony/enhanced/java/branches/java6/classlib/modules/luni/src/main/java/java/util/PriorityQueue.java
Date Wed, 01 Sep 2010 11:32:08 GMT
Author: tellison
Date: Wed Sep  1 11:32:07 2010
New Revision: 991505

URL: http://svn.apache.org/viewvc?rev=991505&view=rev
Log:
Additional fix required as part of r967016 to catch case of null parameter.

Modified:
    harmony/enhanced/java/branches/java6/classlib/modules/luni/src/main/java/java/util/PriorityQueue.java

Modified: harmony/enhanced/java/branches/java6/classlib/modules/luni/src/main/java/java/util/PriorityQueue.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/luni/src/main/java/java/util/PriorityQueue.java?rev=991505&r1=991504&r2=991505&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/luni/src/main/java/java/util/PriorityQueue.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/luni/src/main/java/java/util/PriorityQueue.java
Wed Sep  1 11:32:07 2010
@@ -277,6 +277,9 @@ public class PriorityQueue<E> extends Ab
      */
     @Override
     public boolean contains(Object object) {
+        if (object == null) {
+            return false;
+        }
         for (int i = 0; i < size; i++) {
             if (object.equals(elements[i])) {
                 return true;



Mime
View raw message