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

radu 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 20d153a  SLING-10939 - Don't register precompiled scripts that are 
missing
20d153a is described below

commit 20d153a96f891e0623726327da7cdcba79e2805e
Author: Karl Pauls <[email protected]>
AuthorDate: Thu Nov 25 15:00:46 2021 +0100

    SLING-10939 - Don't register precompiled scripts that are missing
    
    * catch NCDFE when looking up executables
---
 .../sling/scripting/core/impl/bundled/BundleRenderUnitFinderImpl.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/sling/scripting/core/impl/bundled/BundleRenderUnitFinderImpl.java
 
b/src/main/java/org/apache/sling/scripting/core/impl/bundled/BundleRenderUnitFinderImpl.java
index 69ccf66..1aec026 100644
--- 
a/src/main/java/org/apache/sling/scripting/core/impl/bundled/BundleRenderUnitFinderImpl.java
+++ 
b/src/main/java/org/apache/sling/scripting/core/impl/bundled/BundleRenderUnitFinderImpl.java
@@ -95,7 +95,7 @@ public class BundleRenderUnitFinderImpl implements 
BundledRenderUnitFinder {
         try {
             Class<?> clazz = bundle.loadClass(className);
             return new PrecompiledScript(providers, context, bundle, path, 
clazz, scriptEngineName, scriptExtension, scriptContextProvider);
-        } catch (ClassNotFoundException ignored) {
+        } catch (ClassNotFoundException | NoClassDefFoundError ignored) {
             URL bundledScriptURL = bundle.getEntry(NS_JAVAX_SCRIPT_CAPABILITY 
+ (path.startsWith("/") ? "" : SLASH) + path);
             if (bundledScriptURL != null) {
                 return new Script(providers, context, bundle, path, 
bundledScriptURL, scriptEngineName, scriptExtension, scriptContextProvider);

Reply via email to