You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by pa...@apache.org on 2021/11/21 23:46:29 UTC

[sling-org-apache-sling-scripting-core] branch issues/SLING-10934 created (now ca0cb6d)

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

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


      at ca0cb6d  SLING-10934: add a match for method only script to the budnle render unit lookup.

This branch includes the following new commits:

     new ca0cb6d  SLING-10934: add a match for method only script to the budnle render unit lookup.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[sling-org-apache-sling-scripting-core] 01/01: SLING-10934: add a match for method only script to the budnle render unit lookup.

Posted by pa...@apache.org.
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 <ka...@gmail.com>
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);
     }