camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r748880 - in /camel/trunk/components/camel-quartz/src: main/java/org/apache/camel/component/quartz/QuartzComponent.java test/java/org/apache/camel/component/quartz/QuartzCronUsingPlusAsSpaceRouteTest.java
Date Sat, 28 Feb 2009 16:19:58 GMT
Author: davsclaus
Date: Sat Feb 28 16:19:57 2009
New Revision: 748880

URL: http://svn.apache.org/viewvc?rev=748880&view=rev
Log:
CAMEL-1407: Now also supports using + as space separator suggested by Hadrian.

Added:
    camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronUsingPlusAsSpaceRouteTest.java
  (contents, props changed)
      - copied, changed from r748864, camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronRouteTest.java
Modified:
    camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java

Modified: camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java?rev=748880&r1=748879&r2=748880&view=diff
==============================================================================
--- camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
(original)
+++ camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
Sat Feb 28 16:19:57 2009
@@ -101,6 +101,8 @@
     protected CronTrigger createCronTrigger(String path) throws ParseException {
         // replace _ back to space so its a cron expression
         String s = path.replaceAll("_", " ");
+        // replace + back to space so its a cron expression
+        s = s.replaceAll("\\+", " ");
         CronTrigger cron = new CronTrigger();
         cron.setCronExpression(s);
         return cron;

Copied: camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronUsingPlusAsSpaceRouteTest.java
(from r748864, camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronRouteTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronUsingPlusAsSpaceRouteTest.java?p2=camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronUsingPlusAsSpaceRouteTest.java&p1=camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronRouteTest.java&r1=748864&r2=748880&rev=748880&view=diff
==============================================================================
--- camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronRouteTest.java
(original)
+++ camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronUsingPlusAsSpaceRouteTest.java
Sat Feb 28 16:19:57 2009
@@ -23,9 +23,9 @@
 /**
  * @version $Revision$
  */
-public class QuartzCronRouteTest extends ContextTestSupport {
+public class QuartzCronUsingPlusAsSpaceRouteTest extends ContextTestSupport {
 
-    public void testQuartzCronRoute() throws Exception {
+    public void testQuartzCronUsingPlusRoute() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(3);
 
@@ -38,8 +38,9 @@
             public void configure() {
                 // START SNIPPET: e1
                 // triggers every 2th second at precise 00,02,04,06..58
-                // notice we must use _ as space when configurd using URI parameter
-                from("quartz://myGroup/myTimerName?cron=0/2_*_*_*_*_?").to("mock:result");
+                // notice we can use + as space when configurd using URI parameter
+                // (Camel also supports using _ as space)
+                from("quartz://myGroup/myTimerName?cron=0/2+*+*+*+*+?").to("mock:result");
                 // END SNIPPET: e1
             }
         };

Propchange: camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronUsingPlusAsSpaceRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronUsingPlusAsSpaceRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message