Skip to content

Commit 0698095

Browse files
committed
Drop SharedMetadataReaderFactoryContextInitializer
Closes gh-47687
1 parent 77f207a commit 0698095

File tree

5 files changed

+7
-210
lines changed

5 files changed

+7
-210
lines changed

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/SharedMetadataReaderFactoryContextInitializer.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
3434
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
3535
import org.springframework.beans.factory.support.RegisteredBean;
36-
import org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory;
3736
import org.springframework.context.ApplicationContextInitializer;
3837
import org.springframework.context.ApplicationListener;
3938
import org.springframework.context.ConfigurableApplicationContext;
@@ -187,20 +186,19 @@ private void configureConfigurationClassPostProcessor(ConfigurationClassPostProc
187186
/**
188187
* {@link FactoryBean} to create the shared {@link MetadataReaderFactory}.
189188
*/
190-
static class SharedMetadataReaderFactoryBean
191-
implements FactoryBean<ConcurrentReferenceCachingMetadataReaderFactory>, ResourceLoaderAware,
192-
ApplicationListener<ContextRefreshedEvent> {
189+
static class SharedMetadataReaderFactoryBean implements FactoryBean<CachingMetadataReaderFactory>,
190+
ResourceLoaderAware, ApplicationListener<ContextRefreshedEvent> {
193191

194192
@SuppressWarnings("NullAway.Init")
195-
private ConcurrentReferenceCachingMetadataReaderFactory metadataReaderFactory;
193+
private CachingMetadataReaderFactory metadataReaderFactory;
196194

197195
@Override
198196
public void setResourceLoader(ResourceLoader resourceLoader) {
199-
this.metadataReaderFactory = new ConcurrentReferenceCachingMetadataReaderFactory(resourceLoader);
197+
this.metadataReaderFactory = new CachingMetadataReaderFactory(resourceLoader);
200198
}
201199

202200
@Override
203-
public ConcurrentReferenceCachingMetadataReaderFactory getObject() throws Exception {
201+
public CachingMetadataReaderFactory getObject() throws Exception {
204202
return this.metadataReaderFactory;
205203
}
206204

core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/SharedMetadataReaderFactoryContextInitializerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
import org.springframework.boot.SpringApplication;
2929
import org.springframework.boot.WebApplicationType;
3030
import org.springframework.boot.autoconfigure.SharedMetadataReaderFactoryContextInitializer.CachingMetadataReaderFactoryPostProcessor;
31-
import org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory;
3231
import org.springframework.context.ApplicationContextInitializer;
3332
import org.springframework.context.annotation.AnnotationConfigUtils;
3433
import org.springframework.context.annotation.ConfigurationClassPostProcessor;
3534
import org.springframework.context.support.GenericApplicationContext;
35+
import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
3636
import org.springframework.test.util.ReflectionTestUtils;
3737

3838
import static org.assertj.core.api.Assertions.assertThat;
@@ -83,7 +83,7 @@ void initializeWhenUsingSupplierDecorates() {
8383
assertThat(bean).isSameAs(configurationAnnotationPostProcessor);
8484
then(configurationAnnotationPostProcessor).should()
8585
.setMetadataReaderFactory(assertArg((metadataReaderFactory) -> assertThat(metadataReaderFactory)
86-
.isInstanceOf(ConcurrentReferenceCachingMetadataReaderFactory.class)));
86+
.isInstanceOf(CachingMetadataReaderFactory.class)));
8787
}
8888

8989
static class TestConfig {

core/spring-boot/src/main/java/org/springframework/boot/type/classreading/ConcurrentReferenceCachingMetadataReaderFactory.java

Lines changed: 0 additions & 109 deletions
This file was deleted.

core/spring-boot/src/main/java/org/springframework/boot/type/classreading/package-info.java

Lines changed: 0 additions & 23 deletions
This file was deleted.

core/spring-boot/src/test/java/org/springframework/boot/type/classreading/ConcurrentReferenceCachingMetadataReaderFactoryTests.java

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)