kwin commented on a change in pull request #3: SLING-8425 - Fix NPE on GraalVM
URL: 
https://github.com/apache/sling-org-apache-sling-scripting-core/pull/3#discussion_r285744484
 
 

 ##########
 File path: 
src/main/java/org/apache/sling/scripting/core/impl/jsr223/SlingScriptEngineManager.java
 ##########
 @@ -293,13 +293,19 @@ private ScriptEngineManager 
getInternalScriptEngineManager() {
 
     private void registerAssociations(ScriptEngineFactory factory) {
         for (String extension : factory.getExtensions()) {
-            internalManager.registerEngineExtension(extension, factory);
+            if (extension != null && !extension.isEmpty()) {
+                internalManager.registerEngineExtension(extension, factory);
+            }
         }
 
 Review comment:
   There should be an else block for all three registration types which emits 
at least a Warn on the log in case null is given

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


With regards,
Apache Git Services

Reply via email to