when I have some incoming platform type like so: ...
# announcements
p
when I have some incoming platform type like so:
Copy code
val header = request.getHeader("xyz")
I see that
header
has an inferred type of
String!
... is this okay? what happens if
getHeader
returns
null
?
d
If
getHeader
returns
null
and you try to call something on
header
, you get a
NullPointerException
.
If you declare
header
as
String
explicitly, you will get the NPE immediately on assignment instead.
p
I see. Thank you.