Skip to content

Commit 2d82436

Browse files
committed
Fix NPE in CrudRepositoryExtensions
1 parent 07a5c58 commit 2d82436

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/org/springframework/data/repository/CrudRepositoryExtensions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ package org.springframework.data.repository
2323
* @author Sebastien Deleuze
2424
* @since 2.1.4
2525
*/
26-
fun <T, ID> CrudRepository<T, ID>.findByIdOrNull(id: ID): T? = findById(id!!).orElse(null)
26+
fun <T, ID: Any> CrudRepository<T, ID>.findByIdOrNull(id: ID): T? = findById(id).orElse(null)

0 commit comments

Comments
 (0)