Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 89158 invoked from network); 16 May 2010 10:14:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 May 2010 10:14:51 -0000 Received: (qmail 72479 invoked by uid 500); 16 May 2010 10:14:51 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 72280 invoked by uid 500); 16 May 2010 10:14:49 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 72273 invoked by uid 99); 16 May 2010 10:14:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 May 2010 10:14:48 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of akarasulu@gmail.com designates 209.85.161.50 as permitted sender) Received: from [209.85.161.50] (HELO mail-fx0-f50.google.com) (209.85.161.50) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 May 2010 10:14:42 +0000 Received: by fxm5 with SMTP id 5so1136560fxm.37 for ; Sun, 16 May 2010 03:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=f46vGi6wA5nyUDRVf8NEpnAneI3p+jtoKGkcSrDDWpM=; b=WZIIiTbxlba/fKMaHEg3XPQMcRFdE+wfyWHOxswrheaEb4FiYQo30pQ29Kwdqr7iAv Tl1fzrUy0Khfdh+2KH8uV+CIsXTB1ROMx5wuuq8ExXRj+pbrA5Es4jvV2Vc8fo8BRF7s e3pZ/ya5tcp92Cv+jiNmJCrmhN962af9RVLUQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=I7mrY5KroZ5+Ugy7fZ4iTOgqdgMjAYTvtG/Wxd990xxk7ZXLqW8FKg2eIZo/bD0Qr7 xYu9OWXSVLxUetsSe+N4w5AqN+H0rfXInMl8ForhL/SfIWOsDPvDVlFMIT8VTHmMXXsn yy+T/i761RH4lDYn3R7YJdT96+fifHd4ZAXh4= MIME-Version: 1.0 Received: by 10.239.136.133 with SMTP id h5mr349597hbh.47.1274004861624; Sun, 16 May 2010 03:14:21 -0700 (PDT) Sender: akarasulu@gmail.com Received: by 10.239.160.66 with HTTP; Sun, 16 May 2010 03:14:21 -0700 (PDT) In-Reply-To: <4BEFC02A.2070906@apache.org> References: <4BEE633D.6020906@otego.com> <4BEE8756.5010403@gmail.com> <4BEFC02A.2070906@apache.org> Date: Sun, 16 May 2010 13:14:21 +0300 X-Google-Sender-Auth: EvZV36xOrsPgVPDyQCTfR0U56B4 Message-ID: Subject: Re: Mutable Objects From: Alex Karasulu To: Apache Directory Developers List , felixk@apache.org Content-Type: multipart/alternative; boundary=001636458ec03820e60486b35f3c X-Virus-Checked: Checked by ClamAV on apache.org --001636458ec03820e60486b35f3c Content-Type: text/plain; charset=ISO-8859-1 On Sun, May 16, 2010 at 12:51 PM, Felix Knecht wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > >> I suggest to clone such data and return the clone instead. > >> > >> WDYT? > >> > > This is not so simple. For instance, in the Value class, we returns the > > direct internal object for performance reasons. It should be checked > > case by case. > > I can agree the performance reasons. OTOH it's a 'public' class which > may be used by other (third party) projects as well. For these projects > we will need to have either a big warning in the javadocs or to > implement it in a save way. > > You're 100% right about that. We have to take precautions to make sure users of the API do not shoot themselves in the foot. Each case needs to be analyzed and changes to make some mutable structures immutable must be put into our roadmap. Felix this might be something that might help as an exercise for you to get to know the internals of the server much better. Right now you're of course invaluable to us in the way you've picked up various tasks. However you might find it extremely pleasurable to start tinkering with the more meaty issues of the server. We have several very interesting problems and rewarding potential solutions in this architecture. In addition, knowing your insight and strict approach to following conventions, we would always love to hear your suggestions on these matters as well. Regards, -- Alex Karasulu My Blog :: http://www.jroller.com/akarasulu/ Apache Directory Server :: http://directory.apache.org Apache MINA :: http://mina.apache.org To set up a meeting with me: http://tungle.me/AlexKarasulu --001636458ec03820e60486b35f3c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Sun, May 16, 2010 at 12:51 PM, Felix = Knecht <felixk@ap= ache.org> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> I suggest to clone such data and return th= e clone instead.
>>
>> WDYT?
>>
> This is not so simple. For instance, in the Value class, we returns th= e
> direct internal object for performance reasons. It should be checked > case by case.

I can agree the performance reasons. OTOH it's a 'public'= class which
may be used by other (third party) projects as well. For these projects
we will need to have either a big warning in the javadocs or to
implement it in a save way.


You're 100= % right about that. We have to take precautions to make sure users of the A= PI do not shoot themselves in the foot. Each case needs to be analyzed and = changes to make some mutable structures immutable must be put into our road= map.

Felix this might be something that might help as an exe= rcise for you to get to know the internals of the server much better. Right= now you're of course invaluable to us in the way you've picked up = various tasks. =A0However you might find it extremely pleasurable to start = tinkering with the more meaty issues of the server. We have several very in= teresting problems and rewarding potential solutions in this architecture. = In addition, knowing your insight and strict approach to following conventi= ons, we would always love to hear your suggestions on these matters as well= .

Regards,
--=A0
Alex Karasulu
My= Blog :: http://www.jroller.c= om/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
To set up a meeting with me:
http://tungle.me/AlexKarasulu
--001636458ec03820e60486b35f3c--