[webbeans-commits] Webbeans SVN: r3113 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution: broken and 2 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Tue Jul 21 07:49:47 EDT 2009


Author: jharting
Date: 2009-07-21 07:49:46 -0400 (Tue, 21 Jul 2009)
New Revision: 3113

Added:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/CrabSpider.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Max.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Min.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Number.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/NumberProducer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/Game.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/NumberProducer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/PrimitiveInjectionPointTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/AssignabilityOfRawAndParameterizedTypesTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/Dao.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/IntegerHashMap.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/ObjectDao.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/Result.java
Removed:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingAnnotationMemberLiteral_Broken.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingAnnotationMember_Broken.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingArrayTypeMemberLiteral_Broken.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingArrayTypeMember_Broken.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/FakeFish.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ParameterizedBean_Broken.java
Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Cod.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/DaddyLongLegs.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Farmer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Haddock.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/LadybirdSpider.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Salmon.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ScottishFishFarmer.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/SeaBass.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Sole.java
Log:
Typesafe resolution

Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingAnnotationMemberLiteral_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingAnnotationMemberLiteral_Broken.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingAnnotationMemberLiteral_Broken.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,8 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
-
-import javax.enterprise.inject.AnnotationLiteral;
-
-abstract class BindingTypeWithBindingAnnotationMemberLiteral_Broken extends AnnotationLiteral<BindingTypeWithBindingAnnotationMember_Broken> implements BindingTypeWithBindingAnnotationMember_Broken
-{
-   
-}

Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingAnnotationMember_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingAnnotationMember_Broken.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingAnnotationMember_Broken.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,24 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.enterprise.inject.BindingType;
-
- at Target( { TYPE, METHOD, PARAMETER, FIELD })
- at Retention(RUNTIME)
- at Documented
- at BindingType
- at interface BindingTypeWithBindingAnnotationMember_Broken
-{
-   
-   Expensive expensive();
-   
-}

Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingArrayTypeMemberLiteral_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingArrayTypeMemberLiteral_Broken.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingArrayTypeMemberLiteral_Broken.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,8 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
-
-import javax.enterprise.inject.AnnotationLiteral;
-
-abstract class BindingTypeWithBindingArrayTypeMemberLiteral_Broken extends AnnotationLiteral<BindingTypeWithBindingArrayTypeMember_Broken> implements BindingTypeWithBindingArrayTypeMember_Broken
-{
-   
-}

Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingArrayTypeMember_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingArrayTypeMember_Broken.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/BindingTypeWithBindingArrayTypeMember_Broken.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,24 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.enterprise.inject.BindingType;
-
- at Target( { TYPE, METHOD, PARAMETER, FIELD })
- at Retention(RUNTIME)
- at Documented
- at BindingType
- at interface BindingTypeWithBindingArrayTypeMember_Broken
-{
-   
-   boolean[] bool();
-   
-}

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Cod.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Cod.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Cod.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,9 +1,7 @@
 package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
 
 import javax.enterprise.inject.Named;
-import javax.enterprise.inject.deployment.Production;
 
- at Production
 @Whitefish
 @Chunky(realChunky=true)
 @Named("whitefish")

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/CrabSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/CrabSpider.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/CrabSpider.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
+
+import javax.enterprise.inject.Named;
+import javax.enterprise.inject.Policy;
+
+ at Policy
+ at Named
+public class CrabSpider extends Spider
+{
+
+}

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/DaddyLongLegs.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/DaddyLongLegs.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/DaddyLongLegs.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,5 +1,8 @@
 package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
 
