Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 595B011498 for ; Wed, 14 May 2014 22:22:50 +0000 (UTC) Received: (qmail 49010 invoked by uid 500); 10 May 2014 22:01:30 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 18261 invoked by uid 500); 10 May 2014 21:59:18 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 68070 invoked by uid 99); 10 May 2014 21:56:37 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 May 2014 21:56:37 +0000 Date: Sat, 10 May 2014 21:56:37 +0000 (UTC) From: "zigler zhang (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (COLLECTIONS-525) PatriciaTrie MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COLLECTIONS-525?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:all-tabpanel ] zigler zhang updated COLLECTIONS-525: ------------------------------------- Attachment: 525.patch I hope the patch could make some help. > PatriciaTrie > ------------ > > Key: COLLECTIONS-525 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-52= 5 > Project: Commons Collections > Issue Type: Bug > Components: Collection > Affects Versions: 4.0 > Environment: android > Reporter: zigler zhang > Priority: Critical > Attachments: 525.patch > > > the result of trie tree prefixMap function is inconsistent. it would con= tain a key but the size is 0; > some unittest codes as below:=20 > PatriciaTrie aTree =3D > new PatriciaTrie (); > aTree.put("=E7=82=B9=E8=AF=84", "=E6=B5=8B=E8=AF=95"); > aTree.put("=E4=B9=A6=E8=AF=84", "=E6=B5=8B=E8=AF=95"); > assertTrue(aTree.prefixMap("=E7=82=B9").containsKey("=E7=82=B9=E8=AF= =84")); //pass > assertEquals("=E6=B5=8B=E8=AF=95", aTree.prefixMap("=E7=82=B9").get("= =E7=82=B9=E8=AF=84")); //pass > assertFalse(aTree.prefixMap("=E7=82=B9").isEmpty()); = //fail > assertEquals(1, aTree.prefixMap("=E7=82=B9").size()); = //fail actural 0 > assertEquals(1, aTree.prefixMap("=E7=82=B9").keySet().size()); //fa= il actural 0 > assertEquals(1, aTree.prefixMap("=E7=82=B9").entrySet().size()); //fa= il actural 0 > assertEquals(1, aTree.prefixMap("=E7=82=B9=E8=AF=84").values().size()= ); //fail actural 0 -- This message was sent by Atlassian JIRA (v6.2#6252)