Author: thomas.heute(a)jboss.com
Date: 2011-09-06 12:01:37 -0400 (Tue, 06 Sep 2011)
New Revision: 14012
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
Log:
JBEPP-928: NullPointerException if dashboard context is missing
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2011-08-24
04:38:03 UTC (rev 14011)
+++
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2011-09-06
16:01:37 UTC (rev 14012)
@@ -266,8 +266,11 @@
if (!isDashboard && user != null)
{
PortalObjectId dashboardId = cm.getDashboardIdFor(user);
- ViewPortalCommand vdc = new ViewPortalCommand(dashboardId);
- rd.setAttribute("org.jboss.portal.header.DASHBOARD_URL", new
PortalURLImpl(vdc, controllerCtx, null, null));
+ if (dashboardId != null)
+ {
+ ViewPortalCommand vdc = new ViewPortalCommand(dashboardId);
+ rd.setAttribute("org.jboss.portal.header.DASHBOARD_URL", new
PortalURLImpl(vdc, controllerCtx, null, null));
+ }
}
//
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2011-08-24
04:38:03 UTC (rev 14011)
+++
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2011-09-06
16:01:37 UTC (rev 14012)
@@ -370,8 +370,11 @@
String userId = getUserId(user);
Context dashboardContext =
portalObjectContainer.getContext(dashboardContextId);
-
- return dashboardContext.getId().getChildId(userId);
+
+ if (dashboardContext != null)
+ {
+ return dashboardContext.getId().getChildId(userId);
+ }
}
return null;
Show replies by date