From 976b14463e4b4125eaaa56e9af6cda8e5e46da83 Mon Sep 17 00:00:00 2001
From: Michael Smith
Date: Wed, 13 Mar 2002 06:07:14 +0000
Subject: [PATCH] Update release notes for Bag and BeanMap changes.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130643 13f79535-47bb-0310-9956-ffa450edef68
---
RELEASE-NOTES-2.0.html | 48 +++++++++++++++++++++++++++++++++++++-----
1 file changed, 43 insertions(+), 5 deletions(-)
diff --git a/RELEASE-NOTES-2.0.html b/RELEASE-NOTES-2.0.html
index b4190724c..c20b6081e 100644
--- a/RELEASE-NOTES-2.0.html
+++ b/RELEASE-NOTES-2.0.html
@@ -11,8 +11,9 @@ useful Comparator classes.
These collections are new to Collections 2.0:
-- Bag - A Collection that keeps a count of its members of the same
- type, using
hashCode
to check for equality. Suppose
+
+ - Bag - A Collection that counts the number of times an
+ object appears in the collection. Suppose
you have a Bag that contains
{a, a, b, c}
. Calling
getCount on a
would return 2, while calling
uniqueSet would return {a, b, c}
. Note: this is an
@@ -96,7 +97,7 @@ promotes the key to the Most Recently Used position.
- "Externalized" LRUMap 1.0 Objects cannot be
read by LRUMap 2.0.
-
+
New features:
- True LRU algorithm.
@@ -112,5 +113,42 @@ promotes the key to the Most Recently Used position.
when the current size of the Map exceeds the new
maximum size
-
-
+
+
+BeanMap
+
+BeanMap's entrySet() now properly returns a set containing Map.Entry
+objects. Previously, entrySet() was equivalent to keySet() (returns a set of
+the readable properties) and there was no mechanism to retrieve all of the
+readable properties along with their values. Additionally, the BeanMap clone
+method has been revamped to work better for subclasses.
+
+BeanMap 2.0 compatibility changes:
+
+
+ - BeanMap's clone() method now declares it throws
+ CloneNotSupportedException. This allows subclasses of BeanMap to not require
+ being Cloneable and facilitates subclasses that wish to be cloneable (allows
+ the subclass to call super.clone() and have it return an instance of the
+ child rather than the parent).
+
+ - If a BeanMap is not cloneable because a new instance of the underlying
+ bean cannot be constructed, a CloneNotSupportedException is thrown rather
+ than an UnsupportedOperationException or other RuntimeException.
+
+ - BeanMap's entrySet() method now returns a set of Map.Entry objects rather
+ than the set of readable properties. To retrieve a set of readable
+ properties, use keySet() instead.
+
+
+
+Bugs fixed:
+
+
+ - If no bean is set in the BeanMap, or setBean(Object) was called with a
+ null argument, many BeanMap methods threw NullPointerExceptions. These have
+ been fixed to properly handle the case where there is no bean established in
+ the map.
+
+
+