Is it possible to make @Nullable annotations in libraries currently not understood by the kotlin nullabillity annotation magic count as nullable values somehow? For context, im using a library that defines its own @nullable, and id like kotlin to consider that annotation such that my calls to annotated functions from that library are properly detected as returning nullable values.
Ive looked at the JSR305 compiler flag thingy, but im not sure if thats actually what i need here - at least it doesnt do anything, and im unsure how kotlin would know if the specified annotation is supposed to mean non-null or nullable
a
Alexey Belkov [JB]
01/28/2021, 11:25 AM
Can you ask the library maintainer to annotate their types with JSR305 annotations so Kotlin would understand it?
l
Leon K
01/28/2021, 11:28 AM
I guess if thats the only option, thats the only option 😕 i think they explicitly stated they want to avoid the jsr305 dependency tho 🤔
In general, i assume that implies there is no magical hidden