[ https://issues.apache.org/jira/browse/TAP5-2736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17589059#comment-17589059 ]
Hudson commented on TAP5-2736: ------------------------------ FAILURE: Integrated in Jenkins build Tapestry » tapestry-trunk-freestyle #155 (See [https://ci-builds.apache.org/job/Tapestry/job/tapestry-trunk-freestyle/155/]) TAP5-2736: CookieBuilder maxAge java.time.Duration support (ben: rev 71638e9cfef0ab598fc7c8e86f7db0c10d07150e) * (edit) tapestry-core/src/main/java/org/apache/tapestry5/internal/services/CookiesImpl.java * (edit) tapestry-ioc/src/test/groovy/ioc/specs/TypeCoercerSpec.groovy * (edit) tapestry-core/src/main/java/org/apache/tapestry5/CookieBuilder.java * (add) tapestry-core/src/test/groovy/org/apache/tapestry5/internal/services/CookieBuilderSpec.groovy * (edit) commons/src/main/java/org/apache/tapestry5/commons/internal/BasicTypeCoercions.java > CookieBuilder maxAge should support java.time.Duration > ------------------------------------------------------ > > Key: TAP5-2736 > URL: https://issues.apache.org/jira/browse/TAP5-2736 > Project: Tapestry 5 > Issue Type: Improvement > Components: tapestry-core > Affects Versions: 5.8.2 > Reporter: Ben Weidig > Assignee: Ben Weidig > Priority: Minor > > The CookieBuilder maxAge is based on seconds as int, but the contributed > default value is using the intermediate type > org.apache.tapestry5.ioc.util.TimeInterval which allows for defining an > interval as a String. > This makes setting the default quite readable, but CookieBuilder#setMaxAge > itself accepts an int and doesn't mention that it's supposed to be seconds. > I propose the following changes: > * Clarify documentation of CookieBuilder#setMaxAge so it's obvious that it > requires seconds > * Add #setMaxAge(java.time.Duration) > * Add TypeCoercion Duration -> TimeInterval, so the default value could be > contributed as String or Duration, to ensure backward-compatibility. > * Fix the use of the symbol key in the CookieBuilder constructor to use > SymbolConstants.COOKIE_MAX_AGE instead of the value > -- This message was sent by Atlassian Jira (v8.20.10#820010)