openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r748164 - in /incubator/openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/container/ManagerImpl.java main/java/org/apache/webbeans/context/ContextFactory.java test/java/org/apache/webbeans/test/servlet/TestContext.java
Date Thu, 26 Feb 2009 14:49:22 GMT
Author: struberg
Date: Thu Feb 26 14:49:21 2009
New Revision: 748164

URL: http://svn.apache.org/viewvc?rev=748164&view=rev
Log:
OWB-80 throw ContextNotActiveException if no active (or non at all) context exists
additionally fix typo

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ManagerImpl.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestContext.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ManagerImpl.java?rev=748164&r1=748163&r2=748164&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ManagerImpl.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ManagerImpl.java
Thu Feb 26 14:49:21 2009
@@ -120,7 +120,7 @@
         
         Context standartContext = null;
 
-        standartContext = ContextFactory.getStandartContext(scopType);
+        standartContext = ContextFactory.getStandardContext(scopType);
 
         if(standartContext != null)
         {

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java?rev=748164&r1=748163&r2=748164&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java
Thu Feb 26 14:49:21 2009
@@ -298,13 +298,11 @@
     }
 
     /**
-     * Gets the current context with given scope type.
+     * Gets the standard context with given scope type.
      * 
-     * @return the current context
-     * @throws ContextNotActiveException if context is not active
-     * @throws IllegalArgumentException if the type is not a standard context
+     * @return the current context, or <code>null</code> if no standard context
exists for the given scopeType
      */
-    public static WebBeansContext getStandartContext(Class<? extends Annotation> scopeType)
throws ContextNotActiveException
+    public static WebBeansContext getStandardContext(Class<? extends Annotation> scopeType)
     {
         WebBeansContext context = null;
 
@@ -329,10 +327,6 @@
         {
             context = getDependentContext();
         }
-        else 
-        {
-            throw new IllegalArgumentException("There is no such a standard context with
name id=" + scopeType.getName());
-        }
         
         return context;
     }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestContext.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestContext.java?rev=748164&r1=748163&r2=748164&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestContext.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestContext.java
Thu Feb 26 14:49:21 2009
@@ -144,7 +144,7 @@
     
     protected void initDependentContext()
     {
-        DependentContext dependentContext = (DependentContext)ContextFactory.getStandartContext(Dependent.class);
+        DependentContext dependentContext = (DependentContext)ContextFactory.getStandardContext(Dependent.class);
         dependentContext.setActive(true);
     }
 



Mime
View raw message