You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:00:32 UTC

[sling-org-apache-sling-resourceresolver] 03/14: SLING-2713 : java.lang.IllegalStateException: Service already unregistered during unregistering of resource resolver

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.resourceresolver-1.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git

commit 61b9dc133dd4b10fdde26e8f017d580357aebb88
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jan 23 17:04:33 2013 +0000

    SLING-2713 :  java.lang.IllegalStateException: Service already unregistered during unregistering of resource resolver
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/resourceresolver@1437573 13f79535-47bb-0310-9956-ffa450edef68
---
 .../resourceresolver/impl/ResourceResolverFactoryActivator.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
index a5b2863..6d41bc3 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
@@ -299,12 +299,14 @@ public class ResourceResolverFactoryActivator {
 
     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();
         }
     }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.