You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/12/06 01:52:35 UTC
DO NOT REPLY [Bug 15128] New: -
Tests cannot handle immutable lists
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15128>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15128
Tests cannot handle immutable lists
Summary: Tests cannot handle immutable lists
Product: Commons
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Minor
Priority: Other
Component: Collections
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: rich@rd.gen.nz
I realise the tests don't form part of the public API for Collections,
however I find them very useful for testing my collection
implementations. You could consider this as a minor bug or an
enhancement request, depending on your perspective.
TestList cannot handle fully immutable lists. It can handle classes
that don't implement the add(), remove() and clear() operations, but
not lists that do not support set() and retainAll().
Therefore I suggest adding isSetSupported() and
isRetainAllSupported(). Maybe isClearSupported() should be added
instead of being implied by isRemoveSupported().
eg List list = Collections.unmodifiableList(new ArrayList()) will fail
the tests.
There might be similar problems with other sorts of immutable
collections, but I haven't checked these.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>