[
https://issues.apache.org/jira/browse/ROCKETMQ-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128503#comment-16128503
]
ASF GitHub Bot commented on ROCKETMQ-269:
-----------------------------------------
GitHub user mark800 opened a pull request:
https://github.com/apache/incubator-rocketmq/pull/148
[ROCKETMQ-269] don’t need cal.setTimeInMillis(System.currentTimeMillis())
after Cale…
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());
}
Jira Issue: https://issues.apache.org/jira/browse/ROCKETMQ-269
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mark800/incubator-rocketmq iss0816
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-rocketmq/pull/148.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #148
----
commit 776ddb918f15e8c17809f651ca83c2172c534bb7
Author: mark.yky <[email protected]>
Date: 2017-08-16T08:45:00Z
don’t need cal.setTimeInMillis(System.currentTimeMillis()) after
Calendar.getInstance()
----
> 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)