Return-Path: Delivered-To: apmail-incubator-openwebbeans-commits-archive@minotaur.apache.org Received: (qmail 67562 invoked from network); 26 Feb 2009 14:49:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2009 14:49:45 -0000 Received: (qmail 47048 invoked by uid 500); 26 Feb 2009 14:49:45 -0000 Delivered-To: apmail-incubator-openwebbeans-commits-archive@incubator.apache.org Received: (qmail 47030 invoked by uid 500); 26 Feb 2009 14:49:45 -0000 Mailing-List: contact openwebbeans-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: openwebbeans-dev@incubator.apache.org Delivered-To: mailing list openwebbeans-commits@incubator.apache.org Received: (qmail 47019 invoked by uid 99); 26 Feb 2009 14:49:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Feb 2009 06:49:45 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Feb 2009 14:49:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8376B238898B; Thu, 26 Feb 2009 14:49:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: openwebbeans-commits@incubator.apache.org From: struberg@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090226144922.8376B238898B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 null if no standard context exists for the given scopeType */ - public static WebBeansContext getStandartContext(Class scopeType) throws ContextNotActiveException + public static WebBeansContext getStandardContext(Class 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); }