This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
     new 175e820  WICKET-6678 Instant : Unsupported field: YearOfEra when 
cookieUtils.cookieToDebugString() is called
175e820 is described below

commit 175e820f2d6fb43ebbf942e42703aff45735af53
Author: Martin Tzvetanov Grigorov <[email protected]>
AuthorDate: Wed Jun 26 08:40:48 2019 +0300

    WICKET-6678 Instant : Unsupported field: YearOfEra when 
cookieUtils.cookieToDebugString() is called
    
    Convert the max-age millis to LocalDateTime for easier debugging.
---
 .../src/main/java/org/apache/wicket/util/cookies/CookieUtils.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/wicket-core/src/main/java/org/apache/wicket/util/cookies/CookieUtils.java 
b/wicket-core/src/main/java/org/apache/wicket/util/cookies/CookieUtils.java
index df94380..9191405 100644
--- a/wicket-core/src/main/java/org/apache/wicket/util/cookies/CookieUtils.java
+++ b/wicket-core/src/main/java/org/apache/wicket/util/cookies/CookieUtils.java
@@ -17,7 +17,7 @@
 package org.apache.wicket.util.cookies;
 
 import java.time.Instant;
-import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.time.ZoneId;
 
 import javax.servlet.http.Cookie;
@@ -370,9 +370,9 @@ public class CookieUtils
         */
        private String cookieToDebugString(final Cookie cookie)
        {
-               final LocalDate localDate = 
Instant.ofEpochMilli(cookie.getMaxAge()).atZone(ZoneId.systemDefault()).toLocalDate();
+               final LocalDateTime localDateTime = 
Instant.ofEpochMilli(cookie.getMaxAge()).atZone(ZoneId.systemDefault()).toLocalDateTime();
                return "[Cookie " + " name = " + cookie.getName() + ", value = 
" + cookie.getValue() +
                        ", domain = " + cookie.getDomain() + ", path = " + 
cookie.getPath() + ", maxAge = " +
-                       localDate + "(" + cookie.getMaxAge() + ")" + "]";
+                       localDateTime + "(" + cookie.getMaxAge() + ")" + "]";
        }
 }

Reply via email to