Hadi Tok
10/12/2018, 8:48 AMFatal Exception: java.lang.IllegalStateException: readValue(content, jacksonTypeRef<T>()) must not be null
I couldn’t understand what is being null here. Any idea?ribesg
10/12/2018, 8:51 AMreadValue(content, jacksonTypeRef<T>())
(probably called by your call to mapper.readValue(string)
returns null while not allowed to. Or at least that's what I think is happening.Hadi Tok
10/12/2018, 8:52 AMinline fun <reified T: Any> ObjectMapper.readValue(content: String): T = readValue(content, jacksonTypeRef<T>())
It should be return null. Anything I am missing here?ribesg
10/12/2018, 10:08 AMT: Any
, then T
is not nullable, T?
is. If T: Any?
, then T
is nullable.fun <T: Any> foo(): T
cannot return nullHadi Tok
10/12/2018, 10:22 AMmapper.readValue(string)
could return null is when string is null which doesn’t seem to be possible for me.ribesg
10/12/2018, 12:45 PMHadi Tok
10/12/2018, 12:57 PMribesg
10/15/2018, 12:59 PM