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

pauls pushed a commit to branch issues/SLING-10934
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-core.git

commit ca0cb6d04b2cbb84622a8044f9ef373b16138be1
Author: Karl Pauls <[email protected]>
AuthorDate: Mon Nov 22 00:46:15 2021 +0100

    SLING-10934: add a match for method only script to the budnle render unit 
lookup.
---
 .../scripting/core/impl/bundled/BundleRenderUnitFinderImpl.java     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

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 874eeca..69ccf66 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
@@ -139,15 +139,13 @@ public class BundleRenderUnitFinderImpl implements 
BundledRenderUnitFinder {
                 matches.add(base + SLASH + resourceType.getResourceLabel() + 
DOT + extension);
             }
             if (StringUtils.isNotEmpty(method)) {
-                matches.add(base + SLASH + resourceType.getResourceLabel() + 
DOT + method);
-            }
-            matches.add(base + SLASH + resourceType.getResourceLabel());
-            if (StringUtils.isNotEmpty(method)) {
                 matches.add(base + SLASH + method);
+                matches.add(base + SLASH + resourceType.getResourceLabel() + 
DOT + method);
             }
             if (StringUtils.isNotEmpty(extension)) {
                 matches.add(base + SLASH + extension);
             }
+            matches.add(base + SLASH + resourceType.getResourceLabel());
         }
         return Collections.unmodifiableList(matches);
     }

Reply via email to