Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 6612 invoked from network); 14 Dec 2007 11:58:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Dec 2007 11:58:24 -0000 Received: (qmail 66301 invoked by uid 500); 14 Dec 2007 11:58:13 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 66273 invoked by uid 500); 14 Dec 2007 11:58:12 -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 66262 invoked by uid 99); 14 Dec 2007 11:58:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2007 03:58:12 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2007 11:57:49 +0000 Received: by nf-out-0910.google.com with SMTP id g16so909745nfd.5 for ; Fri, 14 Dec 2007 03:57:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; bh=W2cIDDOBLANOyt6lFdKEosfVIRJ6pM0WjZI4n6sNVA8=; b=vAL+Ae//usUs17mmBb3x0VOBM15DNyEiwt+YfYjzm8f1jPjUlDtWKk0SZ1iTEyslzLFUNn18YuWGxbPx3sft5fjBdARZBOzsFGHIFhUuenO5CE7BSrDTQDo1uvhZ7PiBCO7GIBpKZhTLxM6qeMXI9lGhDRGGmEqosvP957W84VQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=npOUQiPO4Tq5qrus7j06cw8AeyVOQHc7Zvu0c/HA+4AsgCN522oQvRMThbLtI0ZHrZ+Y6e36MpPaQmte+OYObrK8zQ9tleEDSDy3915rE8rrD6pSeLUc+T/9MS/PeeUlvdSNllYjtxV5sXJFy3P4JZXwXucS4ntLUcDJlIhOHDE= Received: by 10.86.97.7 with SMTP id u7mr2922032fgb.54.1197633471627; Fri, 14 Dec 2007 03:57:51 -0800 (PST) Received: from ?192.168.0.1? ( [82.66.216.176]) by mx.google.com with ESMTPS id 4sm6095125fgg.2007.12.14.03.57.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 14 Dec 2007 03:57:50 -0800 (PST) Message-ID: <47626F97.6040402@gmail.com> Date: Fri, 14 Dec 2007 12:57:11 +0100 From: Emmanuel Lecharny User-Agent: Thunderbird 1.5.0.14pre (X11/20071023) MIME-Version: 1.0 To: Apache Directory Developers List Subject: [ServerEntry new API] Q about BasicServerAttribute Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, just a quick Q : we have many methods 'add' in this class. Should we always check that the added value is syntaxically correct ? The current version does not check this : public boolean add( String val ) { return values.add( new ServerStringValue( attributeType, val ) ); } I suggest that we should write this method this way : public boolean add( String val ) throws InvalidAttributeValueException, NamingException { if ( attributeType.getSyntax().isHumanReadable() ) { attributeType.getSyntax().getSyntaxChecker().assertSyntax( val ); return values.add( new ServerStringValue( attributeType, val ) ); } else { throw new InvalidAttributeValueException(); } } wdyt ? -- -- cordialement, regards, Emmanuel L�charny www.iktek.com directory.apache.org