bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/27128] New: Collections.unmodifiableMap() can be modified


From: david dot gilbert at object-refinery dot com
Subject: [Bug classpath/27128] New: Collections.unmodifiableMap() can be modified
Date: 12 Apr 2006 09:41:23 -0000

For an unmodifiable map created using Collections.unmodifiableMap(), it is
possible to modify an entry by obtaining an array of the map entries:

Object[] entries = umap.entrySet().toArray();

...then modifying the entries from the array:

((Map.Entry) entries[0]).setValue("XYZ");

I committed a Mauve test for this a few minutes ago.


-- 
           Summary: Collections.unmodifiableMap() can be modified
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: david dot gilbert at object-refinery dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27128





reply via email to

[Prev in Thread] Current Thread [Next in Thread]