Author: pete.muir(a)jboss.org
Date: 2009-10-17 17:42:10 -0400 (Sat, 17 Oct 2009)
New Revision: 4175
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployment.java
Log:
Error if loadBeanDeploymentArchive returns null
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployment.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployment.java 2009-10-17
21:24:15 UTC (rev 4174)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployment.java 2009-10-17
21:42:10 UTC (rev 4175)
@@ -132,8 +132,13 @@
{
for (ExtensionBean bean : extensionBeanDeployerEnvironment.getBeans())
{
- if
(deployment.loadBeanDeploymentArchive(bean.getBeanClass()).equals(beanDeploymentArchive))
+ BeanDeploymentArchive classBeanDeploymentArchive =
deployment.loadBeanDeploymentArchive(bean.getBeanClass());
+ if (classBeanDeploymentArchive == null)
{
+ throw new IllegalStateException("deployment.loadBeanDeploymentArchive()
returned null for " + bean.getBeanClass());
+ }
+ if (classBeanDeploymentArchive.equals(beanDeploymentArchive))
+ {
beanDeployer.getManager().addBean(bean);
}
}
Show replies by date