[webbeans-commits] Webbeans SVN: r240 - in ri/trunk/webbeans-ri: src/main/java/org/jboss/webbeans/model/bean and 1 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Tue Nov 4 13:04:45 EST 2008
Author: pete.muir at jboss.org
Date: 2008-11-04 13:04:44 -0500 (Tue, 04 Nov 2008)
New Revision: 240
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/bean/SimpleBeanModel.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java
ri/trunk/webbeans-ri/testng.xml
Log:
fix inner class support
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/bean/SimpleBeanModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/bean/SimpleBeanModel.java 2008-11-04 17:59:11 UTC (rev 239)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/bean/SimpleBeanModel.java 2008-11-04 18:04:44 UTC (rev 240)
@@ -58,9 +58,9 @@
public static void checkType(Class<?> type)
{
- if (Reflections.isStaticInnerClass(type))
+ if (Reflections.isNonStaticInnerClass(type))
{
- throw new DefinitionException("Simple Web Bean " + type + " cannot be a static inner class");
+ throw new DefinitionException("Simple Web Bean " + type + " cannot be a non-static inner class");
}
if (Reflections.isParameterizedType(type))
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java 2008-11-04 17:59:11 UTC (rev 239)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java 2008-11-04 18:04:44 UTC (rev 240)
@@ -48,14 +48,14 @@
new SimpleBeanModel<Cow>(new SimpleAnnotatedType<Cow>(Cow.class), getEmptyAnnotatedType(Cow.class), manager);
}
- @Test(expectedExceptions=DefinitionException.class, groups="innerClass") @SpecAssertion(section="3.2")
- public void testStaticInnerClassDeclaredInJavaIsNotAllowed()
+ @Test(groups="innerClass") @SpecAssertion(section="3.2")
+ public void testStaticInnerClassDeclaredInJavaAllowed()
{
new SimpleBeanModel<StaticInnerBean>(new SimpleAnnotatedType<StaticInnerBean>(StaticInnerBean.class), getEmptyAnnotatedType(StaticInnerBean.class), manager);
}
- @Test(groups="innerClass") @SpecAssertion(section="3.2")
- public void testNonStaticInnerClassDeclaredInJavaAllowed()
+ @Test(expectedExceptions=DefinitionException.class, groups="innerClass") @SpecAssertion(section="3.2")
+ public void testNonStaticInnerClassDeclaredInJavaNotAllowed()
{
new SimpleBeanModel<InnerBean>(new SimpleAnnotatedType<InnerBean>(InnerBean.class), getEmptyAnnotatedType(InnerBean.class), manager);
}
@@ -116,14 +116,14 @@
new SimpleBeanModel<Cow>(new SimpleAnnotatedType<Cow>(Cow.class), getEmptyAnnotatedType(Cow.class), manager);
}
- @Test(expectedExceptions=DefinitionException.class, groups="innerClass") @SpecAssertion(section="3.2.4")
- public void testStaticInnerClassDeclaredInXmlIsNotAllowed()
+ @Test(groups="innerClass") @SpecAssertion(section="3.2.4")
+ public void testStaticInnerClassDeclaredInXmlAllowed()
{
new SimpleBeanModel<StaticInnerBean>(new SimpleAnnotatedType<StaticInnerBean>(StaticInnerBean.class), getEmptyAnnotatedType(StaticInnerBean.class), manager);
}
- @Test(groups="innerClass") @SpecAssertion(section="3.2.4")
- public void testNonStaticInnerClassDeclaredInXmlAllowed()
+ @Test(expectedExceptions=DefinitionException.class, groups="innerClass") @SpecAssertion(section="3.2.4")
+ public void testNonStaticInnerClassDeclaredInXmlNotAllowed()
{
new SimpleBeanModel<InnerBean>(new SimpleAnnotatedType<InnerBean>(InnerBean.class), getEmptyAnnotatedType(InnerBean.class), manager);
}
Modified: ri/trunk/webbeans-ri/testng.xml
===================================================================
--- ri/trunk/webbeans-ri/testng.xml 2008-11-04 17:59:11 UTC (rev 239)
+++ ri/trunk/webbeans-ri/testng.xml 2008-11-04 18:04:44 UTC (rev 240)
@@ -19,7 +19,6 @@
<exclude name="jms" />
<exclude name="interceptors" />
<exclude name="decorators" />
- <exclude name="innerClass" />
<exclude name="servlet" />
<exclude name="clientProxy" />
<exclude name="passivation" />
More information about the weld-commits
mailing list