-
Apr 14th, 2012, 08:14 AM
#1
remove non-existed attribute will throw exception
Hi all,I find the following attribute-remove code will throw exception if the attribute not existed:
ModificationItem [] = new ModificationItem[1];
mod[0] = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute(ldapAttrName));
ldapTemplate.modifyAttributes(dn, mod);
I think this is not convenient.I must ensure the attribute existed before remove the attribute.
Can this be refine?more convenient,I advise add ldapTemplate.removeAttributes(String[] attributeName) and
ldapTemplate.removeAttributeValue(String attributeName,Object[] values) method.
Another question,It seems Spring-LDAP has not release new version for long,what's the status of this project?
Best Rgds
L.J.W
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules