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

ASF GitHub Bot commented on ROCKETMQ-269:
-----------------------------------------

Github user dongeforever commented on the issue:

    https://github.com/apache/incubator-rocketmq/pull/148
  
    @mark800 IMO, it is easy to add unit test for such change.
    just test if the return value of computNextHourTimeMillis(and other 
methods) is expected.
    I will merge this PR, if the unit test is added.



> don’t need cal.setTimeInMillis(System.currentTimeMillis()) after 
> Calendar.getInstance()
> ---------------------------------------------------------------------------------------
>
>                 Key: ROCKETMQ-269
>                 URL: https://issues.apache.org/jira/browse/ROCKETMQ-269
>             Project: Apache RocketMQ
>          Issue Type: Improvement
>          Components: rocketmq-commons
>            Reporter: Mark Yang
>            Assignee: Jixiang Jin
>
> don’t need cal.setTimeInMillis(System.currentTimeMillis()) after 
> Calendar.getInstance()
> In JDK’s source code, innermost constructor for Calendar.getInstance() is:
> public GregorianCalendar(TimeZone zone, Locale aLocale) {    
>  super(zone, aLocale);     gdate = (BaseCalendar.Date) 
> gcal.newCalendarDate(zone);     
>  setTimeInMillis(System.currentTimeMillis()); 
> }



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to