Skip to content

Commit e3bfc1d

Browse files
committed
Merge pull request #46256 from Dockerel
* gh-46256: Use ThreadLocal.remove() instead of set(null) Closes gh-46256
2 parents 808d2e5 + f316e3e commit e3bfc1d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
* @author Moritz Halbritter
168168
* @author Tadaya Tsuyukubo
169169
* @author Yanming Zhou
170+
* @author Giheon Do
170171
*/
171172
@ExtendWith(OutputCaptureExtension.class)
172173
class SpringApplicationTests {
@@ -1470,7 +1471,7 @@ void fromRunsWithAdditionalSources() {
14701471
.run()
14711472
.getApplicationContext();
14721473
assertThat(ExampleAdditionalConfig.local.get()).isNotNull();
1473-
ExampleAdditionalConfig.local.set(null);
1474+
ExampleAdditionalConfig.local.remove();
14741475
}
14751476

14761477
@Test

0 commit comments

Comments
 (0)