You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2013/08/14 11:58:50 UTC
[jira] [Updated] (DIRAPI-120) Deleted an attribute leads to an
error
[ 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