Attributes in Detail
One of the three following conditions will be true for an attribute in an entry: the attribute is present but has no value (actually a null value), the attribute is not present, or the attribute is present and has one or more values:
Attribute present in entry with no value. The following abbreviated LDIF record shows that this entry has the telephoneNumber attribute, but that the attribute has no value.
dn: uid=andy1, ou=People, o=airius.com ou: People cn: Andy Jones ... telephoneNumber:
This is a valid condition, and when prettyPrint executes, it does not print the attribute in the listing. Code that detects this condition sets the boolean flag hasVals inside the enumeration loop:
while ( enumVals.hasMoreElements() ) { ...
Get LDAP Programming with Java™ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.