You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2025/11/28 14:00:05 UTC

(sling-org-apache-sling-servlets-resolver) branch issue/SLING-13016 created (now 1689f77)

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

rombert pushed a change to branch issue/SLING-13016
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-resolver.git


      at 1689f77  SLING-13016 - RequestWrapper causes NPEs when serving bundled scripts if 'forceResourceType' is not set

This branch includes the following new commits:

     new 1689f77  SLING-13016 - RequestWrapper causes NPEs when serving bundled scripts if 'forceResourceType' is not set

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-servlets-resolver) 01/01: SLING-13016 - RequestWrapper causes NPEs when serving bundled scripts if 'forceResourceType' is not set

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch issue/SLING-13016
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-resolver.git

commit 1689f77e9851399a230619023e26022c3464adee
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Nov 28 14:59:05 2025 +0100

    SLING-13016 - RequestWrapper causes NPEs when serving bundled scripts if 'forceResourceType' is not set
    
    Add back the null check.
---
 .../sling/servlets/resolver/internal/bundle/RequestWrapper.java       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/RequestWrapper.java b/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/RequestWrapper.java
index d46a6c1..627f008 100644
--- a/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/RequestWrapper.java
+++ b/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/RequestWrapper.java
@@ -41,7 +41,9 @@ public class RequestWrapper extends SlingJakartaHttpServletRequestWrapper {
         if (resource == null) {
             return null;
         }
-        if (options != null && options.getForceResourceType().isEmpty()) {
+        if (options != null
+                && options.getForceResourceType() != null
+                && options.getForceResourceType().isEmpty()) {
             options.setForceResourceType(resource.getResourceType());
         }
         RequestDispatcherOptions processedOptions = processOptions(options);