java.util/372: unmodifiableList isn't unmodifiable
bryce@albatross.co.nz
bryce@albatross.co.nz
Wed Nov 22 02:16:00 GMT 2000
>Number: 372
>Category: java.util
>Synopsis: unmodifiableList isn't unmodifiable
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: warrenl
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 22 02:16:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: bryce@albatross.co.nz
>Release: unknown-1.0
>Organization:
>Environment:
>Description:
Collections.UnModifiableList appears to be implemented
incorrectly. Refer to the test case.
>How-To-Repeat:
import java.util.*;
public class Unmodifiable
{
public static void main(String[] args)
{
List l = new ArrayList();
l.add("foo");
l = Collections.unmodifiableList(l);
System.out.println (l); // should print contents of list
l.set(0, "bar"); // should throw exception
}
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Java-prs
mailing list