Author: pete.muir(a)jboss.org
Date: 2009-10-30 06:49:07 -0400 (Fri, 30 Oct 2009)
New Revision: 4437
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/extensions/ExtensionTest.java
Log:
WELD-234
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java
===================================================================
---
core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java 2009-10-30
09:24:23 UTC (rev 4436)
+++
core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java 2009-10-30
10:49:07 UTC (rev 4437)
@@ -29,6 +29,7 @@
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.Extension;
import javax.inject.Inject;
import org.jboss.weld.BeanManagerImpl;
@@ -288,7 +289,8 @@
EJBApiAbstraction ejbApiAbstraction =
manager.getServices().get(EJBApiAbstraction.class);
JsfApiAbstraction jsfApiAbstraction =
manager.getServices().get(JsfApiAbstraction.class);
ServletApiAbstraction servletApiAbstraction =
manager.getServices().get(ServletApiAbstraction.class);
- return !clazz.isNonStaticMemberClass() &&
+ return !Extension.class.isAssignableFrom(clazz.getJavaClass()) &&
+ !clazz.isNonStaticMemberClass() &&
!Reflections.isParamerterizedTypeWithWildcard(javaClass) &&
!servletApiAbstraction.SERVLET_CLASS.isAssignableFrom(javaClass) &&
!servletApiAbstraction.FILTER_CLASS.isAssignableFrom(javaClass) &&
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/extensions/ExtensionTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/extensions/ExtensionTest.java 2009-10-30
09:24:23 UTC (rev 4436)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/extensions/ExtensionTest.java 2009-10-30
10:49:07 UTC (rev 4437)
@@ -12,7 +12,7 @@
public class ExtensionTest extends AbstractWeldTest
{
- @Test(description="WELD-234", groups="broken")
+ @Test(description="WELD-234")
public void testExtensionInjectableAsBean()
{
assert SimpleExtension.getInstance() != null;