History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QUARTZ-621
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Henri Yandell
Reporter: Francesco Vivoli
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Quartz Scheduler

incorrect results from CronExpression.isValidExpression()

Created: 09/Oct/07 05:03 AM   Updated: 29/Jan/08 12:41 AM
Component/s: Core
Affects Version/s: 1.5.2
Fix Version/s: 1.6.1

File Attachments: 1. Text File QUARTZ-621.patch (3 kb)
2. Text File QUARTZ-621.patch (2 kb)

Environment:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)


 Description  « Hide
As discussed at: http://forums.opensymphony.com/thread.jspa?threadID=136105&tstart=0

It seems that isValidExpression() returns true also for expression that then fail to be scheduled.

As an example the expression
"0 0/1 * * * * *"

results in

java.lang.UnsupportedOperationException: Support for specifying both a day-of-week AND a day-of-month parameter is not implemented.

Francesco

 All   Comments   Change History      Sort Order:
Henri Yandell - [27/Dec/07 03:31 AM ]
Attaching a test/fix patch for this.

Henri Yandell - [28/Dec/07 01:42 AM ]
Second try at the patch - this time it replicates the logic from the UnsupportedOperationException throwing.

Henri Yandell - [29/Jan/08 12:41 AM ]
svn ci -m "Applying my second patch from QUARTZ-621 - stops it from allowing patterns with too many wildcards early on and failing later. Now, by replicating the later logic in the parsing stage, it fails earlier. " src

Sending src/java/org/quartz/CronExpression.java
Sending src/test/java/org/quartz/CronExpressionTest.java
Transmitting file data ..
Committed revision 764.