ldap/src/main/java/org/springframework/security/ldap/SpringSecurityLdapTemplate.java
private void extractStringAttributeValues(DirContextAdapter adapter,
			Map<String, List<String>> record, String attributeName) {
		Object[] values = adapter.getObjectAttributes(attributeName);
		if (values == null || values.length == 0) {
			if (logger.isDebugEnabled()) {
				logger.debug("No attribute value found for '" + attributeName + "'");
			}
			return;
		}
		List<String> svalues = new ArrayList<>();
		for (Object o : values) {
			if (o != null) {
				if (String.class.isAssignableFrom(o.getClass())) {
					svalues.add((String) o);
				}
				else {
					if (logger.isDebugEnabled()) {
						logger.debug("Attribute:" + attributeName
								+ " contains a non string value of type[" + o.getClass()
								+ "]");
					}
					svalues.add(o.toString());
				}
			}
		}
		record.put(attributeName, svalues);
	}
private void extractStringAttributeValues(DirContextAdapter adapter,
			Map<String, List<String>> record, String attributeName) {
		Object[] values = adapter.getObjectAttributes(attributeName);
		if (values == null || values.length == 0) {
			if (logger.isDebugEnabled()) {
				logger.debug("No attribute value found for '" + attributeName + "'");
			}
			return;
		}
		List<String> svalues = new ArrayList<>();
		for (Object o : values) {
			if (o != null) {
				if (String.class.isAssignableFrom(o.getClass())) {
					svalues.add((String) o);
				}
				else {
					if (logger.isDebugEnabled()) {
						logger.debug("Attribute:" + attributeName
								+ " contains a non string value of type[" + o.getClass()
								+ "]");
					}
					svalues.add(o.toString());
				}
			}
		}
		record.put(attributeName, svalues);
	}
private void extractStringAttributeValues ( DirContextAdapter adapter , Map < String , List < String > > record , String attributeName ) { Object [ ] values = adapter . getObjectAttributes ( attributeName ) ; if ( values == null || values . length == 0 ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "No attribute value found for '" + attributeName + "'" ) ; } return ; } List < String > svalues = new ArrayList <> ( ) ; for ( Object o : values ) { if ( o != null ) { if ( String . class . isAssignableFrom ( o . getClass ( ) ) ) { svalues . add ( ( String ) o ) ; } else { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Attribute:" + attributeName + " contains a non string value of type[" + o . getClass ( ) + "]" ) ; } svalues . add ( o . toString ( ) ) ; } } } record . put ( attributeName , svalues ) ; }
Extracts String values for a specified attribute name and places them in the map
representing the ldap record If a value is not of type String, it will derive it's
value from the {@link Object#toString()}

@param adapter - the adapter that contains the values
@param record - the map holding the attribute names and values
@param attributeName - the name for which to fetch the values from
Extracts String values for a specified attribute name and places them in the map representing the ldap record If a value is not of type String it will derive it s value from the { @link Object#toString () }