Skip to content

Commit f316e3e

Browse files
Dockerelwilkinsona
authored andcommitted
Use ThreadLocal.remove() instead of set(null)
Signed-off-by: Giheon Do <[email protected]> See gh-46256
1 parent 808d2e5 commit f316e3e

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)