Replacing an existing attribute with an attribute with no values lead to an
(illegal) attribute with empty value
----------------------------------------------------------------------------------------------------------------
Key: DIRSERVER-701
URL: http://issues.apache.org/jira/browse/DIRSERVER-701
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
If someone tries to replace an existing attribute with an attribute with no
values (modify op), it is expected that the attribute is removed. In Apache DS
(curent 1.0 branch), this is not the case.
The attached test case creates an inetOrgPerson entry and tries to remove the
givenname attribute with the following lines:
...
// replace attribute givenName with empty value (=> deletion)
Attribute attr = new BasicAttribute("givenname");
ModificationItem item = new ModificationItem(DirContext.REPLACE_ATTRIBUTE,
attr);
ctx.modifyAttributes(rdn, new ModificationItem[] { item });
...
The operation does not cause an error, but afterwards the givenname attribute
is still present in the entry (although it does not have any value). It is
expected that the attribute givenname does not exist anymore within the entry.
The attached test case demonstrates the situation and passes on the following
servers:
* Sun Java System Directory Server 5.2
* OpenLDAP 2.3
* IBM Tivoli Directory Server 6.0
On Apache Directory Server 1.0 RC4 SNAPSHOT, it fails.
--
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