jdaugherty commented on code in PR #15432:
URL: https://github.com/apache/grails-core/pull/15432#discussion_r2854702295


##########
grails-converters/src/main/groovy/org/grails/web/converters/marshaller/json/CalendarMarshaller.java:
##########
@@ -37,21 +36,25 @@
  */
 public class CalendarMarshaller implements ObjectMarshaller<JSON> {
 
-    private final Format formatter;
+    private static final DateTimeFormatter DEFAULT_FORMATTER =
+            DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", 
Locale.US)
+                    .withZone(ZoneOffset.UTC);
+
+    private final Format legacyFormatter;
 
     /**
      * Constructor with a custom formatter.
      * @param formatter the formatter
      */
     public CalendarMarshaller(Format formatter) {
-        this.formatter = formatter;
+        this.legacyFormatter = formatter;
     }
 
     /**
      * Default constructor.
      */
     public CalendarMarshaller() {
-        this(FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", 
TimeZone.getTimeZone("GMT"), Locale.US));
+        this.legacyFormatter = null;

Review Comment:
   Are there any known performance problems with the 
java.time.DateTimeFormatter vs the FastDateTimeFormatter? 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to