[webbeans-commits] Webbeans SVN: r3248 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/broken/ambiguous and 1 other directory.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Sun Jul 26 14:42:31 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-07-26 14:42:31 -0400 (Sun, 26 Jul 2009)
New Revision: 3248

Modified:
   ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/broken/ambiguous/AmbiguousDependencyTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/broken/ambiguous/Farm_Broken.java
Log:
Fix test

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java	2009-07-26 18:42:00 UTC (rev 3247)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java	2009-07-26 18:42:31 UTC (rev 3248)
@@ -28,7 +28,6 @@
 
 import javax.enterprise.context.Dependent;
 import javax.enterprise.event.Event;
-import javax.enterprise.inject.AmbiguousResolutionException;
 import javax.enterprise.inject.IllegalProductException;
 import javax.enterprise.inject.Instance;
 import javax.enterprise.inject.New;
@@ -151,7 +150,7 @@
       }
       if (resolvedBeans.size() > 1)
       {
-         throw new AmbiguousResolutionException("The injection point " + ij + " with binding types " + Names.annotationsToString(ij.getBindings()) + " in " + ij.getBean() + " has ambiguous dependencies");
+         throw new DeploymentException("The injection point " + ij + " with binding types " + Names.annotationsToString(ij.getBindings()) + " in " + ij.getBean() + " has ambiguous dependencies");
       }
       Bean<?> resolvedBean = (Bean<?>) resolvedBeans.iterator().next();
       if (beanManager.getServices().get(MetaAnnotationStore.class).getScopeModel(resolvedBean.getScopeType()).isNormal() && !Proxies.isTypeProxyable(ij.getType()))

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/broken/ambiguous/AmbiguousDependencyTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/broken/ambiguous/AmbiguousDependencyTest.java	2009-07-26 18:42:00 UTC (rev 3247)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/broken/ambiguous/AmbiguousDependencyTest.java	2009-07-26 18:42:31 UTC (rev 3248)
@@ -33,10 +33,11 @@
 public class AmbiguousDependencyTest extends AbstractJSR299Test
 {
 
-   @Test(groups = "ri-broken")
-   @SpecAssertion(section="5.3.1", id="aa")
-   public void testAmbiguousDependency() {
+   @Test
+   @SpecAssertion(section = "5.3.1", id = "aa")
+   public void testAmbiguousDependency()
+   {
       assert false;
    }
-   
+
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/broken/ambiguous/Farm_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/broken/ambiguous/Farm_Broken.java	2009-07-26 18:42:00 UTC (rev 3247)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/broken/ambiguous/Farm_Broken.java	2009-07-26 18:42:31 UTC (rev 3248)
@@ -18,8 +18,9 @@
 
 import javax.enterprise.inject.Current;
 
- at SuppressWarnings("unused")
+
 class Farm_Broken
 {
+   @SuppressWarnings("unused")
    @Current private Animal animal;
 }




More information about the weld-commits mailing list