mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
6717680: LdapCtx does not close the connection if initialization fails
Reviewed-by: vinnie, xuelei
This commit is contained in:
parent
14b56dc3a0
commit
e33cec202f
1 changed files with 10 additions and 1 deletions
|
@ -302,7 +302,16 @@ final public class LdapCtx extends ComponentDirContext
|
|||
|
||||
schemaTrees = new Hashtable(11, 0.75f);
|
||||
initEnv();
|
||||
try {
|
||||
connect(false);
|
||||
} catch (NamingException e) {
|
||||
try {
|
||||
close();
|
||||
} catch (Exception e2) {
|
||||
// Nothing
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
LdapCtx(LdapCtx existing, String newDN) throws NamingException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue