kwin commented on a change in pull request #9:
URL: 
https://github.com/apache/sling-org-apache-sling-scripting-sightly-runtime/pull/9#discussion_r678390823



##########
File path: 
src/main/java/org/apache/sling/scripting/sightly/render/ObjectModel.java
##########
@@ -308,12 +306,7 @@ public static String toString(Object object) {
             Iterable<Object> iterable = (Iterable<Object>) object;
             return fromIterator(iterable.iterator());
         }
-        if (object instanceof String || object instanceof Number) {
-            Collection<Object> list = new ArrayList<>();
-            list.add(object);
-            return list;
-        }
-        return Collections.emptyList();
+        return Collections.singletonList(object);

Review comment:
       After having a second thought it wasn't that much effort and only one 
change in the unit test was necessary, therefore I committed those changes in 
https://github.com/apache/sling-org-apache-sling-scripting-sightly-runtime/pull/9/commits/a16076eca5099ef4134f5fa90adb76a6af624df4.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to