You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2020/12/02 16:37:00 UTC
[jira] [Created] (SLING-9968) ObjectModel.toString() should support
more classes
Konrad Windszus created SLING-9968:
--------------------------------------
Summary: ObjectModel.toString() should support more classes
Key: SLING-9968
URL: https://issues.apache.org/jira/browse/SLING-9968
Project: Sling
Issue Type: Improvement
Components: Scripting
Affects Versions: Scripting HTL Engine 1.4.6-1.4.0
Reporter: Konrad Windszus
For getter methods returning e.g. a {{java.net.URI}} there is no implicit toString() being applied. When looking at the HTL specs it seems not-defined how to deal with complex objects (https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#1152-string), but given that enums and primitives are automatically converted (https://github.com/apache/sling-org-apache-sling-scripting-sightly-runtime/blob/6cbd676a8875af756e6e43b38c39ba9e4784dc4e/src/main/java/org/apache/sling/scripting/sightly/render/ObjectModel.java#L238), I am wondering why other types like {{URI}} or {{URL}} are not supported.
Is there any harm when doing object.toString() as fallback?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)