Skip to content

Commit 1a246c0

Browse files
committed
Fix ListableBeanFactory Kotlin extensions return types
1 parent 9786750 commit 1a246c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-beans/src/main/kotlin/org/springframework/beans/factory/ListableBeanFactoryExtensions.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ inline fun <reified T : Any> ListableBeanFactory.getBeanNamesForType(includeNonS
3131
* @author Sebastien Deleuze
3232
* @since 5.0
3333
*/
34-
inline fun <reified T : Any> ListableBeanFactory.getBeansOfType(includeNonSingletons: Boolean = true, allowEagerInit: Boolean = true): Map<String, Any> =
34+
inline fun <reified T : Any> ListableBeanFactory.getBeansOfType(includeNonSingletons: Boolean = true, allowEagerInit: Boolean = true): Map<String, T> =
3535
getBeansOfType(T::class.java, includeNonSingletons, allowEagerInit)
3636

3737
/**
@@ -49,7 +49,7 @@ inline fun <reified T : Annotation> ListableBeanFactory.getBeanNamesForAnnotatio
4949
* @author Sebastien Deleuze
5050
* @since 5.0
5151
*/
52-
inline fun <reified T : Annotation> ListableBeanFactory.getBeansWithAnnotation(): MutableMap<String, Any> =
52+
inline fun <reified T : Annotation> ListableBeanFactory.getBeansWithAnnotation(): Map<String, Any> =
5353
getBeansWithAnnotation(T::class.java)
5454

5555
/**

0 commit comments

Comments
 (0)