[DATACMNS-1521] Add @javax.annotation.Nonnull to CrudRepository and PagingAndSortingRepository methods Created: 23/Apr/19  Updated: 09/May/19  Resolved: 09/May/19

Status: Resolved
Project: Spring Data Commons
Component/s: Core
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Eric M Fenderbosch Assignee: Oliver Drotbohm
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Last updater: Oliver Drotbohm


We have developers adding null checks to the List/Collection/Iterable/Optional returned values from CrudRepo/PagingRepo. I do have checkstyle turned on, so if the top level interfaces were to add this annotation, they'd get flagged during the build.

Comment by Oliver Drotbohm [ 23/Apr/19 ]

Can you clarify why you think this is needed? Or what exactly is? The package-info.java files in all Spring Data Commons packages already contain Spring's @NonNullApi annotations so that all methods and parameters in declared types are considered non-null already.

Comment by Oliver Drotbohm [ 09/May/19 ]

Closing due to inactivity. Feel free to reopen with more information.

Generated at Fri Jul 10 05:43:26 UTC 2020 using Jira 8.5.4#805004-sha1:0444eab799707f9ad7b248d69f858774aadfd250.