Merge remote-tracking branch 'origin/master' into fix_migration_to_new_spring_boot_version_merge_master
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
This commit is contained in:
@@ -58,7 +58,7 @@ public final class MaintenanceScheduleHelper {
|
||||
* @return { @link Optional<ZonedDateTime>} of the next available window. In
|
||||
* case there is none, or there are maintenance window validation
|
||||
* errors, returns empty value.
|
||||
*
|
||||
*
|
||||
*/
|
||||
// Exception squid:S1166 - if there are validation error(format of cron
|
||||
// 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 ZonedDateTime now = ZonedDateTime.now(ZoneOffset.of(timezone));
|
||||
final ZonedDateTime after = now.minus(convertToISODuration(duration));
|
||||
final ZonedDateTime next = scheduleExecutor.nextExecution(after);
|
||||
return Optional.of(next);
|
||||
return scheduleExecutor.nextExecution(after);
|
||||
} catch (final RuntimeException ignored) {
|
||||
return Optional.empty();
|
||||
}
|
||||
@@ -85,7 +84,7 @@ public final class MaintenanceScheduleHelper {
|
||||
* year".
|
||||
*
|
||||
* @return {@link Cron} object, that corresponds to the expression.
|
||||
*
|
||||
*
|
||||
* @throws IllegalArgumentException
|
||||
* if the cron expression doesn't have a valid format.
|
||||
*/
|
||||
|
||||
4
pom.xml
4
pom.xml
@@ -163,8 +163,8 @@
|
||||
<maven.scm.plugin.version>1.11.1</maven.scm.plugin.version>
|
||||
<maven.site.plugin.version>3.9.0</maven.site.plugin.version>
|
||||
|
||||
<!-- Misc libraries versions - START -->
|
||||
<cron-utils.version>5.0.5</cron-utils.version>
|
||||
<!-- Misc libraries versions - START -->
|
||||
<cron-utils.version>9.1.3</cron-utils.version>
|
||||
<jsoup.version>1.11.2</jsoup.version>
|
||||
<allure.version>2.13.6</allure.version>
|
||||
<eclipselink.version>2.7.7</eclipselink.version>
|
||||
|
||||
Reference in New Issue
Block a user