Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/6#discussion_r31247288
  
    --- Diff: 
core/src/main/java/org/apache/syncope/core/rest/controller/AbstractJobController.java
 ---
    @@ -158,7 +158,19 @@ protected void actionJob(final String jobName, final 
JobAction action) {
                     if (scheduler.getScheduler().checkExists(jobKey)) {
                         switch (action) {
                             case START:
    -                            scheduler.getScheduler().triggerJob(jobKey);
    +                            Long currentId = getIdFromJobName(jobKey);
    +                            boolean found = false;
    +                            //Two or more equals jobs cannot be executed 
concurrently
    +                            for (JobExecutionContext jec : 
scheduler.getScheduler().getCurrentlyExecutingJobs()) {
    --- End diff --
    
    Please use plain `for` with `found` as guard, thus avoiding `break`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to