[
https://issues.apache.org/jira/browse/ROCKETMQ-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16130015#comment-16130015
]
ASF GitHub Bot commented on ROCKETMQ-269:
-----------------------------------------
Github user Jaskey commented on the issue:
https://github.com/apache/incubator-rocketmq/pull/148
@mark800
Thanks!!
Would you please add an unit test for this in the pr?
Also, please modify the pr title to make it complete
> 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)