You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Andrea Del Bene (JIRA)" <ji...@apache.org> on 2019/05/02 13:59:00 UTC

[jira] [Comment Edited] (WICKET-6662) Remove legacy package org.apache.wicket.util.time from wicket-util

    [ https://issues.apache.org/jira/browse/WICKET-6662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16831644#comment-16831644 ] 

Andrea Del Bene edited comment on WICKET-6662 at 5/2/19 1:58 PM:
-----------------------------------------------------------------

Most of the work for this issue consists in replacing old classes Time and Duration with (respectively) standard java.time classes Instant and Duration. The following two tables show which method of standard classes corresponds to the current method/constant we are using from legacy classes:

 
||org.apache.wicket.util.time.Duration||java.time.Duration||
|Duration.minutes|Duration.ofMinutes|
|Duration.seconds|Duration.ofSeconds|
|Duration.milliseconds|Duration.ofMillis|
|Duration.getMilliseconds|Duration.toMillis|
|Duration.seconds()|Duration.toSeconds|
|Duration.NONE|Duration.ZERO|
|Duration.MAXIMUM|Duration.ofMillis(Long.MAX_VALUE)|


was (Author: bitstorm):
Most of the work for this issue consists in replacing old classes Time and Duration with (respectively) standard java.time classes Instant and Duration. The following shows which method of standard classes corresponds to the current methods/constants we are using from legacy classes:

 
||Current method||Standard method||
|Duration.minutes|Duration.ofMinutes|
|Duration.seconds|Duration.ofSeconds|
|Duration.milliseconds|Duration.ofMillis|
|Duration.getMilliseconds|Duration.toMillis|

> Remove legacy package org.apache.wicket.util.time from wicket-util
> ------------------------------------------------------------------
>
>                 Key: WICKET-6662
>                 URL: https://issues.apache.org/jira/browse/WICKET-6662
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Andrea Del Bene
>            Assignee: Andrea Del Bene
>            Priority: Minor
>
> Wicket still use custom classes from package org.apache.wicket.util.time to handle and manipulate time entities such as "duration" or "current instant".
> There are in particular two main classes used across the framework: Time and Duration. These two classes have the same purpose and functionalities as standard classes java.time.Instant and java.time.Duration. Therefore, we should consider to switch to standard java.time classes and remove legacy package org.apache.wicket.util.time.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)