spring-data-commons
spring-data-commons copied to clipboard
Invalid @NonNullApi [DATACMNS-1616]
James Howe opened DATACMNS-1616 and commented
There are some APIs that are designed to work with nulls, but are in packages annotated with @NonNullApi. This generates static analysis warning for any implementers / extenders.
I've not done an exhaustive search, but one example is o.s.d.querydsl.binding.SingleValueBinding#bind
Returns: can be null, in which case the binding will not be incorporated in the overall Predicate .
Attempting to return null will be treated as a mistake
Affects: 2.2.1 (Moore SR1)
James Howe commented
Related: I've also just noticed MultiValueBinding has the same documented return, even though it returns an Optional