Details
Description
Here is a strange behavior, which I am only able to demonstrate with Netscape LDAP SDK for Java (or compatible APIs like Sun or Mozilla). I create an LDAPEntry with two separate LDAPAttribute objects for two description values in the LDAPAttributeSet.
...
LDAPAttributeSet attrs = new LDAPAttributeSet();
LDAPAttribute ocls = new LDAPAttribute("objectclass", new String[]
);
attrs.add(ocls);
attrs.add(new LDAPAttribute("sn", "Bush"));
attrs.add(new LDAPAttribute("cn", "Kate Bush"));
String descr[] =
{ "a British singer-songwriter with an expressive four-octave voice", "one of the most influential female artists of the twentieth century" };
attrs.add(new LDAPAttribute("description", descr[0]));
attrs.add(new LDAPAttribute("description", descr[1]));
...
After creation, the outcome is an entry within ApacheDS with only one of the description values:
dn: cn=Kate Bush,dc=example,dc=com
objectclass: top
objectclass: person
cn: Kate Bush
sn: Bush
description: one of the most influential female artists of the twentieth century
I attach the complete code as a JUnit test case. The code (and the test case) works with other LDAP servers (Sun Java System Directory Server 5.2 for instance) as expected (entry with two description values).
I was not able to create a comparable problem with an add operation with JNDI. I assume that the corresponding BasicAttributes class within JNDI and its LDAP provider combines/consolidates the attributes on its own, which results in one attribute with two values.
Attachments
Attachments
Issue Links
- relates to
-
DIRSERVER-700 Adding an entry with two description attributes does not combine values, if attribute values are seperated
- Closed