提交 2e6ce471 编写于 作者: W weijun

6717680: LdapCtx does not close the connection if initialization fails

Reviewed-by: vinnie, xuelei
上级 762c06cd
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册