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/03/08 07:52:13 UTC
[jira] [Resolved] (DIRAPI-123)
o.a.d.api.ldap.model.message.ModifyRequestImpl.remove() with 0 elements
should be a no-op
[ https://issues.apache.org/jira/browse/DIRAPI-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny resolved DIRAPI-123.
--------------------------------------
Resolution: Invalid
> o.a.d.api.ldap.model.message.ModifyRequestImpl.remove() with 0 elements should be a no-op
> -----------------------------------------------------------------------------------------
>
> Key: DIRAPI-123
> URL: https://issues.apache.org/jira/browse/DIRAPI-123
> Project: Directory Client API
> Issue Type: Bug
> Affects Versions: 1.0.0-M15
> Reporter: Rudi Wijaya
>
> Before call to ModifyRequestImpl.add() :
> {code}
> MessageType : MODIFY_REQUEST
> Message ID : -1
> Modify Request
> Object : 'uid=hendy,ou=users,dc=aksimata,dc=com'
> org.apache.directory.api.ldap.model.message.ModifyRequestImpl@5ee989e2
> {code}
> After calling ModifyRequestImpl.add() :
> {code}
> MessageType : MODIFY_REQUEST
> Message ID : -1
> Modify Request
> Object : 'uid=hendy,ou=users,dc=aksimata,dc=com'
> Modification[0]
> Operation : add
> Modification
> mail: hendy@member.dev.aksimata.com
> org.apache.directory.api.ldap.model.message.ModifyRequestImpl@57ba462
> {code}
> After calling ModifyRequestImpl.remove("mail", new String[] { }); :
> {code}
> MessageType : MODIFY_REQUEST
> Message ID : -1
> Modify Request
> Object : 'uid=hendy,ou=users,dc=aksimata,dc=com'
> Modification[0]
> Operation : add
> Modification
> mail: hendy@member.dev.aksimata.com
> Modification[1]
> Operation : delete
> Modification
> mail: (null)
> org.apache.directory.api.ldap.model.message.ModifyRequestImpl@152f7a24
> {code}
> The expected behavior should be : since it's removing a variable number of attribute values, and the number of values is 0, hence it's a no-op.
> Also, any attempt to remove "null" should be an error: (haven't checked yet)
> {code}
> modifyRequest.remove("mail", new String[] { null });
> modifyRequest.remove("mail", new String[] { null, null });
> modifyRequest.remove("mail", null);
> modifyRequest.remove("mail", null, null);
> {code}
--
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