Fix warning about implicit type, introduced in Kotlin 1.5.20.

"Returning type parameter has been inferred to Nothing implicitly. Please specify type arguments explicitly to hide this warning. Nothing can produce an exception at runtime."
This commit is contained in:
Benoit Marty 2021-06-25 17:42:38 +02:00
parent b1a1b4651e
commit 631e7881ef
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ internal object WorkerParamsFactory {
inline fun <reified T> fromData(data: Data) = fromData(T::class.java, data) inline fun <reified T> fromData(data: Data) = fromData(T::class.java, data)
fun <T> fromData(clazz: Class<T>, data: Data): T? = tryOrNull("Unable to parse work parameters") { fun <T> fromData(clazz: Class<T>, data: Data): T? = tryOrNull<T?>("Unable to parse work parameters") {
val json = data.getString(KEY) val json = data.getString(KEY)
return if (json == null) { return if (json == null) {
null null