X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.util%2Fsrc%2Forg%2Fargeo%2Futil%2Fdirectory%2Fldap%2FLdapDao.java;h=b1c0c9849a14cb6abdd5214ad239912e591d887f;hb=4012bedd8870634488b307d2233590fb1226e5d4;hp=fac7dd1acf582bb47d7b080bdf70fb8f9cf09b8c;hpb=a2cb5d55f5d0e44d18fd1a2f5256111ad9fa0015;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.util/src/org/argeo/util/directory/ldap/LdapDao.java b/org.argeo.util/src/org/argeo/util/directory/ldap/LdapDao.java index fac7dd1ac..b1c0c9849 100644 --- a/org.argeo.util/src/org/argeo/util/directory/ldap/LdapDao.java +++ b/org.argeo.util/src/org/argeo/util/directory/ldap/LdapDao.java @@ -278,6 +278,8 @@ public class LdapDao extends AbstractLdapDirectoryDao { throw new IllegalArgumentException(dn + " does not start with base DN " + getDirectory().getBaseDn()); Attributes attrs = ldapConnection.getAttributes(dn); return new LdapHierarchyUnit(getDirectory(), dn, attrs); + } catch (NameNotFoundException e) { + return null; } catch (NamingException e) { throw new IllegalStateException("Cannot get hierarchy unit " + dn, e); }