ldap/src/main/java/org/springframework/security/ldap/LdapUtils.java
public static void closeContext(Context ctx) {
		if (ctx instanceof DirContextAdapter) {
			return;
		}

		try {
			if (ctx != null) {
				ctx.close();
			}
		}
		catch (NamingException e) {
			logger.error("Failed to close context.", e);
		}
	}
public static void closeContext(Context ctx) {
		if (ctx instanceof DirContextAdapter) {
			return;
		}

		try {
			if (ctx != null) {
				ctx.close();
			}
		}
		catch (NamingException e) {
			logger.error("Failed to close context.", e);
		}
	}
public static void closeContext ( Context ctx ) { if ( ctx instanceof DirContextAdapter ) { return ; } try { if ( ctx != null ) { ctx . close ( ) ; } } catch ( NamingException e ) { logger . error ( "Failed to close context." , e ) ; } }
========================================================================================================
========================================================================================================