Author: nfilotto
Date: 2011-04-08 10:36:25 -0400 (Fri, 08 Apr 2011)
New Revision: 4219
Modified:
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java
Log:
EXOJCR-1298: Don't informative error at DefaultLoginModule.login() when the container
is null.
Modified:
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java
===================================================================
---
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java 2011-04-07
14:59:04 UTC (rev 4218)
+++
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java 2011-04-08
14:36:25 UTC (rev 4219)
@@ -113,7 +113,15 @@
if (container instanceof RootContainer)
{
container =
RootContainer.getInstance().getPortalContainer(portalContainerName);
+ if (container == null)
+ {
+ throw new Exception("The eXo container is null, because the current
container is a RootContainer and there is no PortalContainer with the name '" +
portalContainerName + "'.");
+ }
}
+ else if (container == null)
+ {
+ throw new Exception("The eXo container is null, because the current
container is null.");
+ }
return container;
}
Show replies by date