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 81BF510750 for ; Wed, 14 Aug 2013 09:59:00 +0000 (UTC) Received: (qmail 94904 invoked by uid 500); 14 Aug 2013 09:58:59 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 94770 invoked by uid 500); 14 Aug 2013 09:58:58 -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 94100 invoked by uid 99); 14 Aug 2013 09:58:50 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Aug 2013 09:58:50 +0000 Date: Wed, 14 Aug 2013 09:58:50 +0000 (UTC) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DIRAPI-120) Deleted an attribute leads to an error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRAPI-120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Lecharny updated DIRAPI-120: ------------------------------------- Fix Version/s: (was: 1.0.0-RC1) 1.0.0-M20 > Deleted an attribute leads to an error > -------------------------------------- > > Key: DIRAPI-120 > URL: https://issues.apache.org/jira/browse/DIRAPI-120 > Project: Directory Client API > Issue Type: Bug > Reporter: Emmanuel Lecharny > Priority: Critical > Fix For: 1.0.0-M20 > > > Modifying an entry and removing an attribute creates a LDIF enry like : > dn: cn=test,ou=users,ou=system > changetype: modify > delete: userPassword > - > which is transformed to a ModifyRequest with a Modification containing the attribute and a 'null' value, which is wrong. > The AttributeUtils.toApiAttributes() method uses : > ... > for ( NamingEnumeration values = jndiAttribute.getAll(); values.hasMoreElements(); ) > { > Object value = values.nextElement(); > if ( value instanceof String ) > { > attribute.add( ( String ) value ); > } > else if ( value instanceof byte[] ) > { > attribute.add( ( byte[] ) value ); > } > else > { > attribute.add( ( String ) null ); <-------------- Wrong ! > } > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira