[webbeans-commits] Webbeans SVN: r1201 - tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context and 1 other directory.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Fri Jan 23 08:33:44 EST 2009


Author: pete.muir at jboss.org
Date: 2009-01-23 08:33:44 -0500 (Fri, 23 Jan 2009)
New Revision: 1201

Modified:
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/context/ContextMap.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
Log:
WBRI-115

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/context/ContextMap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/context/ContextMap.java	2009-01-23 13:33:08 UTC (rev 1200)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/context/ContextMap.java	2009-01-23 13:33:44 UTC (rev 1201)
@@ -18,6 +18,7 @@
 package org.jboss.webbeans.context;
 
 import java.lang.annotation.Annotation;
+import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.Callable;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -63,7 +64,15 @@
     */
    public List<Context> getContext(Class<? extends Annotation> scopeType)
    {
-      return getValue(scopeType);
+      List<Context> contexts = getValue(scopeType);
+      if (contexts == null)
+      {
+         return Collections.emptyList();
+      }
+      else
+      {
+         return contexts;
+      }
    }
 
    @Override

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java	2009-01-23 13:33:08 UTC (rev 1200)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java	2009-01-23 13:33:44 UTC (rev 1201)
@@ -62,7 +62,7 @@
       manager.getContext(Dummy.class);
    }
 
-   @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager", "broken"}) @SpecAssertion(section="9.6")
+   @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="9.6")
    public void testGetContextWithNoRegisteredContextsFails()
    {
       manager.getContext(Unregistered.class);




More information about the weld-commits mailing list