--- old/src/java.naming/share/classes/com/sun/jndi/ldap/LdapClient.java 2018-08-24 10:23:01.690558231 +0530 +++ new/src/java.naming/share/classes/com/sun/jndi/ldap/LdapClient.java 2018-08-24 10:23:01.542559994 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -438,14 +438,14 @@ if (!pooled) { // Not being pooled; continue with closing conn.cleanup(reqCtls, false); - conn = null; + //conn = null; } else { // Pooled // Is this a real close or a request to return conn to pool if (hardClose) { conn.cleanup(reqCtls, false); - conn = null; + //conn = null; pcb.removePooledConnection(this); } else { pcb.releasePooledConnection(this); @@ -466,7 +466,7 @@ if (debug > 0) System.err.println( "LdapClient: forced close of connection " + this); conn.cleanup(null, false); - conn = null; + //conn = null; if (cleanPool) { pcb.removePooledConnection(this);