Author: cpopetz
Date: 2009-10-19 12:49:41 -0400 (Mon, 19 Oct 2009)
New Revision: 4196
Added:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
Log:
add test, currently broken, for creating an annotated type for a non-static inner class
with generic constructor parameters
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-10-19
14:52:57 UTC (rev 4195)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-10-19
16:49:41 UTC (rev 4196)
@@ -4,6 +4,7 @@
import java.util.Iterator;
import java.util.Set;
+import javax.enterprise.inject.spi.AnnotatedType;
import javax.enterprise.inject.stereotype.Stereotype;
import javax.inject.Qualifier;
@@ -51,4 +52,11 @@
assert classWithNoAnnotations.getAnnotations().size() == 0;
}
+ @Test
+ public void testNonStaticInnerClassWithGenericTypes()
+ {
+ AnnotatedType at = WeldClassImpl.of(new Kangaroo().procreate().getClass(),
transformer);
+ WeldClassImpl.of(at, transformer);
+ }
+
}
Added:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java
(rev 0)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java 2009-10-19
16:49:41 UTC (rev 4196)
@@ -0,0 +1,17 @@
+package org.jboss.weld.test.unit.implementation.annotatedItem;
+
+
+class Kangaroo
+{
+ LittleKangarooInHerPouch<String> procreate()
+ {
+ return new LittleKangarooInHerPouch<String>("Joey");
+ }
+
+ class LittleKangarooInHerPouch<T>
+ {
+ LittleKangarooInHerPouch(T formalParam)
+ {
+ }
+ }
+}