Check for asterisk range in CronExpression
This commit makes sure that in CronExpression, the asterisk is only used in a range field, and is not surrounded by unexpected characters. Closes gh-19500
This commit is contained in:
@@ -48,6 +48,9 @@ public class BitsCronFieldTests {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> BitsCronField.parseMonth("13"));
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> BitsCronField.parseDaysOfWeek("8"));
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> BitsCronField.parseSeconds("20-10"));
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> BitsCronField.parseDaysOfWeek("*SUN"));
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> BitsCronField.parseDaysOfWeek("SUN*"));
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> BitsCronField.parseHours("*ANYTHING_HERE"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user