You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Karl Pauls (Jira)" <ji...@apache.org> on 2019/08/22 07:32:00 UTC

[jira] [Updated] (SLING-7820) Scheduler's WhiteboardHandler impl not in sync with Scheduler's Javadoc

     [ https://issues.apache.org/jira/browse/SLING-7820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Pauls updated SLING-7820:
------------------------------
    Fix Version/s:     (was: Commons Scheduler 2.7.4)
                   Commons Scheduler 2.7.6

> Scheduler's WhiteboardHandler impl not in sync with Scheduler's Javadoc
> -----------------------------------------------------------------------
>
>                 Key: SLING-7820
>                 URL: https://issues.apache.org/jira/browse/SLING-7820
>             Project: Sling
>          Issue Type: Bug
>          Components: Commons
>    Affects Versions: Commons Scheduler 2.7.2
>            Reporter: Ashish Chopra
>            Priority: Major
>             Fix For: Commons Scheduler 2.7.6
>
>
> [Sling Commons Scheduler's Javadoc|https://github.com/apache/sling-org-apache-sling-commons-scheduler/blob/d954255a750113c024a9323ed0d5d85d1ee69a5a/src/main/java/org/apache/sling/commons/scheduler/Scheduler.java#L26-L48] asserts that:
> {quote} 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.*{quote}
> 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}}|https://github.com/apache/sling-org-apache-sling-commons-scheduler/blame/d954255a750113c024a9323ed0d5d85d1ee69a5a/src/main/java/org/apache/sling/commons/scheduler/impl/WhiteboardHandler.java#L189] 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.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)