6717680: LdapCtx does not close the connection if initialization fails
Reviewed-by: vinnie, xuelei
This commit is contained in:
parent
14b56dc3a0
commit
e33cec202f
@ -302,7 +302,16 @@ final public class LdapCtx extends ComponentDirContext
|
||||
|
||||
schemaTrees = new Hashtable(11, 0.75f);
|
||||
initEnv();
|
||||
connect(false);
|
||||
try {
|
||||
connect(false);
|
||||
} catch (NamingException e) {
|
||||
try {
|
||||
close();
|
||||
} catch (Exception e2) {
|
||||
// Nothing
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
LdapCtx(LdapCtx existing, String newDN) throws NamingException {
|
||||
|
Loading…
x
Reference in New Issue
Block a user