Skip to content

Commit 016294b

Browse files
committed
Avoid overriding methods deprecated in JUnit Jupiter 5.13
See gh-34969
1 parent 8201193 commit 016294b

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanInstanceSupplierTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@
3636
import org.junit.jupiter.params.provider.ArgumentsProvider;
3737
import org.junit.jupiter.params.provider.ArgumentsSource;
3838
import org.junit.jupiter.params.support.AnnotationConsumer;
39+
import org.junit.jupiter.params.support.ParameterDeclarations;
3940

4041
import org.springframework.beans.factory.BeanCurrentlyInCreationException;
4142
import org.springframework.beans.factory.ObjectProvider;
@@ -691,7 +692,7 @@ public void accept(ParameterizedResolverTest annotation) {
691692
}
692693

693694
@Override
694-
public Stream<? extends Arguments> provideArguments(ExtensionContext context) {
695+
public Stream<? extends Arguments> provideArguments(ParameterDeclarations parameters, ExtensionContext context) {
695696
return this.source.provideArguments(context);
696697
}
697698
}

spring-context/src/test/java/org/springframework/format/datetime/standard/InstantFormatterTests.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
3232
import org.junit.jupiter.params.provider.Arguments;
3333
import org.junit.jupiter.params.provider.ArgumentsProvider;
3434
import org.junit.jupiter.params.provider.ArgumentsSource;
35+
import org.junit.jupiter.params.support.ParameterDeclarations;
3536

3637
import static java.time.Instant.MAX;
3738
import static java.time.Instant.MIN;
@@ -91,7 +92,7 @@ private static class RandomInstantProvider implements ArgumentsProvider {
9192
private static final Random random = new Random();
9293

9394
@Override
94-
public final Stream<Arguments> provideArguments(ExtensionContext context) {
95+
public final Stream<Arguments> provideArguments(ParameterDeclarations parameters, ExtensionContext context) {
9596
return provideArguments().map(Arguments::of).limit(DATA_SET_SIZE);
9697
}
9798

@@ -137,7 +138,7 @@ private static final class RandomEpochMillisProvider implements ArgumentsProvide
137138
private static final Random random = new Random();
138139

139140
@Override
140-
public Stream<Arguments> provideArguments(ExtensionContext context) {
141+
public Stream<Arguments> provideArguments(ParameterDeclarations parameters, ExtensionContext context) {
141142
return random.longs(DATA_SET_SIZE, Long.MIN_VALUE, Long.MAX_VALUE)
142143
.mapToObj(Instant::ofEpochMilli)
143144
.map(instant -> instant.truncatedTo(ChronoUnit.MILLIS))

0 commit comments

Comments
 (0)