Closed PhilipDukhov closed 1 year ago
@PhilipDukhov many thanks, I'll go through the changes one more time very soon and if no other comments will appear proceed with merging.
Awesome 👍
@PhilipDukhov hello, unfortunately I think this requires more careful research. I just noticed that all my Java code that uses this SDK started to have various warnings like this:
Also it started complaining to possible NullPointerException where it can't be thrown:
I see more clearly now how Result
type may help here 😬
Not sure this all can be fixed quickly. Seems that I'll have to revert the change for now :(
Right now, when used from Kotlin, library generates a lot of optional parameters - that's default behaviour for Java interop, as there's no build-in nullability checks.
With this PR I've added
ParametersAreNonnullByDefault
annotation to the lib package - this makes all arguments non nullable by default for IDEA linter and for Kotlin interop.Also I've added a couple
Nullable
annotation for parameters that actually can be null - after adding@ParametersAreNonnullByDefault
, IDEA showed me such places with warnings.Also fixed a couple of warned placed