You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicecomb.apache.org by "Ang Li (Jira)" <ji...@apache.org> on 2019/12/27 06:27:00 UTC

[jira] [Resolved] (SCB-1559) Use java.time.Clock instead of java.lang.System#currentTimeMillis to get time

     [ https://issues.apache.org/jira/browse/SCB-1559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ang Li resolved SCB-1559.
-------------------------
    Fix Version/s: java-chassis-2.0.0
       Resolution: Fixed

> Use java.time.Clock instead of java.lang.System#currentTimeMillis to get time
> -----------------------------------------------------------------------------
>
>                 Key: SCB-1559
>                 URL: https://issues.apache.org/jira/browse/SCB-1559
>             Project: Apache ServiceComb
>          Issue Type: Task
>          Components: Java-Chassis
>            Reporter: Haishi Yao
>            Assignee: Ang Li
>            Priority: Minor
>             Fix For: java-chassis-2.0.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Currently most of our code use java.lang.System#currentTimeMillis to get the current time.
> This method is not convenient to mock.
> It's recommended to search all of the place we use java.lang.System#currentTimeMillis and replace them with java.time.Clock. And it's better to provide a mock clock class in testscaffolding.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)