//
if (infos != null)
{
// Get portlet application metadata
PortletApplicationImpl portletApp = (PortletApplicationImpl)container.getPortletApplication();
ContainerUserInfo userInfo = portletApp.getInfo().getUser();
// Clone the map
infos = new HashMap<String, String>(infos);
// Keep only what is of interest with respect to what the portlet app defines
infos.keySet().retainAll(userInfo.getSupportedUserAttributes());
// Make it immutable
infos = Collections.unmodifiableMap(infos);
}
else