Using Asserts with IllegalArgumentException/IllegalStateException instead of ConfigurationException.
This commit is contained in:
@@ -21,8 +21,6 @@ import java.util.Date;
|
||||
|
||||
import org.quartz.CronExpression;
|
||||
|
||||
import org.springframework.integration.ConfigurationException;
|
||||
|
||||
/**
|
||||
* A trigger that uses a cron expression.
|
||||
*
|
||||
@@ -39,8 +37,9 @@ public class CronTrigger implements Trigger {
|
||||
public CronTrigger(String expression) {
|
||||
try {
|
||||
this.expression = new CronExpression(expression);
|
||||
} catch (ParseException e) {
|
||||
throw new ConfigurationException(
|
||||
}
|
||||
catch (ParseException e) {
|
||||
throw new IllegalArgumentException(
|
||||
"failed to parse cron expression: " + expression);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user