Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e5b58ef

Browse files
committed
Deprecate put(MergedContextConfiguration, ApplicationContext) in ContextCache
Closes gh-35415
1 parent 02b3a2b commit e5b58ef

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ public interface ContextCache {
116116
* @param context the {@code ApplicationContext}; never {@code null}
117117
* @see #get(MergedContextConfiguration)
118118
* @see #put(MergedContextConfiguration, LoadFunction)
119+
* @deprecated since Spring Framework 7.0 in favor of
120+
* {@link #put(MergedContextConfiguration, LoadFunction)}
119121
*/
122+
@Deprecated(since = "7.0")
120123
void put(MergedContextConfiguration key, ApplicationContext context);
121124

122125
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ private void restartContextIfNecessary(ApplicationContext context) {
154154
}
155155

156156
@Override
157+
@Deprecated(since = "7.0")
157158
public void put(MergedContextConfiguration key, ApplicationContext context) {
158159
Assert.notNull(key, "Key must not be null");
159160
Assert.notNull(context, "ApplicationContext must not be null");

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ void maxCacheSizeZero() {
8383

8484

8585
@Nested
86+
@SuppressWarnings("deprecation")
8687
class PutUnitTests {
8788

8889
@Test

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /