is there any way for me to work around that?
# announcements
x
is there any way for me to work around that?
k
Are you sure? I feel like it should be
Any!
which would allow a
null
I think. Adding a
@Nullable
should solve the problem.
x
sadly it’s not my method, so I can’t modify it
s
You should be able to pass a
null
value to a platform type like
Any!
, without a
@Nullable
annotation
x
Screen Shot 2019-09-25 at 12.55.45 PM.png
s
It says the type is
Any
, not
Any!
. Are you sure this is a platform type, and you’re not hooking up to some kotlin extension …
k
Huh, what does the doc says if you bring it up in the ide?
x
Copy code
> Task :compileTestKotlin FAILED
e: /Users/calebcushing/IdeaProjects/phs/src/test/kotlin/com/potreromed/monitor/PatientLookupTest.kt: (79, 58): Null can not be a value of a non-null type Any
Screen Shot 2019-09-25 at 12.59.43 PM.png
s
Does the Spring framework declare this method with a Nullable-annotation? If so, that would explain things
☝️ 1
x
not according to the attached sources it doesn’t
m
Spring has NotNull set as default at package/module level IIRC so they only have to identify those places where something is nullable. I think that explains yours scenario.
x
ah
maybe I should file a bug?
m
I don't think it's a bug. Is there a function to check if the body is null instead? That's the way I'd code it. Use Equal when you have/expect a body, and check null/empty explicitly in the other case.