You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by pj...@apache.org on 2002/08/12 20:00:46 UTC
cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections TestFastHashMap.java TestFastTreeMap.java
pjack 2002/08/12 11:00:46
Modified: collections/src/test/org/apache/commons/collections
TestFastHashMap.java TestFastTreeMap.java
Log:
Some unit tests were failing under JDK1.2.2, because of bugs in the
source for JDK1.2.2 TreeMap and HashMap (they incorrectly return false
when a null value is removed from the collection views).
Revision Changes Path
1.7 +12 -4 jakarta-commons/collections/src/test/org/apache/commons/collections/TestFastHashMap.java
Index: TestFastHashMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestFastHashMap.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TestFastHashMap.java 18 Jun 2002 05:41:11 -0000 1.6
+++ TestFastHashMap.java 12 Aug 2002 18:00:46 -0000 1.7
@@ -94,4 +94,12 @@
fhm.setFast(false);
return (fhm);
}
+
+ /**
+ * There is a bug in JDK1.2 HashMap; the keySet() will incorrectly
+ * return false when a null value is removed.
+ */
+ public boolean useNullValue() {
+ return false;
+ }
}
1.7 +13 -4 jakarta-commons/collections/src/test/org/apache/commons/collections/TestFastTreeMap.java
Index: TestFastTreeMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestFastTreeMap.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TestFastTreeMap.java 18 Jun 2002 05:35:58 -0000 1.6
+++ TestFastTreeMap.java 12 Aug 2002 18:00:46 -0000 1.7
@@ -102,6 +102,15 @@
return false;
}
+
+ /**
+ * There is a bug in JDK1.2.2 TreeMap; the keySet will incorrectly
+ * return false when a null value is removed
+ */
+ public boolean useNullValue() {
+ return false;
+ }
+
public void setUp()
{
map = (TreeMap) makeEmptyMap();
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>