* @param remoteUser
* @param expectedUserAttributes
* @return an unmodifiable map containing the multi-valued attributes for the user within the list of expected attributes
*/
protected Map<String, List<Object>> getMultiValuedUserInfoMap(String remoteUser, List<? extends UserAttribute> expectedUserAttributes) {
final IPersonAttributes personAttributes = this.personAttributeDao.getPerson(remoteUser);
if (personAttributes == null) {
return Collections.emptyMap();
}
final Map<String, List<Object>> resultUserInfoMap = new HashMap<String, List<Object>>(expectedUserAttributes.size());
//Copy expected attributes to the USER_INFO Map
final Map<String, List<Object>> attributes = personAttributes.getAttributes();
for (final UserAttribute userAttributeDD : expectedUserAttributes) {
final String userAttributeName = userAttributeDD.getName();
//containsKey check to handle attributes with a single null value
if (attributes.containsKey(userAttributeName)) {