summaryrefslogtreecommitdiff
path: root/java/util/Vector.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/util/Vector.java')
-rw-r--r--java/util/Vector.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/java/util/Vector.java b/java/util/Vector.java
index 02eb1539a..ea29ce093 100644
--- a/java/util/Vector.java
+++ b/java/util/Vector.java
@@ -720,8 +720,10 @@ public class Vector<T> extends AbstractList<T>
*/
public synchronized boolean removeAll(Collection<?> c)
{
- if (c == null)
- throw new NullPointerException();
+ // The NullPointerException is thrown implicitly when the Vector
+ // is not empty and c is null. The RI allows null arguments when
+ // the vector is empty. See Mauve test:
+ // gnu/testlet/java/util/Vector/removeAll.java
int i;
int j;
@@ -749,8 +751,10 @@ public class Vector<T> extends AbstractList<T>
*/
public synchronized boolean retainAll(Collection<?> c)
{
- if (c == null)
- throw new NullPointerException();
+ // The NullPointerException is thrown implicitly when the Vector
+ // is not empty and c is null. The RI allows null arguments when
+ // the vector is empty. See Mauve test:
+ // gnu/testlet/java/util/Vector/retainAll.java
int i;
int j;