for (Map.Entry<String, List<String>> entry : clonePortletInfo.getPortletPreferences().entrySet())
{
String prefName = entry.getKey();
List<String> prefValues = entry.getValue();
Preferences prefs = clone.getPortletPreferences();
Preference pref = prefs.getPortletPreference(prefName);
if (pref == null)
{
pref = prefs.addPreference(prefName);
}
List<String> values = pref.getValues();
values.clear();
values.addAll(prefValues);
prefProvider.storeDefaults(clone, pref);
}