You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2017/01/27 16:37:38 UTC

svn commit: r1780579 - /sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java

Author: olli
Date: Fri Jan 27 16:37:38 2017
New Revision: 1780579

URL: http://svn.apache.org/viewvc?rev=1780579&view=rev
Log:
SLING-6492 Remove (sub) service user from ScriptCacheImpl

Modified:
    sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java

Modified: sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java?rev=1780579&r1=1780578&r2=1780579&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java (original)
+++ sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java Fri Jan 27 16:37:38 2017
@@ -22,7 +22,6 @@ package org.apache.sling.scripting.core.
 import java.lang.ref.SoftReference;
 import java.util.Arrays;
 import java.util.Dictionary;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.List;
@@ -112,7 +111,6 @@ public class ScriptCacheImpl implements
     private Set<String> extensions = new HashSet<>();
     private String[] additionalExtensions = new String[]{};
     private String[] searchPaths = {};
-    private static final String SLING_SCRIPTING_USER = "sling-scripting";
 
     // use a static policy so that we can reconfigure the watched script files if the search paths are changed
     @Reference(policy = ReferencePolicy.STATIC)
@@ -244,9 +242,7 @@ public class ScriptCacheImpl implements
         }
         ResourceResolver resolver = null;
         try {
-            Map<String, Object> authenticationInfo = new HashMap<>(1);
-            authenticationInfo.put(ResourceResolverFactory.SUBSERVICE, SLING_SCRIPTING_USER);
-            resolver = rrf.getServiceResourceResolver(authenticationInfo);
+            resolver = rrf.getServiceResourceResolver(null);
             searchPaths = resolver.getSearchPath();
         } catch (LoginException e) {
             LOGGER.error("Unable to retrieve a ResourceResolver for determining the search paths.", e);