It's strage that kotlin does not catch it as Java'...
# http4k
r
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
Have made this slightly friendlier in latest version.
👍 1
r
FileNotFoundException
is better yep... Thank you!
d
(even though it's not technically a file...)