Merge branch '2.6.x' into 2.7.x

Closes gh-31525
This commit is contained in:
Andy Wilkinson
2022-06-24 13:05:06 +01:00
29 changed files with 411 additions and 410 deletions

View File

@@ -132,12 +132,12 @@ public class PrometheusPushGatewayManager {
}
this.scheduled.cancel(false);
switch (shutdownOperation) {
case PUSH:
push();
break;
case DELETE:
delete();
break;
case PUSH:
push();
break;
case DELETE:
delete();
break;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -266,24 +266,24 @@ public class QuartzEndpoint {
private static TemporalUnit temporalUnit(IntervalUnit unit) {
switch (unit) {
case DAY:
return ChronoUnit.DAYS;
case HOUR:
return ChronoUnit.HOURS;
case MINUTE:
return ChronoUnit.MINUTES;
case MONTH:
return ChronoUnit.MONTHS;
case SECOND:
return ChronoUnit.SECONDS;
case MILLISECOND:
return ChronoUnit.MILLIS;
case WEEK:
return ChronoUnit.WEEKS;
case YEAR:
return ChronoUnit.YEARS;
default:
throw new IllegalArgumentException("Unknown IntervalUnit");
case DAY:
return ChronoUnit.DAYS;
case HOUR:
return ChronoUnit.HOURS;
case MINUTE:
return ChronoUnit.MINUTES;
case MONTH:
return ChronoUnit.MONTHS;
case SECOND:
return ChronoUnit.SECONDS;
case MILLISECOND:
return ChronoUnit.MILLIS;
case WEEK:
return ChronoUnit.WEEKS;
case YEAR:
return ChronoUnit.YEARS;
default:
throw new IllegalArgumentException("Unknown IntervalUnit");
}
}