EVALUATION
Sounds reasonable as long as it is acceptable that a cloned BitSet could have a different size() value than the one it was cloned from. Unfortunately for historical reasons size() returns the actual storage space rather than the logical size of a BitSet. This could be a compatibility issue.
###@###.### 2003-12-04
It is a bug in the original spec that size() was exposed, and a further
bug that clone() was spec'ed to return a BitSet of the same size as its
evil twin. It's hard for me to imagine someone depending on
s.size() == s.clone().size()
but who knows?
It's also a good idea to shrink our BitSets occasionally automatically,
as well as to provide an explicit trimToSize().
###@###.### 2005-1-27 02:58:03 GMT
|