Announcement Announcement Module
Collapse
No announcement yet.
remove non-existed attribute will throw exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
Working...
X