activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1101613 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/broker/scheduler/CronParser.java test/java/org/apache/activemq/broker/scheduler/CronParserTest.java
Date Tue, 10 May 2011 19:29:56 GMT
Author: tabish
Date: Tue May 10 19:29:56 2011
New Revision: 1101613

URL: http://svn.apache.org/viewvc?rev=1101613&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQ-3306

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/CronParser.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/CronParser.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/CronParser.java?rev=1101613&r1=1101612&r2=1101613&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/CronParser.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/CronParser.java
Tue May 10 19:29:56 2011
@@ -296,7 +296,7 @@ public class CronParser {
     }
 
     protected static boolean isAll(String token) {
-        return token != null && token.length() == 1 && token.charAt(0) ==
'*';
+        return token != null && token.length() == 1 && (token.charAt(0) ==
'*' || token.charAt(0) == '?');
     }
 
     protected static int getDenominator(final String token) {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java?rev=1101613&r1=1101612&r2=1101613&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java
Tue May 10 19:29:56 2011
@@ -258,7 +258,9 @@ public class CronParserTest {
     @Test
     public void testValidate() {
         try {
-            CronParser.validate("30 08 10 06 * ");
+            CronParser.validate("30 08 10 06 ? ");
+            CronParser.validate("30 08 ? 06 5 ");
+            CronParser.validate("30 08 ? 06 * ");
             CronParser.validate("* * * * * ");
             CronParser.validate("* * * * 1-6 ");
             CronParser.validate("* * * * 1,2,5 ");



Mime
View raw message