Uploaded image for project: 'Apache RocketMQ'
  1. Apache RocketMQ
  2. ROCKETMQ-269

don’t need cal.setTimeInMillis(System.currentTimeMillis()) after Calendar.getInstance()

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: rocketmq-commons
    • Labels:
      None

      Description

      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());
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lollipop Jixiang Jin
                Reporter:
                mark_yang Mark Yang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: