You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by pa...@apache.org on 2020/09/14 10:53:44 UTC

[sling-org-apache-sling-commons-scheduler] branch master updated: SLING-9730: Use the package name as mapping for jobs.

This is an automated email from the ASF dual-hosted git repository.

pauls pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-scheduler.git


The following commit(s) were added to refs/heads/master by this push:
     new e58ba16  SLING-9730: Use the package name as mapping for jobs.
e58ba16 is described below

commit e58ba166c0ec327e524ff802f61bc43d5857216d
Author: Karl Pauls <ka...@gmail.com>
AuthorDate: Mon Sep 14 12:53:32 2020 +0200

    SLING-9730: Use the package name as mapping for jobs.
---
 .../org/apache/sling/commons/scheduler/impl/QuartzJobExecutor.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzJobExecutor.java b/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzJobExecutor.java
index d47d97f..a0f69f6 100644
--- a/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzJobExecutor.java
+++ b/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzJobExecutor.java
@@ -180,7 +180,9 @@ public class QuartzJobExecutor implements Job {
         }
 
         public String getKey() {
-            String key = job.getClass().getName();
+            String key = job.getClass().getPackage() != null ?
+                job.getClass().getPackage().getName() : job.getClass().getName();
+
             if ( providedName != null ) {
                 key = key + "-" + providedName;
             }