final String remoteUser = portletRequest.getRemoteUser();
if (remoteUser == null) {
return null;
}
final IPersonAttributes personAttributes = this.personAttributeDao.getPerson(remoteUser);
if (personAttributes == null) {
return Collections.emptyMap();
}
final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(httpServletRequest, plutoPortletWindow);
final List<UserAttributeDD> expectedUserAttributes = this.getExpectedUserAttributes(httpServletRequest, portletWindow);
final Map<String, List<Object>> portletMultivaluedAttributes = 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 UserAttributeDD userAttributeDD : expectedUserAttributes) {
final String attributeName = userAttributeDD.getName();
//containsKey check to handle attributes with a single null value
if (attributes.containsKey(attributeName)) {