Author: pete.muir(a)jboss.org
Date: 2009-06-05 08:36:07 -0400 (Fri, 05 Jun 2009)
New Revision: 2769
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Bar.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Baz.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Foo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooBase.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooProducer.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/LookupFoo.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Special.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Wbri256Test.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedItem.java
Log:
WBRI-256
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedItem.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedItem.java 2009-06-05
09:42:47 UTC (rev 2768)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedItem.java 2009-06-05
12:36:07 UTC (rev 2769)
@@ -189,7 +189,7 @@
if (type instanceof Class)
{
Class<?> clazz = (Class<?>) type;
- if (isAssignableFrom(clazz, Reflections.getActualTypeArguments(clazz)))
+ if (isAssignableFrom(clazz, new Type[0]))
{
return true;
}
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Bar.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Bar.java
(rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Bar.java 2009-06-05
12:36:07 UTC (rev 2769)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+public class Bar
+{
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Bar.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Baz.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Baz.java
(rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Baz.java 2009-06-05
12:36:07 UTC (rev 2769)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+public class Baz
+{
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Baz.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Foo.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Foo.java
(rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Foo.java 2009-06-05
12:36:07 UTC (rev 2769)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+public class Foo extends FooBase<Bar>
+{
+
+ public String getName()
+ {
+ return "foo";
+ }
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Foo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooBase.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooBase.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooBase.java 2009-06-05
12:36:07 UTC (rev 2769)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+public class FooBase<T>
+{
+
+ public String getName()
+ {
+ return "foobase";
+ }
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooBase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooProducer.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooProducer.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooProducer.java 2009-06-05
12:36:07 UTC (rev 2769)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import javax.enterprise.inject.Produces;
+
+public class FooProducer
+{
+
+ @Produces @Special
+ public FooBase<Baz> produce()
+ {
+ return new FooBase<Baz>();
+ }
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/FooProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/LookupFoo.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/LookupFoo.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/LookupFoo.java 2009-06-05
12:36:07 UTC (rev 2769)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import javax.enterprise.inject.Current;
+
+public class LookupFoo
+{
+
+ @Current Foo foo;
+
+ @Special FooBase<Baz> foobaz;
+
+ public Foo getFoo()
+ {
+ return foo;
+ }
+
+ public FooBase<Baz> getFoobaz()
+ {
+ return foobaz;
+ }
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/LookupFoo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Special.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Special.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Special.java 2009-06-05
12:36:07 UTC (rev 2769)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+@BindingType
+(a)Retention(RetentionPolicy.RUNTIME)
+(a)Target({ElementType.FIELD, ElementType.METHOD, ElementType.TYPE})
+public @interface Special
+{
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Special.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Wbri256Test.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Wbri256Test.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Wbri256Test.java 2009-06-05
12:36:07 UTC (rev 2769)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.test.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class Wbri256Test extends AbstractWebBeansTest
+{
+
+ @Test
+ public void testParameterizedInjection()
+ {
+ LookupFoo lookupFoo = getCurrentManager().getInstanceByType(LookupFoo.class);
+ assert lookupFoo.getFoo().getName().equals("foo");
+ assert lookupFoo.getFoobaz().getName().equals("foobase");
+ }
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/Wbri256Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain