Author: thomas.heute(a)jboss.com
Date: 2008-07-15 06:21:47 -0400 (Tue, 15 Jul 2008)
New Revision: 11448
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java
Log:
Prabhat found NPE. If it happens again we'll know if the context or the container is
null
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java 2008-07-15
05:09:34 UTC (rev 11447)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java 2008-07-15
10:21:47 UTC (rev 11448)
@@ -69,7 +69,12 @@
ControllerCommand cmd = nextFactory.doMapping(controllerContext, invocation, host,
contextPath, requestPath);
if (cmd == null)
{
- Portal portal = (Portal)container.getContext().getDefaultPortal();
+ Context context = container.getContext();
+ if (context == null)
+ {
+ throw new IllegalStateException("Context does not exist");
+ }
+ Portal portal = (Portal)context.getDefaultPortal();
if (portal == null)
{
throw new IllegalStateException("Default portal does not exist");
Show replies by date