Closes gh-35415
@ -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);
/**
@ -154,6 +154,7 @@ public class DefaultContextCache implements ContextCache {
}
@Override
public void put(MergedContextConfiguration key, ApplicationContext context) {
Assert.notNull(key, "Key must not be null");
Assert.notNull(context, "ApplicationContext must not be null");
@ -83,6 +83,7 @@ class LruContextCacheTests {
@Nested
@SuppressWarnings("deprecation")
class PutUnitTests {
@Test