@ -87,6 +87,7 @@ import org.springframework.core.io.Resource;
@@ -87,6 +87,7 @@ import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlResource ;
import org.springframework.core.testfixture.io.SerializationTestUtils ;
import org.springframework.lang.Nullable ;
import org.springframework.util.StringUtils ;
import org.springframework.util.StringValueResolver ;
import static org.assertj.core.api.Assertions.assertThat ;
@ -3223,6 +3224,10 @@ class DefaultListableBeanFactoryTests {
@@ -3223,6 +3224,10 @@ class DefaultListableBeanFactoryTests {
assertThat ( lbf . getBeanNamesForType ( DerivedTestBean . class ) ) . containsExactly ( "bd1" ) ;
assertThat ( lbf . getBeanNamesForType ( NestedTestBean . class ) ) . isSameAs ( nestedBeanNames ) ;
assertThat ( lbf . getBeanNamesForType ( Object . class ) ) . isSameAs ( allBeanNames ) ;
lbf . registerSingleton ( "bd3" , new Object ( ) ) ;
assertThat ( lbf . getBeanNamesForType ( NestedTestBean . class ) ) . isSameAs ( nestedBeanNames ) ;
assertThat ( lbf . getBeanNamesForType ( Object . class ) ) . containsExactly ( StringUtils . addStringToArray ( allBeanNames , "bd3" ) ) ;
}