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:
parent
b1a1b4651e
commit
631e7881ef
|
@ -46,7 +46,7 @@ internal object WorkerParamsFactory {
|
|||
|
||||
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)
|
||||
return if (json == null) {
|
||||
null
|
||||
|
|
Loading…
Reference in New Issue