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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • rocketmq-commons
    • 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

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

              Dates

                Created:
                Updated: