Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D6A797927 for ; Mon, 10 Oct 2011 11:21:16 +0000 (UTC) Received: (qmail 29364 invoked by uid 500); 10 Oct 2011 11:21:16 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 29242 invoked by uid 500); 10 Oct 2011 11:21:15 -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 29231 invoked by uid 99); 10 Oct 2011 11:21:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2011 11:21:15 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.74.71.28] (HELO sif.is.scarlet.be) (193.74.71.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2011 11:21:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1318245647; bh=W3KD93n26W5N3CStqjtMnHHCjOr3INQdG7bYuHZCHso=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=WTK27oH1LLKiONUlbOGjq1wB1Nucua6KQpY+Eb+KpZOV4KeO1XB1p6kVhhh4LQP6Z pWCEXbo8gtWcyNTkFTK+IhuuZp7waQmiQ96zOvUmunFaJxSp1/+St7teZp8SqVHKDA /M1Px6JqeLENIvdUu6zV/gxthZZ/28OYx3wuylsw= Received: from mail.harfang.homelinux.org (ip-62-235-223-26.dsl.scarlet.be [62.235.223.26]) by sif.is.scarlet.be (8.14.5/8.14.5) with ESMTP id p9ABKl9T024429 for ; Mon, 10 Oct 2011 13:20:47 +0200 X-Scarlet: d=1318245647 c=62.235.223.26 Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 14A11617B5 for ; Mon, 10 Oct 2011 13:20:47 +0200 (CEST) Received: from mail.harfang.homelinux.org ([192.168.20.11]) by localhost (mail.harfang.homelinux.org [192.168.20.11]) (amavisd-new, port 10024) with ESMTP id OW+13d0bjEWB for ; Mon, 10 Oct 2011 13:20:44 +0200 (CEST) Received: from dusk.harfang.homelinux.org (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id CE3396175D for ; Mon, 10 Oct 2011 13:20:44 +0200 (CEST) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.76) (envelope-from ) id 1RDDuW-0002XL-MJ for dev@commons.apache.org; Mon, 10 Oct 2011 13:20:44 +0200 Date: Mon, 10 Oct 2011 13:20:44 +0200 From: Gilles Sadowski To: dev@commons.apache.org Subject: Re: [Math] Issues 650, 675, 676 Message-ID: <20111010112043.GQ17021@dusk.harfang.homelinux.org> Mail-Followup-To: dev@commons.apache.org References: <20110929160431.GA17388@dusk.harfang.homelinux.org> <20110930220329.GN17021@dusk.harfang.homelinux.org> <20111009171612.GL17021@dusk.harfang.homelinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.21 (2010-09-15) X-DCC-scarlet.be-Metrics: sif 20002; Body=1 Fuz1=1 Fuz2=1 X-Virus-Scanned: clamav-milter 0.97.1-exp at sif X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Oct 10, 2011 at 03:26:01AM +0100, sebb wrote: > On 9 October 2011 18:16, Gilles Sadowski wrote: > > >> This is slightly different from the original suggestion; IIRC that did > >> not include using getters. > > > > I put getters because you asked them. But, indeed, there is no difference > > with direct accessing the arrays since the getters do not return a copy: it > > is possible to modify the "original" array. > > Those are *not* the getters I was referring to. > > I intended the getter to return an array element, not the array, so as > to protect the array contents. Don't you think that it will make the access much slower? > As you point out, there's absolutely no point having the getter otherwise. > > The current implementation is not particularly secure against > malicious or accidental tampering. The only tampering could come from a bug in classes in the same package. OR do I miss something? > That is why I left the arrays in the same source file originally, as > it allows the arrays to be automatically protected, without needing a > getter. Yes I understand the argument. Mine is that this data should not be stored there. Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org