Overview
Although we have @Contract declarations for various methods in some of our core utilities (such as Assert and StringUtils), we have not yet consistently declared nullability contracts via @Contract for all applicable utility methods.
To provide better nullability support, we should therefore consistently declare method-level nullability contracts for the following core utilities.
SupplierUtilsClassUtilsCollectionUtilsFileSystemUtilsObjectUtilsPatternMatchUtilsReflectionUtilsResourceUtilsSerializationUtilsStringUtilsTypeUtils
Related Issues
-
34896
-
34911
Comment From: christophstrobl
When adding @Contract annotations please also consider switching CollectionUtils.contains(@Nullable Iterator<?> iterator, Object element) to CollectionUtils.contains(@Nullable Iterator<?> iterator, @Nullable Object element).
Comment From: sbrannen
Sure, we'll take that into consideration, @christophstrobl.
Comment From: sbrannen
When adding
@Contractannotations please also consider switchingCollectionUtils.contains(@Nullable Iterator<?> iterator, Object element)toCollectionUtils.contains(@Nullable Iterator<?> iterator, @Nullable Object element).
@christophstrobl, this will be addressed separately in:
-
35023