get back splitting by simple ' ' instead of regex in KrontabConfig

This commit is contained in:
InsanusMokrassar 2024-11-03 12:57:32 +06:00
parent e0f9db9c60
commit aff50f0aec

View File

@ -96,7 +96,7 @@ value class KrontabConfig(
var yearParsed: Array<Int>? = null var yearParsed: Array<Int>? = null
var millisecondsParsed: Array<Short>? = null var millisecondsParsed: Array<Short>? = null
val (secondsSource, minutesSource, hoursSource, dayOfMonthSource, monthSource) = template val (secondsSource, minutesSource, hoursSource, dayOfMonthSource, monthSource) = template
.split(Regex("\\s")) .split(" ")
.filter { it.matches(KrontabConfigPartRegex) } // filter garbage from string .filter { it.matches(KrontabConfigPartRegex) } // filter garbage from string
.let { .let {
if (it.size < 5) { // reconstruction in case of insufficient arguments; 5 is amount of required arguments out of latest also code if (it.size < 5) { // reconstruction in case of insufficient arguments; 5 is amount of required arguments out of latest also code