Is there a way to account for an incorrect nullabi...
# announcements
c
Is there a way to account for an incorrect nullability annotation in a 3rd party library?
Copy code
public void adapterMethod(@NotNull Integer p1) {}
When you override this kotlin will make the parameter not null for obvious reasons.
Copy code
override fun adapterMethod(p1: Int) {}
Problem with this is that same library will pass null into that function, since we can’t change the annotation or mark it as nullable on the kotlin side. The only solution we have found it to just write a wrapper in java and use that instead. Is there a 100% kotlin way to handle this case or is the java wrapper the best way to do it.