You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2021/10/08 16:56:08 UTC

[sling-org-apache-sling-scripting-core] branch master updated: trivial: log resource path instead of resource.toString() when LazyInputStream cannot get stream

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

kwin 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 72cedd2  trivial: log resource path instead of resource.toString() when LazyInputStream cannot get stream
72cedd2 is described below

commit 72cedd28248094c55c643709979f4d1835e84ada
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Fri Oct 8 18:56:02 2021 +0200

    trivial: log resource path instead of resource.toString() when
    LazyInputStream cannot get stream
---
 .../java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java b/src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java
index f7cd274..d47c7e7 100644
--- a/src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java
+++ b/src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java
@@ -861,7 +861,7 @@ class DefaultSlingScript implements SlingScript, Servlet, ServletConfig {
                 delegatee = this.resource.adaptTo(InputStream.class);
                 if (delegatee == null) {
                     throw new IOException("Cannot get a stream to the script resource "
-                        + this.resource);
+                        + this.resource.getPath());
                 }
             }
             return delegatee;