[
https://issues.apache.org/jira/browse/ROCKETMQ-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16135115#comment-16135115
]
ASF GitHub Bot commented on ROCKETMQ-269:
-----------------------------------------
Github user lindzh commented on the issue:
https://github.com/apache/incubator-rocketmq/pull/148
Agree,there is no need to add unit test for this change.
> 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)