Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-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 AC1B59BD4 for ; Sat, 4 Feb 2012 08:14:11 +0000 (UTC) Received: (qmail 26343 invoked by uid 500); 4 Feb 2012 08:14:10 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 26145 invoked by uid 500); 4 Feb 2012 08:14:02 -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 26130 invoked by uid 99); 4 Feb 2012 08:13:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 08:13:55 +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 (athena.apache.org: domain of elecharny@gmail.com designates 74.125.82.42 as permitted sender) Received: from [74.125.82.42] (HELO mail-ww0-f42.google.com) (74.125.82.42) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 08:13:47 +0000 Received: by wgbgn7 with SMTP id gn7so1836393wgb.1 for ; Sat, 04 Feb 2012 00:13:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=A0br0vqjVcdaw/DysV4SpNujBTK6u+K5m/+Femy6veU=; b=H4Co408FKtOIc2Jg0L+EG5wWfSragUYEg9WRyGK0UebXG9+hFnzRyIRQ17mEAgfEgp 3RgY0PwkSkOj4Wk07g/PtQng4qvpyJPWFuOrIUgwRySaDa0f+gOmHttD234qHLrhOKrY s8ZW52SAvqMLmavO/4DzJ2K6N+kTOW0ZKtHwA= Received: by 10.180.78.98 with SMTP id a2mr16273234wix.17.1328343205465; Sat, 04 Feb 2012 00:13:25 -0800 (PST) Received: from emmanuel-lecharnys-MacBook-Pro.local (ran75-1-78-192-106-184.fbxo.proxad.net. [78.192.106.184]) by mx.google.com with ESMTPS id x7sm11513794wif.10.2012.02.04.00.13.24 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Feb 2012 00:13:24 -0800 (PST) Message-ID: <4F2CE8A4.5090504@gmail.com> Date: Sat, 04 Feb 2012 09:13:24 +0100 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: svn commit: r1239907 - in /directory/shared/trunk/ldap/model/src: main/java/org/apache/directory/shared/ldap/model/name/Rdn.java test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java References: <20120202225908.A31382388900@eris.apache.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2/3/12 11:09 PM, Alex Karasulu wrote: > On Fri, Feb 3, 2012 at 12:59 AM, wrote: > >> Author: elecharny >> Date: Thu Feb 2 22:59:08 2012 >> New Revision: 1239907 >> >> URL: http://svn.apache.org/viewvc?rev=1239907&view=rev >> Log: >> Fix DIRAPI-76 : new Rdn( "A=a,B=b" ) now throws an LdapInvalidDnException >> >> > Should the exception not be ... LdapInvalidNameComponent (we can create one > if it does not exist). > > Reason I say this is that the whole issue with the non-intuitive > constructor was that the API user was thinking the argument can be a > multi-component relative distinguished name or a DN. LdapInvalidDnException > might not fit here and it might make the user think they have to use a DN > rather than a single name component. > > WDYT? > Rahhh... Not such an easy move. In many many places, we are expecting a LdapInvalidDnException. Rdn is considered as a Dn with one single Rdn in most of the code. Question : would it worth the effort to change every part of the code when we can simply improve the message contained in the exception ? Or may be we can go for a more drastic change : get rid of the LdapDnException and rename it LdapNmeException ? -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com