You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2024/07/12 07:40:04 UTC

(sling-org-apache-sling-resourceresolver) branch master updated: SLING-12381 : Always clear provider context on deactivate

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

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git


The following commit(s) were added to refs/heads/master by this push:
     new d039940  SLING-12381 : Always clear provider context on deactivate
d039940 is described below

commit d039940cc56e4360c4d2ba1592203b98254e4e67
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jul 12 09:39:57 2024 +0200

    SLING-12381 : Always clear provider context on deactivate
---
 .../sling/resourceresolver/impl/providers/ResourceProviderHandler.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/resourceresolver/impl/providers/ResourceProviderHandler.java b/src/main/java/org/apache/sling/resourceresolver/impl/providers/ResourceProviderHandler.java
index c5cda3e..29d2fe6 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/providers/ResourceProviderHandler.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/providers/ResourceProviderHandler.java
@@ -86,9 +86,10 @@ public class ResourceProviderHandler implements Comparable<ResourceProviderHandl
         if ( this.provider != null ) {
             this.provider.stop();
             this.provider = null;
-            this.context.update(null, null);
             this.bundleContext.ungetService(this.info.getServiceReference());
         }
+        this.context.update(null, null);
+        this.isUsed = false;
     }
 
     /**