sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject [sling-org-apache-sling-scripting-core] branch master updated: SLING-7301 NPE in ScriptCacheImpl when no configuration is present
Date Sun, 10 Dec 2017 11:54:57 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 30e8f68  SLING-7301 NPE in ScriptCacheImpl when no configuration is present
30e8f68 is described below

commit 30e8f68fa0535d0446d244c3948773af3766baf5
Author: Oliver Lietz <olli@apache.org>
AuthorDate: Sun Dec 10 12:54:32 2017 +0100

    SLING-7301 NPE in ScriptCacheImpl when no configuration is present
    
    add null-check for additionalExtensions
---
 .../java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java b/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java
index a17e05d..091edad 100644
--- a/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java
+++ b/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java
@@ -248,7 +248,9 @@ public class ScriptCacheImpl implements ScriptCache, ResourceChangeListener,
Ext
                 resourceChangeListener = null;
             }
             internalMap.clear();
-            extensions.addAll(Arrays.asList(additionalExtensions));
+            if (additionalExtensions != null) {
+                extensions.addAll(Arrays.asList(additionalExtensions));
+            }
             if (!extensions.isEmpty()) {
                 Set<String> globPatterns = new HashSet<>(extensions.size());
                 for (String extension : extensions) {

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

Mime
View raw message