You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by ed...@apache.org on 2008/06/19 22:23:26 UTC
svn commit: r669676 -
/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java
Author: edalquist
Date: Thu Jun 19 13:23:25 2008
New Revision: 669676
URL: http://svn.apache.org/viewvc?rev=669676&view=rev
Log:
PLUTO-487 Remove call to internalStore from constructor, make internalStore() available as a protected method to sub-classes
Modified:
portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java?rev=669676&r1=669675&r2=669676&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java Thu Jun 19 13:23:25 2008
@@ -133,23 +133,10 @@
preferences.put(storedPreferences[i].getName(),
storedPreferences[i]);
}
- // Store the preferences retrieved from portlet.xml.
- // Portlet preferences are stored everytime when a
- // PortletPreferencesImpl instance is created.
- // So here we do not check the portlet request method ID.
- if (storedPreferences.length >0)
- internalStore();
} catch (PortletContainerException ex) {
LOG.error("Error retrieving preferences.", ex);
//TODO: Rethrow up the stack????
- } catch (IOException ex) {
- LOG.error("Error retrieving preferences.", ex);
- //TODO: Rethrow up the stack????
- } catch (ValidatorException ex) {
- LOG.warn("ValidatorException initializing portlet preferences. "
- + "This is not illegal at this point "
- + "since we are just retreiving from portlet.xml.", ex);
}
if (LOG.isDebugEnabled()) {
LOG.debug("Merged stored preferences: " + toString());
@@ -304,7 +291,7 @@
* @throws ValidatorException if the portlet preferences are not valid.
* @throws IOException if an error occurs with the persistence mechanism.
*/
- private void internalStore() throws IOException, ValidatorException {
+ protected final void internalStore() throws IOException, ValidatorException {
// Validate the preferences before storing, if a validator is defined.
// If the preferences cannot pass the validation,
// an ValidatorException will be thrown out.