Return-Path: X-Original-To: apmail-sling-commits-archive@www.apache.org Delivered-To: apmail-sling-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 A9C86EC1A for ; Wed, 23 Jan 2013 17:04:54 +0000 (UTC) Received: (qmail 55893 invoked by uid 500); 23 Jan 2013 17:04:54 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 55803 invoked by uid 500); 23 Jan 2013 17:04:53 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 55780 invoked by uid 99); 23 Jan 2013 17:04:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 17:04:53 +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; Wed, 23 Jan 2013 17:04:52 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 894D423889E2; Wed, 23 Jan 2013 17:04:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1437573 - /sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java Date: Wed, 23 Jan 2013 17:04:33 -0000 To: commits@sling.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130123170433.894D423889E2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cziegeler Date: Wed Jan 23 17:04:33 2013 New Revision: 1437573 URL: http://svn.apache.org/viewvc?rev=1437573&view=rev Log: SLING-2713 : java.lang.IllegalStateException: Service already unregistered during unregistering of resource resolver Modified: sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java Modified: sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java?rev=1437573&r1=1437572&r2=1437573&view=diff ============================================================================== --- sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java (original) +++ sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java Wed Jan 23 17:04:33 2013 @@ -299,12 +299,14 @@ public class ResourceResolverFactoryActi private void unregisterFactory() { if ( this.factoryRegistration != null ) { - this.factoryRegistration.unregister(); + final ServiceRegistration local = this.factoryRegistration; this.factoryRegistration = null; + local.unregister(); } if ( this.factory != null ) { - this.factory.deactivate(); + final ResourceResolverFactoryImpl local = this.factory; this.factory = null; + local.deactivate(); } }