Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-15792

Simplify getTimeZone in CalendarBasedTimeout and remove redundant null checks

XMLWordPrintable

      To improve org.jboss.as.ejb3.timerservice.schedule.CalendarBasedTimeout

      • remove redundant null checks and associated log method and message. These variables are known to be non-null.
      • avoid calling TimeZone.getAvailableIDs() and searching for a specific value in the result array. There are currently 628 available timezone values. Instead, we can assume the timezoneId is of the correct format and get the timezone. If the result is GMT, then check if it is what the caller want.
      • avoid unnecessary cloning the ScheduleExpression, and remove the clone(ScheduleExpression) method.

            cfang@redhat.com Cheng Fang
            cfang@redhat.com Cheng Fang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: