Browse Source

Deprecate put(MergedContextConfiguration, ApplicationContext) in ContextCache

Closes gh-35415
pull/35418/head
Sam Brannen 7 months ago
parent
commit
e5b58effa3
  1. 3
      spring-test/src/main/java/org/springframework/test/context/cache/ContextCache.java
  2. 1
      spring-test/src/main/java/org/springframework/test/context/cache/DefaultContextCache.java
  3. 1
      spring-test/src/test/java/org/springframework/test/context/cache/LruContextCacheTests.java

3
spring-test/src/main/java/org/springframework/test/context/cache/ContextCache.java vendored

@ -116,7 +116,10 @@ public interface ContextCache { @@ -116,7 +116,10 @@ public interface ContextCache {
* @param context the {@code ApplicationContext}; never {@code null}
* @see #get(MergedContextConfiguration)
* @see #put(MergedContextConfiguration, LoadFunction)
* @deprecated since Spring Framework 7.0 in favor of
* {@link #put(MergedContextConfiguration, LoadFunction)}
*/
@Deprecated(since = "7.0")
void put(MergedContextConfiguration key, ApplicationContext context);
/**

1
spring-test/src/main/java/org/springframework/test/context/cache/DefaultContextCache.java vendored

@ -154,6 +154,7 @@ public class DefaultContextCache implements ContextCache { @@ -154,6 +154,7 @@ public class DefaultContextCache implements ContextCache {
}
@Override
@Deprecated(since = "7.0")
public void put(MergedContextConfiguration key, ApplicationContext context) {
Assert.notNull(key, "Key must not be null");
Assert.notNull(context, "ApplicationContext must not be null");

1
spring-test/src/test/java/org/springframework/test/context/cache/LruContextCacheTests.java vendored

@ -83,6 +83,7 @@ class LruContextCacheTests { @@ -83,6 +83,7 @@ class LruContextCacheTests {
@Nested
@SuppressWarnings("deprecation")
class PutUnitTests {
@Test

Loading…
Cancel
Save