After looking at the proposed fix for: https://issues.apache.org/jira/browse/PLUTO-487 I'm wondering if the internalStore() call in the constructor of PortletPreferencesImpl is needed.

The PortletPreferencesImpl constructor loads the default preferences via the PortletEntity (which come from the PortletDD/portlet.xml) then calls the PortletPreferencesService to load the persisted preferences. These two sets are merged and then internalStore() is called. This appears to be to allow the PortletPreferencesService to store the post-merged preferences but all of this information would be available to the PortletPreferencesService impl via other container APIs. Removing the internalStore() call should not change behavior or compliance with PLT.14.1 as all preferences will still be loaded (defaults first then persisted preferences). It would be a benefit for implementors as it would significantly reduce the number of calls to PortletPreferencesService.store which may be a relatively expensive operation.

I'm waiting to hear back from the original issue reporter on the idea of just removing internalStore() and if anyone on this list has any objections let me know.

-Eric

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to