Skip to content

Commit 60e9002

Browse files
committed
Remove Java 17 method calls
1 parent acaaa69 commit 60e9002

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

log4j-core-test/src/test/java/org/apache/logging/log4j/core/util/internal/instant/InstantPatternDynamicFormatterTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ private static MutableInstant randomInstant() {
322322
final MutableInstant instant = new MutableInstant();
323323
// In the 1970's some time zones had sub-minute offsets to UTC, e.g., Africa/Monrovia.
324324
// We will exclude them for tests:
325-
final long minEpochSecond = 315_532_800; // 1980-01-01 01:00:00
326-
final long maxEpochSecond = 1_621_280_470; // 2021-05-17 21:41:10
327-
final long epochSecond = minEpochSecond + RANDOM.nextLong(maxEpochSecond - minEpochSecond);
325+
final int minEpochSecond = 315_532_800; // 1980-01-01 01:00:00
326+
final int maxEpochSecond = 1_621_280_470; // 2021-05-17 21:41:10
327+
final long epochSecond = minEpochSecond + RANDOM.nextInt(maxEpochSecond - minEpochSecond);
328328
final int epochSecondNano = randomNanos();
329329
instant.initFromEpochSecond(epochSecond, epochSecondNano);
330330
return instant;

0 commit comments

Comments
 (0)