commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 15128] New: - Tests cannot handle immutable lists
Date Fri, 06 Dec 2002 00:52:35 GMT
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:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message