[jboss-cvs] JBossAS SVN: r87533 - branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/management.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Apr 19 08:16:44 EDT 2009
Author: emuckenhuber
Date: 2009-04-19 08:16:41 -0400 (Sun, 19 Apr 2009)
New Revision: 87533
Modified:
branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/management/SecurityDomainMetaMapper.java
Log:
[JBAS-6796] fail if the security domain is required.
Modified: branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/management/SecurityDomainMetaMapper.java
===================================================================
--- branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/management/SecurityDomainMetaMapper.java 2009-04-19 04:20:58 UTC (rev 87532)
+++ branches/Branch_5_x/connector/src/main/org/jboss/resource/deployers/management/SecurityDomainMetaMapper.java 2009-04-19 12:16:41 UTC (rev 87533)
@@ -118,11 +118,7 @@
{
CompositeValue compositeValue = (CompositeValue) metaValue;
- String domainName = (String) metaValueFactory.unwrap(compositeValue.get(DOMAIN));
- // TODO should this be allowed?
- if(domainName == null)
- return null;
-
+ String domainName = (String) metaValueFactory.unwrap(compositeValue.get(DOMAIN));
SecurityDeploymentType deploymentType = (SecurityDeploymentType) metaValueFactory.unwrap(compositeValue.get(DeploymentTypeName));
if(deploymentType == null)
deploymentType = SecurityDeploymentType.NONE;
@@ -144,6 +140,10 @@
securityDomain = new SecurityMetaData();
break;
}
+ // Sanity check
+ if(securityDomain.requiresDomain() && domainName == null)
+ throw new IllegalStateException("null security domain not allowed for SecurityDeploymentType " + deploymentType);
+ // Set the domain
securityDomain.setDomain(domainName);
//
return securityDomain;
More information about the jboss-cvs-commits
mailing list