Author: thomas.heute(a)jboss.com
Date: 2007-09-19 05:02:14 -0400 (Wed, 19 Sep 2007)
New Revision: 8347
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
Log:
Check that the user's dashboard exists before attempting to delete it
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2007-09-19
08:57:25 UTC (rev 8346)
+++
trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2007-09-19
09:02:14 UTC (rev 8347)
@@ -332,12 +332,19 @@
}
+ /**
+ * Destroys the user dashboard if any
+ */
public void destroyDashboard(String userId)
{
try
{
Context dashboardContext =
(Context)portalObjectContainer.getContext(dashboardContextId);
- dashboardContext.destroyChild(userId);
+ // Check that the user has a dashboard
+ if (dashboardContext.getChild(userId) != null)
+ {
+ dashboardContext.destroyChild(userId);
+ }
}
catch (NoSuchPortalObjectException e)
{