Increase cronutils version (#1053)
* CVE-2020-26238 Signed-off-by: Markus Block <markus.block@bosch-si.com> * adapted code to new cron-utils versions Signed-off-by: Markus Block <markus.block@bosch-si.com>
This commit is contained in:
@@ -58,7 +58,7 @@ public final class MaintenanceScheduleHelper {
|
|||||||
* @return { @link Optional<ZonedDateTime>} of the next available window. In
|
* @return { @link Optional<ZonedDateTime>} of the next available window. In
|
||||||
* case there is none, or there are maintenance window validation
|
* case there is none, or there are maintenance window validation
|
||||||
* errors, returns empty value.
|
* errors, returns empty value.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
// Exception squid:S1166 - if there are validation error(format of cron
|
// Exception squid:S1166 - if there are validation error(format of cron
|
||||||
// expression or duration is wrong), we simply return empty value
|
// expression or duration is wrong), we simply return empty value
|
||||||
@@ -69,8 +69,7 @@ public final class MaintenanceScheduleHelper {
|
|||||||
final ExecutionTime scheduleExecutor = ExecutionTime.forCron(getCronFromExpression(cronSchedule));
|
final ExecutionTime scheduleExecutor = ExecutionTime.forCron(getCronFromExpression(cronSchedule));
|
||||||
final ZonedDateTime now = ZonedDateTime.now(ZoneOffset.of(timezone));
|
final ZonedDateTime now = ZonedDateTime.now(ZoneOffset.of(timezone));
|
||||||
final ZonedDateTime after = now.minus(convertToISODuration(duration));
|
final ZonedDateTime after = now.minus(convertToISODuration(duration));
|
||||||
final ZonedDateTime next = scheduleExecutor.nextExecution(after);
|
return scheduleExecutor.nextExecution(after);
|
||||||
return Optional.of(next);
|
|
||||||
} catch (final RuntimeException ignored) {
|
} catch (final RuntimeException ignored) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
@@ -85,7 +84,7 @@ public final class MaintenanceScheduleHelper {
|
|||||||
* year".
|
* year".
|
||||||
*
|
*
|
||||||
* @return {@link Cron} object, that corresponds to the expression.
|
* @return {@link Cron} object, that corresponds to the expression.
|
||||||
*
|
*
|
||||||
* @throws IllegalArgumentException
|
* @throws IllegalArgumentException
|
||||||
* if the cron expression doesn't have a valid format.
|
* if the cron expression doesn't have a valid format.
|
||||||
*/
|
*/
|
||||||
|
|||||||
4
pom.xml
4
pom.xml
@@ -163,8 +163,8 @@
|
|||||||
<maven.processor.plugin.version>3.3.3</maven.processor.plugin.version>
|
<maven.processor.plugin.version>3.3.3</maven.processor.plugin.version>
|
||||||
<maven.scm.plugin.version>1.11.1</maven.scm.plugin.version>
|
<maven.scm.plugin.version>1.11.1</maven.scm.plugin.version>
|
||||||
|
|
||||||
<!-- Misc libraries versions - START -->
|
<!-- Misc libraries versions - START -->
|
||||||
<cron-utils.version>5.0.5</cron-utils.version>
|
<cron-utils.version>9.1.3</cron-utils.version>
|
||||||
<jsoup.version>1.11.2</jsoup.version>
|
<jsoup.version>1.11.2</jsoup.version>
|
||||||
<allure.version>2.13.6</allure.version>
|
<allure.version>2.13.6</allure.version>
|
||||||
<eclipselink.version>2.7.7</eclipselink.version>
|
<eclipselink.version>2.7.7</eclipselink.version>
|
||||||
|
|||||||
Reference in New Issue
Block a user