Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 36987 invoked from network); 21 Aug 2006 23:07:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Aug 2006 23:07:39 -0000 Received: (qmail 39027 invoked by uid 500); 21 Aug 2006 23:07:39 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 38799 invoked by uid 500); 21 Aug 2006 23:07:38 -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 38788 invoked by uid 99); 21 Aug 2006 23:07:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Aug 2006 16:07:38 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Aug 2006 16:07:38 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 03D367142F5 for ; Mon, 21 Aug 2006 23:04:19 +0000 (GMT) Message-ID: <5811249.1156201459013.JavaMail.jira@brutus> Date: Mon, 21 Aug 2006 16:04:19 -0700 (PDT) From: "Ersin Er (JIRA)" To: dev@directory.apache.org Subject: [jira] Commented: (DIRSERVER-709) Special case, in which removal of objectClass attribute does not cause an error In-Reply-To: <206765.1155984013930.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DIRSERVER-709?page=comments#action_12429563 ] Ersin Er commented on DIRSERVER-709: ------------------------------------ Fixed here http://svn.apache.org/viewvc?rev=433408&view=rev and here http://svn.apache.org/viewvc?rev=433415&view=rev The problem was due to JNDI as it accepts "" as a valid value during a attribute remove operation. Now we do skip "" values in change sets of remove operations. > Special case, in which removal of objectClass attribute does not cause an error > ------------------------------------------------------------------------------- > > Key: DIRSERVER-709 > URL: http://issues.apache.org/jira/browse/DIRSERVER-709 > Project: Directory ApacheDS > Issue Type: Bug > Affects Versions: 1.0-RC4 > Environment: * ApacheDS 1.0 RC4 SNAPSHOT > * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03) > * Windows XP Professional SP2 > Reporter: Stefan Zoerner > Assigned To: Ersin Er > Priority: Minor > Attachments: DeleteObjectClassAttributeJndiTest.java, DeleteObjectClassAttributeNetscapeTest.java > > > In a special case, removal of the objectClass attribute in a certain way does not cause an error (no exception occurs). The entry is unchanged (which is correct), thus this is only a minor problem from my point of view. Here it is: > If one creates an entry like this: > dn: cn=Kate Bush,dc=example,dc=com > objectclass: top > objectclass: person > objectclass: organizationalperson > objectclass: inetorgperson > sn: Bush > cn: Kate Bush > and performs the following modify operation with JNDI > ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass", "")); > ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp }); > the method call of modifyAttributes does not throw an exception. The expected retuirn code is 69 (OBJECT_CLASS_MODS_PROHIBITED). Note that the correct return code is provided by the server, if I perform this Java code: > ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute("objectclass")); > ctx.modifyAttributes("cn=Kate Bush", new ModificationItem[] { delModOp }); > or if the entry looks like this: > dn: cn=Kate Bush,dc=example,dc=com > objectclass: top > objectclass: person > sn: Bush > cn: Kate Bush > I was able to create JUnit test cases both with JNDI and Nescape SDK for Java and will attach both of them later. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira