String key = pd.getId().toString();
HashMap instanceCache = (HashMap)portletCache.get(((PortletApplication)pd.getPortletApplicationDefinition()).getName());
PortletInstance instance = instanceCache != null ? (PortletInstance)instanceCache.get(pd.getName()) : null;
if (instance != null)
{
JetspeedPortletConfig config = (JetspeedPortletConfig)instance.getConfig();
config.setPortletDefinition(pd);
}
}
}
}