+import javax.enterprise.inject.Policy;
+
+ at Policy
 class DaddyLongLegs extends Spider
 {
 

Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/FakeFish.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/FakeFish.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/FakeFish.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,22 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.enterprise.inject.BindingType;
-
- at Target( { TYPE, METHOD, PARAMETER, FIELD })
- at Retention(RUNTIME)
- at Documented
- at BindingType
- at interface FakeFish
-{
-
-}

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Farmer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Farmer.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Farmer.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,8 +1,5 @@
 package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
 
-import javax.enterprise.inject.deployment.Production;
-
- at Production
 class Farmer<T>
 {
 

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Haddock.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Haddock.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Haddock.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,9 +1,7 @@
 package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
 
 import javax.enterprise.inject.Named;
-import javax.enterprise.inject.deployment.Production;
 
- at Production
 @Named
 @FishILike
 class Haddock implements Animal

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/LadybirdSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/LadybirdSpider.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/LadybirdSpider.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,8 +1,8 @@
 package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
 
-import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.RequestScoped;
 
- at ApplicationScoped
+ at RequestScoped
 class LadybirdSpider extends Spider
 {
 

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Max.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Max.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Max.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+ at Target( { TYPE, METHOD, PARAMETER, FIELD })
+ at Retention(RUNTIME)
+ at BindingType
+ at interface Max {
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Min.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Min.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Min.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+ at Target( { TYPE, METHOD, PARAMETER, FIELD })
+ at Retention(RUNTIME)
+ at BindingType
+ at interface Min {
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Number.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Number.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Number.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+ at Target( { TYPE, METHOD, PARAMETER, FIELD })
+ at Retention(RUNTIME)
+ at BindingType
+ at interface Number {
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/NumberProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/NumberProducer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/NumberProducer.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
+
+import javax.enterprise.inject.Produces;
+
+class NumberProducer
+{
+
+   @Produces @Min @Number
+   public static final double min = 0;
+   
+   public static final Double max = Double.valueOf(10.5);
+   
+   @Produces @Max @Number
+   public static Double getMax() {
+      return max;
+   }
+
+}

Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ParameterizedBean_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ParameterizedBean_Broken.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ParameterizedBean_Broken.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
-
-class ParameterizedBean_Broken<T>
-{
-   
-}

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,6 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
 
+import java.lang.reflect.Type;
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
@@ -13,23 +31,19 @@
 import org.jboss.jsr299.tck.AbstractJSR299Test;
 import org.jboss.jsr299.tck.literals.CurrentLiteral;
 import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
 import org.testng.annotations.Test;
 
 /**
  * 
  * Spec version: 20090625
- *
+ * 
  */
 @Artifact
- at BeansXml("beans.xml")
 public class ResolutionByTypeTest extends AbstractJSR299Test
 {
 
-   @Test(groups="resolution")
-   @SpecAssertions({
-      @SpecAssertion(section="5.3", id = "review") // removed from spec?
-   })
+   @Test(groups = "resolution")
+   @SpecAssertion(section = "5.3", id = "l")
    public void testDefaultBindingTypeAssumed() throws Exception
    {
       Set<Bean<Tuna>> possibleTargets = getBeans(Tuna.class);
@@ -37,24 +51,8 @@
       assert possibleTargets.iterator().next().getTypes().contains(Tuna.class);
    }
 
-   @Test(groups = { "resolution", "rewrite" }, expectedExceptions = IllegalArgumentException.class)
-   // This assertion comes back later
-   public  <T> void testParameterizedTypeWithTypeParameter()
-   {
-      getBeans(new TypeLiteral<ParameterizedBean_Broken<T>>(){});
-   }
-
-   @Test(groups = { "resolution", "rewrite" }, expectedExceptions=IllegalArgumentException.class)
-   @SpecAssertion(section="5.3", id = "review") // removed from spec?
-   public void testDuplicateBindingTypesUsed()
-   {
-      getBeans(Tuna.class, new CurrentLiteral(), new CurrentLiteral());
-   }
-
-   @Test(groups="resolution")
-   @SpecAssertions({
-      @SpecAssertion(section = "5.3", id ="review") // removed from spec?
-   })
+   @Test(groups = "resolution")
+   @SpecAssertion(section = "unknown", id = "unknown")
    public void testResolveByType() throws Exception
    {
 
@@ -62,7 +60,9 @@
 
       assert getBeans(Tuna.class).size() == 1;
 
-      Set<Bean<Animal>> beans = getBeans(Animal.class, new AnnotationLiteral<FishILike>() {});
+      Set<Bean<Animal>> beans = getBeans(Animal.class, new AnnotationLiteral<FishILike>()
+      {
+      });
       assert beans.size() == 3;
       List<Class<? extends Animal>> classes = new ArrayList<Class<? extends Animal>>();
       for (Bean<Animal> bean : beans)
@@ -85,22 +85,30 @@
       assert classes.contains(Haddock.class);
    }
 
-   @Test(groups="injection")
-   @SpecAssertions({
-      @SpecAssertion(section = "2.3.4", id = "b" ),
-      @SpecAssertion(section = "5.3",   id = "l"),
-      @SpecAssertion(section = "2.3.3", id = "d" ),
-      @SpecAssertion(section = "5.3.6", id = "a" )
-   })
-   public void testAllBindingTypesSpecifiedForResolutionMustAppearOnWebBean()
+   @Test(groups = "injection")
+   @SpecAssertions( { 
+      @SpecAssertion(section = "2.3.4", id = "b"),
+      @SpecAssertion(section = "5.3", id = "l"),
+      @SpecAssertion(section = "2.3.3", id = "d"),
+      @SpecAssertion(section = "5.3.6", id = "a"),
+      @SpecAssertion(section = "5.3.6", id = "d") })
+   public void testAllBindingTypesSpecifiedForResolutionMustAppearOnBean()
    {
-      assert getBeans(Animal.class, new ChunkyLiteral(), new AnnotationLiteral<Whitefish>() {}).size() == 1;
-      assert getBeans(Animal.class, new ChunkyLiteral(), new AnnotationLiteral<Whitefish>() {}).iterator().next().getTypes().contains(Cod.class);
+      assert getBeans(Animal.class, new ChunkyLiteral(), new AnnotationLiteral<Whitefish>()
+      {
+      }).size() == 1;
+      assert getBeans(Animal.class, new ChunkyLiteral(), new AnnotationLiteral<Whitefish>()
+      {
+      }).iterator().next().getTypes().contains(Cod.class);
 
-      assert getBeans(ScottishFish.class, new AnnotationLiteral<Whitefish>() {}).size() == 2;
+      assert getBeans(ScottishFish.class, new AnnotationLiteral<Whitefish>()
+      {
+      }).size() == 2;
       List<Class<? extends Animal>> classes = new ArrayList<Class<? extends Animal>>();
-      for (Bean<ScottishFish> bean : getBeans(ScottishFish.class, new AnnotationLiteral<Whitefish>() {}))
+      for (Bean<ScottishFish> bean : getBeans(ScottishFish.class, new AnnotationLiteral<Whitefish>()
       {
+      }))
+      {
          if (bean.getTypes().contains(Cod.class))
          {
             classes.add(Cod.class);
@@ -114,49 +122,61 @@
       assert classes.contains(Sole.class);
    }
 
-   @Test(groups="resolution")
-   @SpecAssertions({
-      @SpecAssertion(section="2.2", id="review"),
-      @SpecAssertion(section="2.2", id="review") // what is this testing?
-   })
+   @Test(groups = { "resolution" })
+   @SpecAssertions( { 
+      @SpecAssertion(section = "5.3", id = "k"), 
+      @SpecAssertion(section = "2.2", id = "review"), 
+      @SpecAssertion(section = "2.2", id = "review") })
    public void testResolveByTypeWithTypeParameter() throws Exception
    {
       assert getBeans(new TypeLiteral<Farmer<ScottishFish>>(){}).size() == 1;
-      assert getBeans(new TypeLiteral<Farmer<ScottishFish>>(){}).iterator().next().getTypes().contains(ScottishFishFarmer.class);
+      assert getBeans(new TypeLiteral<Farmer<ScottishFish>>(){}
+      ).iterator().next().getTypes().contains(ScottishFishFarmer.class);
    }
 
-   @Test(groups={"resolution", "producerMethod"})
-   @SpecAssertion(section="2.2.1", id = "i")
+   @Test(groups = { "resolution", "producerMethod" })
+   @SpecAssertions( {
+   	@SpecAssertion(section = "5.3", id = "j"),
+   	@SpecAssertion(section="2.2.1", id = "i") } )
    public void testResolveByTypeWithArray() throws Exception
    {
       assert getBeans(Spider[].class).size() == 1;
    }
 
-   @Test @SpecAssertion(section="5.3", id = "review") // deployment types removed
-   public void testOnlyHighestEnabledPrecedenceWebBeansResolved() throws Exception
+   @Test(groups = { "resolution", "ri-broken" })
+   @SpecAssertions( { 
+      @SpecAssertion(section = "5.3", id = "i"),
+      @SpecAssertion(section = "5.3.4", id = "aa"),
+      @SpecAssertion(section = "5.3.4", id = "ab")})
+   public void testResolveByTypeWithPrimitives() throws Exception
    {
-      assert getBeans(Animal.class, new AnnotationLiteral<Whitefish>() {}).size() == 1;
-      assert getBeans(Animal.class, new AnnotationLiteral<Whitefish>() {}).iterator().next().getTypes().contains(Plaice.class);
-   }
+      new RunInDependentContext()
+      {
+         @Override
+         protected void execute() throws Exception
+         {
+            assert getBeans(Double.class).size() == 2;
+            assert getBeans(double.class).size() == 2;
 
+            Double min = getInstanceByType(Double.class, new AnnotationLiteral<Min>(){});
+            double max = getInstanceByType(double.class, new AnnotationLiteral<Max>(){});
 
-   @Test(groups="resolution")
-   @SpecAssertion(section="5.3", id = "review") // deployment types removed
-   public void testNoWebBeansFound() throws Exception
-   {
-      assert getBeans(Tuna.class, new AnnotationLiteral<FakeFish>() {}).size() == 0;
+            assert min.equals(NumberProducer.min);
+            assert NumberProducer.max.equals(max);
+         }
+      }.run();
    }
 
-   @Test(groups="resolution")
-   @SpecAssertions({
-      @SpecAssertion(section="5.3", id = "l")
+   @Test(groups = "resolution")
+   @SpecAssertions( {
+      @SpecAssertion(section = "5.3", id = "l"),
+      @SpecAssertion(section = "5.3.5", id = "b")
    })
    public void testResolveByTypeWithNonBindingMembers() throws Exception
    {
 
       Set<Bean<Animal>> beans = getBeans(Animal.class, new ExpensiveLiteral()
       {
-
          public int cost()
          {
             return 60;
@@ -167,7 +187,7 @@
             return true;
          }
 
-      }, new AnnotationLiteral<Whitefish>() {});
+      }, new AnnotationLiteral<Whitefish>(){});
       assert beans.size() == 2;
 
       List<Class<? extends Animal>> classes = new ArrayList<Class<? extends Animal>>();
@@ -186,64 +206,25 @@
       assert classes.contains(RoundWhitefish.class);
    }
 
-   @Test(groups={"resolution", "broken"})
-   @SpecAssertion(section="5.3.5", id = "ca")
-   public void testArrayValuedAnnotationMemberWithoutNonBinding()
+   @Test(groups = { "ri-broken", "policy"})
+   @SpecAssertion(section = "5.2", id = "a")
+   public void testPolicyNotAvailableInNonDeploymentArchive() throws Exception
    {
-      Throwable t = null;
-      try
+      new RunInDependentContext()
       {
-         getBeans(Animal.class, new BindingTypeWithBindingArrayTypeMemberLiteral_Broken()
+         @Override
+         protected void execute() throws Exception
          {
-
-            public boolean[] bool()
-            {
-               return new boolean[0];
+            Set<Bean<Spider>> spiders = getBeans(Spider.class, new CurrentLiteral());
+            Set<Type> types = new HashSet<Type>();
+            for (Bean<Spider> spider : spiders) {
+              types.addAll(spider.getTypes());
             }
-
-         });
-      }
-      catch (Throwable throwable)
-      {
-         t = throwable;
-      }
-
-      //assert getCurrentConfiguration().getManagers().isDefinitionError(t);
+            assert !types.contains(CrabSpider.class);
+            assert !types.contains(DaddyLongLegs.class);
+            
+            assert getCurrentManager().getBeans("crabSpider").size() == 0;
+         }
+      }.run();
    }
-
-   @Test(groups={"resolution", "broken"})//, expectedExceptions=DefinitionException.class)
-   @SpecAssertion(section="5.3.5", id = "cb")
-   public void testAnnotationValuedAnnotationMemberWithoutNonBinding()
-   {
-      Throwable t = null;
-      try
-      {
-         getBeans(Animal.class, new BindingTypeWithBindingAnnotationMemberLiteral_Broken()
-         {
-            public Expensive expensive()
-            {
-               return new ExpensiveLiteral()
-               {
-                  public int cost()
-                  {
-                     return 0;
-                  }
-
-                  public boolean veryExpensive()
-                  {
-                     return false;
-                  }
-               };
-            }
-
-         });
-      }
-      catch (Throwable throwable)
-      {
-         t = throwable;
-      }
-
-      //assert getCurrentConfiguration().getManagers().isDefinitionError(t);
-   }
-
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Salmon.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Salmon.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Salmon.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,9 +1,7 @@
 package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
 
 import javax.enterprise.inject.Named;
-import javax.enterprise.inject.deployment.Production;
 
- at Production
 @Named
 @FishILike
 class Salmon implements ScottishFish

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ScottishFishFarmer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ScottishFishFarmer.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ScottishFishFarmer.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,8 +1,5 @@
 package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
 
-import javax.enterprise.inject.deployment.Production;
-
- at Production
 class ScottishFishFarmer extends Farmer<ScottishFish>
 {
 

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/SeaBass.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/SeaBass.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/SeaBass.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,9 +1,7 @@
 package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
 
 import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.deployment.Production;
 
- at Production
 @RequestScoped
 @FishILike
 class SeaBass implements Animal

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Sole.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Sole.java	2009-07-21 11:39:17 UTC (rev 3112)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Sole.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -1,9 +1,7 @@
 package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution;
 
 import javax.enterprise.inject.Named;
-import javax.enterprise.inject.deployment.Production;
 
- at Production
 @Whitefish
 @Named("whitefish")
 class Sole implements ScottishFish

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/Game.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/Game.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/Game.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.broken.primitive;
+
+import javax.enterprise.inject.Current;
+
+ at SuppressWarnings("unused")
+class Game
+{
+   @Current private int number;
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/NumberProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/NumberProducer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/NumberProducer.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.broken.primitive;
+
+import javax.enterprise.inject.Produces;
+
+class NumberProducer
+{
+   @Produces
+   public Integer getNumber()
+   {
+      return null;
+   }
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/PrimitiveInjectionPointTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/PrimitiveInjectionPointTest.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/broken/primitive/PrimitiveInjectionPointTest.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.broken.primitive;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+/**
+ * 
+ * Spec version: 20090625
+ * 
+ */
+ at Artifact
+ at ExpectedDeploymentException(DeploymentError.class)
+public class PrimitiveInjectionPointTest
+{
+   @Test(groups={"resolution, producerMethod", "ri-broken"})
+   @SpecAssertion(section="5.3.4", id="aa")
+   public void testPrimitiveInjectionPointResolvedToNonPrimitiveProducerMethod() {
+      assert false;
+   }
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/AssignabilityOfRawAndParameterizedTypesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/AssignabilityOfRawAndParameterizedTypesTest.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/AssignabilityOfRawAndParameterizedTypesTest.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized;
+
+import java.util.HashMap;
+
+import javax.enterprise.inject.TypeLiteral;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.testng.annotations.Test;
+
+/**
+ * Spec version: 2009625
+ */
+ at Artifact
+public class AssignabilityOfRawAndParameterizedTypesTest extends AbstractJSR299Test
+{
+
+   @Test(groups = { "resolution", "ri-broken" })
+   @SpecAssertion(section = "5.3.3", id = "a")
+   public void testAssignabilityToRawType()
+   {
+      assert getBeans(Dao.class).size() == 2; // Dao and ObjectDao
+   }
+
+   @Test(groups="resolution")
+   @SpecAssertion(section = "5.3.3", id = "b")
+   public void testAssignabilityOfParameterizedTypeWithActualTypesToParameterizedTypeWithActualTypes()
+   {
+      assert getBeans(new TypeLiteral<HashMap<Integer, Integer>>(){}).size() == 1;
+      assert getBeans(new TypeLiteral<HashMap<Integer, Integer>>(){}
+      ).iterator().next().getTypes().contains(IntegerHashMap.class);
+   }
+
+   @Test(groups = { "resolution", "ri-broken" })
+   @SpecAssertion(section = "5.3.3", id = "c")
+   public void testAssignabilityOfParameterizedTypeWithActualTypesToParameterizedTypeWithWildcards()
+   {
+      assert getBeans(new TypeLiteral<HashMap<? extends Number, ? super Integer>>(){}).size() == 1;
+      assert getBeans(new TypeLiteral<HashMap<? extends Number, ? super Integer>>(){}
+      ).iterator().next().getTypes().contains(IntegerHashMap.class);
+   }
+
+   @Test(groups = { "resolution", "ri-broken" })
+   @SpecAssertion(section = "5.3.3", id = "d")
+   public void testAssignabilityOfParameterizedTypeWithTypeVariablesToParameterizedTypeWithWildcards()
+   {
+      assert getBeans(new TypeLiteral<Result<? extends Throwable, ? super Exception>>(){}).size() == 1;
+      assert getBeans(new TypeLiteral<Result<? extends Throwable, ? super Exception>>(){}
+      ).iterator().next().getTypes().contains(Result.class);
+   }
+
+   @Test(groups = { "resolution", "ri-broken" })
+   @SpecAssertion(section = "5.3.3", id = "e")
+   public void testAssignabilityOfParameterizedTypeWithTypeVariablesToParameterizedTypeWithActualTypes()
+   {
+      assert getBeans(new TypeLiteral<Result<Exception, Exception>>(){}).size() == 1;
+      assert getBeans(new TypeLiteral<Result<Exception, Exception>>(){}
+      ).iterator().next().getTypes().contains(Result.class);
+   }
+
+   @Test(groups = { "resolution", "ri-broken" })
+   @SpecAssertion(section = "5.3.3", id = "f")
+   public <T1 extends Exception, T2 extends Exception> void testAssignabilityOfParameterizedTypeWithTypeVariablesToParameterizedTypeTypeVariable()
+   {
+      assert getBeans(new TypeLiteral<Result<T1, T2>>(){}).size() == 1;
+      assert getBeans(new TypeLiteral<Result<Exception, Exception>>(){}
+      ).iterator().next().getTypes().contains(Result.class);
+   }
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/Dao.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/Dao.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/Dao.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,20 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized;
+
+class Dao<T1, T2> {
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/IntegerHashMap.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/IntegerHashMap.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/IntegerHashMap.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized;
+
+import java.util.HashMap;
+
+class IntegerHashMap extends HashMap<Integer, Integer>{
+
+	private static final long serialVersionUID = 1L;
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/ObjectDao.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/ObjectDao.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/ObjectDao.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,20 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized;
+
+class ObjectDao extends Dao<Object, Object>{
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/Result.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/Result.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/parameterized/Result.java	2009-07-21 11:49:46 UTC (rev 3113)
@@ -0,0 +1,20 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.parameterized;
+
+public class Result<T1 extends Exception, T2 extends Exception> {
+}




More information about the weld-commits mailing list