Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6678

Instant : Unsupported field: YearOfEra when cookieUtils.cookieToDebugString() is called

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 9.0.0-M2
    • 9.0.0-M3
    • wicket-core
    • None

    Description

      Calling cookieUtils.save(xxx) with log.isDebugEnabled() = true produce this exception

      java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: YearOfEra
      at java.base/java.time.Instant.getLong(Instant.java:602)
      at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
      at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2696)
      at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2335)
      at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1843)
      at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1817)
      at org.apache.wicket.util.cookies.CookieUtils.cookieToDebugString(CookieUtils.java:373)
      at org.apache.wicket.util.cookies.CookieUtils.save(CookieUtils.java:298)
      at org.apache.wicket.util.cookies.CookieUtils.save(CookieUtils.java:166)

      Instants.localDateFormatter uses an incompatible pattern for Instant.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            francois Francois
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: