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 2020/04/20 15:35:44 UTC

[sling-org-apache-sling-scripting-bundle-tracker] branch master updated: Fix a nullpointer if no options are provided

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

pauls pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-bundle-tracker.git


The following commit(s) were added to refs/heads/master by this push:
     new 36e2853  Fix a nullpointer if no options are provided
36e2853 is described below

commit 36e28538990a1c4980ae1bac66b9ee56a82999c3
Author: Karl Pauls <kp...@adobe.com>
AuthorDate: Mon Apr 20 17:34:51 2020 +0200

    Fix a nullpointer if no options are provided
---
 .../sling/scripting/bundle/tracker/internal/request/RequestWrapper.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/request/RequestWrapper.java b/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/request/RequestWrapper.java
index 630d6c3..e80663a 100644
--- a/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/request/RequestWrapper.java
+++ b/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/request/RequestWrapper.java
@@ -46,7 +46,7 @@ public class RequestWrapper extends SlingHttpServletRequestWrapper {
         if (resource == null) {
             return null;
         }
-        if (StringUtils.isEmpty(options.getForceResourceType())) {
+        if (options != null && StringUtils.isEmpty(options.getForceResourceType())) {
             options.setForceResourceType(resource.getResourceType());
         }
         RequestDispatcherOptions processedOptions = processOptions(options);