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:58:19 UTC

[sling-org-apache-sling-servlets-resolver] branch master updated: trivial: add toString() to ScriptResource to ease debugging

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-servlets-resolver.git


The following commit(s) were added to refs/heads/master by this push:
     new 87b9a72  trivial: add toString() to ScriptResource to ease debugging
87b9a72 is described below

commit 87b9a72b3ea01a6e6afbb482b2fdd47956cbdbbd
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Fri Oct 8 18:58:13 2021 +0200

    trivial: add toString() to ScriptResource to ease debugging
---
 .../apache/sling/servlets/resolver/internal/ScriptResource.java   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/main/java/org/apache/sling/servlets/resolver/internal/ScriptResource.java b/src/main/java/org/apache/sling/servlets/resolver/internal/ScriptResource.java
index f1a4597..16319cd 100644
--- a/src/main/java/org/apache/sling/servlets/resolver/internal/ScriptResource.java
+++ b/src/main/java/org/apache/sling/servlets/resolver/internal/ScriptResource.java
@@ -187,4 +187,12 @@ public class ScriptResource extends AbstractResource {
     public boolean isResourceType(String resourceType) {
         return this.getActiveResource().isResourceType(resourceType);
     }
+
+    @Override
+    public String toString() {
+        return getClass().getSimpleName()
+            + ", type=" + getResourceType()
+            + ", superType=" + getResourceSuperType()
+            + ", path=" + getPath();
+    }
 }