<When retrofit2 won't return me Call in a typical ...
# stackoverflow
u
When retrofit2 won't return me Call in a typical implementation of CallAdapter.Factory()? Given following implementation of Retrofit2 CallAdapter.Factory(): override fun get( returnType: Type, annotations: Array, retrofit: Retrofit ): CallAdapter? { // suspend functions wrap the response type in
Call
if (Call::class.java != getRawType(returnType)) { return null } ... } If returnType is null, Utils.getRawType will throw NullPointerException. How I can make retrofit to return me WildcardType or any other expected by method getRawType type that...