You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2021/07/20 10:48:27 UTC

[GitHub] [sling-org-apache-sling-scripting-sightly] Buuhuu commented on a change in pull request #11: SLING-9989: migrate date formating to java.time API

Buuhuu commented on a change in pull request #11:
URL: https://github.com/apache/sling-org-apache-sling-scripting-sightly/pull/11#discussion_r673013339



##########
File path: src/main/java/org/apache/sling/scripting/sightly/impl/engine/extension/FormatFilterExtension.java
##########
@@ -77,12 +81,14 @@ public Object call(final RenderContext renderContext, Object... arguments) {
         if (hasPlaceHolders) {
             return getFormattedString(runtimeObjectModel, source, formatObject);
         }
+
         try {
-            // somebody will hate me for this
-            new SimpleDateFormat(source);
+            // try to parse as DateTimeFormatter

Review comment:
       I am not sure how this branch can be reached, if it is dead code we should remove it.




-- 
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: dev-unsubscribe@sling.apache.org

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