Return-Path: X-Original-To: apmail-openwebbeans-commits-archive@www.apache.org Delivered-To: apmail-openwebbeans-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2E0A9F776 for ; Sun, 24 Mar 2013 21:44:05 +0000 (UTC) Received: (qmail 45431 invoked by uid 500); 24 Mar 2013 21:44:05 -0000 Delivered-To: apmail-openwebbeans-commits-archive@openwebbeans.apache.org Received: (qmail 45417 invoked by uid 500); 24 Mar 2013 21:44:05 -0000 Mailing-List: contact commits-help@openwebbeans.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwebbeans.apache.org Delivered-To: mailing list commits@openwebbeans.apache.org Received: (qmail 45408 invoked by uid 99); 24 Mar 2013 21:44:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Mar 2013 21:44:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Sun, 24 Mar 2013 21:44:02 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D63D823888CD; Sun, 24 Mar 2013 21:43:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1460472 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java Date: Sun, 24 Mar 2013 21:43:41 -0000 To: commits@openwebbeans.apache.org From: rmannibucau@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130324214341.D63D823888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rmannibucau Date: Sun Mar 24 21:43:41 2013 New Revision: 1460472 URL: http://svn.apache.org/r1460472 Log: OWB-801 null instance shouldn't be destroyed Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java?rev=1460472&r1=1460471&r2=1460472&view=diff ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java (original) +++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java Sun Mar 24 21:43:41 2013 @@ -194,7 +194,11 @@ public abstract class AbstractContext im CreationalContext cc = (CreationalContext)instance.getBeanCreationalContext(); //Destroy instance - destroyInstance((Contextual) contextual, instance.getBeanInstance(), cc); + final Object beanInstance = instance.getBeanInstance(); + if (beanInstance != null) + { + destroyInstance((Contextual) contextual, beanInstance, cc); + } } //Clear context map