From dev-return-168655-archive-asf-public=cust-asf.ponee.io@commons.apache.org Thu Oct 11 05:28:49 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id CB021180672 for ; Thu, 11 Oct 2018 05:28:48 +0200 (CEST) Received: (qmail 18297 invoked by uid 500); 11 Oct 2018 03:28:47 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 18284 invoked by uid 99); 11 Oct 2018 03:28:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Oct 2018 03:28:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 68EFDC0327 for ; Thu, 11 Oct 2018 03:28:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.897 X-Spam-Level: * X-Spam-Status: No, score=1.897 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id cqeGtA5PQqIv for ; Thu, 11 Oct 2018 03:28:45 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 3E9CD5F357 for ; Thu, 11 Oct 2018 03:28:45 +0000 (UTC) Received: by mail-wr1-f43.google.com with SMTP id q5-v6so7898002wrw.12 for ; Wed, 10 Oct 2018 20:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=bgj7eB9ENGkLr+RcOXauS3fmhGb7m8m08i4zo37gTEE=; b=Dy5bxhoIm2FY+KtEuL33UKUnAA1rFgs5mkLMIOrhN6IHyVv1bLMeoKo1jP1wZrci6G Esf0UpA+y8o4NlNTK26MuK+FCH+GwdQAAhIM+gCZ7bZ9O6CiIdRftePrN4Aihb0U9JZw 4n0y6m8ydjnCnXSPVs8jcsPAkt4WJWjRHxnZmO9NaZCPD0Sd9zl5oHBaewkaVKXIDz2z zA70cvMTF6Dc2fpF6LIqfD+foYf8lp7t8YYukwfG9bZMMwh5H8mYR9nVRaX4CYpHtijz YpM5E5zmxI8exOLDBGb8z41E7uEjFal1dgCynEhCE7xUhFbSdjHZJm0ZHJ2xtwoi+1Ke KVxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=bgj7eB9ENGkLr+RcOXauS3fmhGb7m8m08i4zo37gTEE=; b=ro8fvF/i4iruvlMtGKg06rhWq3JKW8doZcHYwkSyDjRSWj/GBf1EWo0WGsIVOXmzjf MICmMmVRY9WPjPxBLbC5sxGQ/cjl71HEmb1W7PqkUfag9+OfuZYnz8XZGiTAkg/GSYFs 0WGMbI/fTsh1jDiEGxQltzpPG44kNJ/rt+PV3yroK+iq2SVrKnpnV1gyVBdT7Sf0SAeR Exo70BMqA3x52KLAYENJdqKnYXXhJ9+ept0uNUFOkqwv76VlN86doB516eqwecuv5qzr dpB5iP0yE06GV7IME4jRWTsR3nNxkYSfYOLs+JmSyZlR6FFntwX77x/DSN0TUqPff3/X vmxw== X-Gm-Message-State: ABuFfoiximd/fdGy7goR0ogxDHIpXeXAF2YIBcSiq7Fu4XiyMtu/g3YT mqzRJcfcUFCfrMwvF5gXa5ZAuNreo6yobEIyb51X X-Google-Smtp-Source: ACcGV63DF/0qvP+E51+j2NV0e5Uc/HVbezDVd73GbGXrhQ1wphZ2mKZRHbs30UFWT/Br9SPUni/Hey5xoAaPKC2GxJY= X-Received: by 2002:adf:ee52:: with SMTP id w18-v6mr26116810wro.63.1539228524461; Wed, 10 Oct 2018 20:28:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Gary Gregory Date: Wed, 10 Oct 2018 21:28:33 -0600 Message-ID: Subject: Re: [jira] [Commented] (COLLECTIONS-697) JavaDoc for FixedSizeList should warn that modifying underlying list is still allowed and is not prevented To: Commons Developers List Content-Type: multipart/alternative; boundary="0000000000006dc3ae0577eb918e" --0000000000006dc3ae0577eb918e Content-Type: text/plain; charset="UTF-8" Please update the changes.xml and close the Jira ticket if the work is done. Gary On Sat, Oct 6, 2018 at 2:21 PM ASF GitHub Bot (JIRA) wrote: > > [ > https://issues.apache.org/jira/browse/COLLECTIONS-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16640867#comment-16640867 > ] > > ASF GitHub Bot commented on COLLECTIONS-697: > -------------------------------------------- > > Github user asfgit closed the pull request at: > > https://github.com/apache/commons-collections/pull/55 > > > > JavaDoc for FixedSizeList should warn that modifying underlying list is > still allowed and is not prevented > > > ---------------------------------------------------------------------------------------------------------- > > > > Key: COLLECTIONS-697 > > URL: > https://issues.apache.org/jira/browse/COLLECTIONS-697 > > Project: Commons Collections > > Issue Type: Bug > > Reporter: Ranjan George > > Priority: Major > > > > I just noticed that it is not explicitly mentioned in the JavaDoc that > modifying the underlying list of a FixedSizeList would actually land up > modifying the list of the constructed FixedSizeList. Not sure if this was > by design, but at the very list I think the JavaDoc should caution against > this. > > Following is a test case that written that you could use to check this. > > {code:java} > > public void testAllowsMutationOfUnderlyingCollection() { > > List decoratedList = new ArrayList<>(); > > decoratedList.add("item 1"); > > decoratedList.add("item 2"); > > // > > FixedSizeList fixedSizeList = > FixedSizeList.fixedSizeList(decoratedList); > > int sizeBefore = fixedSizeList.size(); > > // > > boolean changed = decoratedList.add("New Value"); > > Assert.assertTrue(changed); > > // > > Assert.assertEquals("Modifying an the underlying list is allowed", > sizeBefore + 1, fixedSizeList.size()); > > } > > {code} > > > > -- > This message was sent by Atlassian JIRA > (v7.6.3#76005) > --0000000000006dc3ae0577eb918e--