From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30237 invoked by alias); 23 Apr 2006 16:36:02 -0000 Received: (qmail 30229 invoked by uid 22791); 23 Apr 2006 16:36:02 -0000 X-Spam-Check-By: sourceware.org Received: from pcedev.com (HELO mail.pcedev.com) (82.234.81.179) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 23 Apr 2006 16:35:59 +0000 Received: from [10.0.0.4] (lime [10.0.0.4]) by mail.pcedev.com (Postfix) with ESMTP id 692A87362C for ; Sun, 23 Apr 2006 18:35:55 +0200 (CEST) Message-ID: <444BACEB.1080105@pcedev.com> Date: Sun, 23 Apr 2006 16:36:00 -0000 From: Olivier Jolly User-Agent: Mail/News 1.5 (X11/20060228) MIME-Version: 1.0 To: Mauve Patch List Subject: FYI: tiny extra tests on unmodifiableMap linked to PR 27128 Content-Type: multipart/mixed; boundary="------------090300080400060805020005" X-IsSubscribed: yes Mailing-List: contact mauve-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-patches-owner@sourceware.org X-SW-Source: 2006/txt/msg00287.txt.bz2 This is a multi-part message in MIME format. --------------090300080400060805020005 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 342 Hi, I added a little check to David tests on the mutability of a map via UnmodifiableMap.entrySet().toArray(Object[]). Cheers +Olivier 2006-04-23 Olivier Jolly * gnu/testlet/java/util/Collections/unmodifiableMap.java(testMap): Added regression test on UnmodifiableMap.entrySet().toArray(Object[]). --------------090300080400060805020005 Content-Type: text/x-patch; name="unmodifiableMapToArray2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="unmodifiableMapToArray2.patch" Content-length: 879 Index: unmodifiableMap.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/util/Collections/unmodifiableMap.java,v retrieving revision 1.1 diff -u -r1.1 unmodifiableMap.java --- unmodifiableMap.java 12 Apr 2006 09:32:06 -0000 1.1 +++ unmodifiableMap.java 23 Apr 2006 16:31:43 -0000 @@ -135,5 +135,22 @@ harness.check(pass); } + // check a Map.Entry item from entrySet().toArray(Object[]) + pass = false; + Object[] entries2 = new Object[umap.size()]; + umap.entrySet().toArray(entries2); + if (entries2.length > 0) + { + try + { + ((Map.Entry) entries2[0]).setValue("XYZ"); + } + catch (UnsupportedOperationException e) + { + pass = true; + } + harness.check(pass); + } + } } --------------090300080400060805020005--