Return-Path: X-Original-To: apmail-tapestry-commits-archive@minotaur.apache.org Delivered-To: apmail-tapestry-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D02E17E5C for ; Wed, 25 Feb 2015 15:36:05 +0000 (UTC) Received: (qmail 10400 invoked by uid 500); 25 Feb 2015 15:36:05 -0000 Delivered-To: apmail-tapestry-commits-archive@tapestry.apache.org Received: (qmail 10362 invoked by uid 500); 25 Feb 2015 15:36:05 -0000 Mailing-List: contact commits-help@tapestry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tapestry.apache.org Delivered-To: mailing list commits@tapestry.apache.org Received: (qmail 10353 invoked by uid 99); 25 Feb 2015 15:36:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2015 15:36:04 +0000 Date: Wed, 25 Feb 2015 15:36:04 +0000 (UTC) From: "Jochen Kemnade (JIRA)" To: commits@tapestry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TAP5-2452) Bug in CaseInsensitiveMap MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TAP5-2452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14336636#comment-14336636 ] Jochen Kemnade commented on TAP5-2452: -------------------------------------- I started to implement a custom key set with custom mutators but I'm getting the feeling that I'm taking it too far. Do you actually need the {{keySet().retainAll(...)}} to work or did you just want to report this (perfectly valid) bug? In the latter case, I'd prefer the mutators to throw an {{UnsupportedOperationException}}. > Bug in CaseInsensitiveMap > ------------------------- > > Key: TAP5-2452 > URL: https://issues.apache.org/jira/browse/TAP5-2452 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-ioc > Affects Versions: 5.4, 5.3.8 > Reporter: Alex Lumpov > > {code} > /** > * > * @author AlexLumpov > */ > public class CaseInsensitiveMapTest extends Assert { > @Test > public void testRetainAllKeys() { > Map map = new CaseInsensitiveMap(); > map.put("1", "1"); > map.put("2", "2"); > map.put("3", "3"); > Collection keysToRetain = Arrays.asList("3", "4", "5"); > HashSet expected = new HashSet(Arrays.asList("3")); > boolean modified = map.keySet().retainAll(keysToRetain); > assertEquals(true, modified); > assertEquals(expected, map.keySet()); > } > } > {code} > Result: > {code} > java.lang.AssertionError: expected:<[3]> but was:<[2, 3]> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)