https://kotlinlang.org logo
#http4k
Title
# http4k
r

Razvan

04/30/2021, 8:46 AM
It's strage that kotlin does not catch it as Java's
getResourceAsStream
is annotated as
@nullable
I thought it would say that you can't call
.reader()' on its result without
?
or
!!`
Copy code
Companion::class.java.getResourceAsStream("/${resource.removePrefix("/")}").reader()
d

dave

05/02/2021, 5:03 PM
Have made this slightly friendlier in latest version.
👍 1
r

Razvan

05/06/2021, 9:43 AM
FileNotFoundException
is better yep... Thank you!
d

dave

05/06/2021, 9:46 AM
(even though it's not technically a file...)
3 Views