Author: thomas.heute(a)jboss.com
Date: 2007-09-19 04:57:25 -0400 (Wed, 19 Sep 2007)
New Revision: 8346
Modified:
branches/JBoss_Portal_Branch_2_6/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:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2007-09-18
22:59:23 UTC (rev 8345)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2007-09-19
08:57:25 UTC (rev 8346)
@@ -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)
{