You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2017/12/18 13:47:49 UTC

[GitHub] kwin commented on a change in pull request #1: SLING-7313 refresh the resource type resolver as well

kwin commented on a change in pull request #1: SLING-7313 refresh the resource type resolver as well
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/1#discussion_r157487797
 
 

 ##########
 File path: src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceResolverControl.java
 ##########
 @@ -148,12 +148,20 @@ private void logout() {
     }
 
     /**
-     * Refreshes all refreshable providers.
+     * Refreshes all refreshable providers as well as the resolver used for resource types.
      */
     public void refresh(@Nonnull final ResourceResolverContext context) {
         for (final AuthenticatedResourceProvider p : context.getProviderManager().getAllUsedRefreshable()) {
             p.refresh();
         }
+        if (this.resourceTypeResourceResolver != null) {
+            try {
+                this.resourceTypeResourceResolver.close();
 
 Review comment:
   Yes, of course. Good catch

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services