Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-7820

Scheduler's WhiteboardHandler impl not in sync with Scheduler's Javadoc

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Commons Scheduler 2.7.2
    • Fix Version/s: Commons Scheduler 2.7.4
    • Component/s: Commons
    • Labels:
      None

      Description

      Sling Commons Scheduler's Javadoc asserts that:

      A job can be scheduled either by creating a ScheduleOptions instance through one of the scheduler methods and then calling schedule(Object, ScheduleOptions) or by using the whiteboard pattern and registering a Runnable service with either the PROPERTY_SCHEDULER_EXPRESSION or PROPERTY_SCHEDULER_PERIOD property. If both properties are specified, only PROPERTY_SCHEDULER_PERIOD is considered for scheduling.

      The part in bold above suggests that PROPERTY_SCHEDULER_PERIOD has a higher precedence than PROPERTY_SCHEDULER_EXPRESSION in case both are present for a component.
      However, the implementation in WhiteboardHandler#register does the opposite. It gives PROPERTY_SCHEDULER_EXPRESSION a higher precedence by evaluating it first.

      Either the Javadoc, or the implementation must be modified to keep both in sync.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ashishc Ashish Chopra
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: