ldap/src/main/java/org/springframework/security/ldap/authentication/AbstractLdapAuthenticator.java
protected List<String> getUserDns(String username) {
		if (userDnFormat == null) {
			return Collections.emptyList();
		}

		List<String> userDns = new ArrayList<>(userDnFormat.length);
		String[] args = new String[] { LdapEncoder.nameEncode(username) };

		synchronized (userDnFormat) {
			for (MessageFormat formatter : userDnFormat) {
				userDns.add(formatter.format(args));
			}
		}

		return userDns;
	}
protected List<String> getUserDns(String username) {
		if (userDnFormat == null) {
			return Collections.emptyList();
		}

		List<String> userDns = new ArrayList<>(userDnFormat.length);
		String[] args = new String[] { LdapEncoder.nameEncode(username) };

		synchronized (userDnFormat) {
			for (MessageFormat formatter : userDnFormat) {
				userDns.add(formatter.format(args));
			}
		}

		return userDns;
	}
Builds list of possible DNs for the user, worked out from the
<tt>userDnPatterns</tt> property.

@param username the user's login name

@return the list of possible DN matches, empty if <tt>userDnPatterns</tt> wasn't
set.