You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/03/08 14:31:13 UTC

[camel] branch main updated: CAMEL-17764 changed types of job detail to Strings (#7156)

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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 6fc4ce6  CAMEL-17764 changed types of job detail to Strings (#7156)
6fc4ce6 is described below

commit 6fc4ce674f0ae525685c4a04ffcf95faed5daca0
Author: JiriOndrusek <on...@gmail.com>
AuthorDate: Tue Mar 8 15:30:28 2022 +0100

    CAMEL-17764 changed types of job detail to Strings (#7156)
---
 .../main/java/org/apache/camel/component/quartz/QuartzEndpoint.java   | 4 ++--
 .../java/org/apache/camel/component/quartz/QuartzSimpleRouteTest.java | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
index bfcb05a..23cb140 100644
--- a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
+++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
@@ -496,8 +496,8 @@ public class QuartzEndpoint extends DefaultEndpoint {
 
             // enrich job map with details
             jobDetail.getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_TYPE, "simple");
-            jobDetail.getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_SIMPLE_REPEAT_COUNTER, repeat);
-            jobDetail.getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_SIMPLE_REPEAT_INTERVAL, interval);
+            jobDetail.getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_SIMPLE_REPEAT_COUNTER, String.valueOf(repeat));
+            jobDetail.getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_SIMPLE_REPEAT_INTERVAL, String.valueOf(interval));
         }
 
         final Trigger result = triggerBuilder.build();
diff --git a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzSimpleRouteTest.java b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzSimpleRouteTest.java
index 924ec40..aa33aae 100644
--- a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzSimpleRouteTest.java
+++ b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzSimpleRouteTest.java
@@ -44,9 +44,9 @@ public class QuartzSimpleRouteTest extends BaseQuartzTest {
         assertThat(detail.getJobClass().equals(CamelJob.class), CoreMatchers.is(true));
 
         assertThat(detail.getJobDataMap().get(QuartzConstants.QUARTZ_TRIGGER_TYPE).equals("simple"), CoreMatchers.is(true));
-        assertThat(detail.getJobDataMap().get(QuartzConstants.QUARTZ_TRIGGER_SIMPLE_REPEAT_COUNTER).equals(-1),
+        assertThat(detail.getJobDataMap().get(QuartzConstants.QUARTZ_TRIGGER_SIMPLE_REPEAT_COUNTER).equals("-1"),
                 CoreMatchers.is(true));
-        assertThat(detail.getJobDataMap().get(QuartzConstants.QUARTZ_TRIGGER_SIMPLE_REPEAT_INTERVAL).equals(100L),
+        assertThat(detail.getJobDataMap().get(QuartzConstants.QUARTZ_TRIGGER_SIMPLE_REPEAT_INTERVAL).equals("100"),
                 CoreMatchers.is(true));
     }