git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1101613 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2011-05-10 19:29:56 +00:00
parent 7e13a81851
commit 3aaa1e73be
2 changed files with 4 additions and 2 deletions

View File

@ -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) {

View File

@ -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 ");