@@ -352,7 +352,7 @@ public static void notEmpty(Object @Nullable [] array, Supplier<String> messageS
352352 * @param message the exception message to use if the assertion fails
353353 * @throws IllegalArgumentException if the object array contains a {@code null} element
354354 */
355- public static void noNullElements (Object @ Nullable [] array , String message ) {
355+ public static void noNullElements (@ Nullable Object @ Nullable [] array , String message ) {
356356 if (array != null ) {
357357 for (Object element : array ) {
358358 if (element == null ) {
@@ -374,7 +374,7 @@ public static void noNullElements(Object @Nullable [] array, String message) {
374374 * @throws IllegalArgumentException if the object array contains a {@code null} element
375375 * @since 5.0
376376 */
377- public static void noNullElements (Object @ Nullable [] array , Supplier <String > messageSupplier ) {
377+ public static void noNullElements (@ Nullable Object @ Nullable [] array , Supplier <String > messageSupplier ) {
378378 if (array != null ) {
379379 for (Object element : array ) {
380380 if (element == null ) {
@@ -429,7 +429,7 @@ public static void notEmpty(@Nullable Collection<?> collection, Supplier<String>
429429 * @throws IllegalArgumentException if the collection contains a {@code null} element
430430 * @since 5.2
431431 */
432- public static void noNullElements (@ Nullable Collection <?> collection , String message ) {
432+ public static void noNullElements (@ Nullable Collection <? extends @ Nullable Object > collection , String message ) {
433433 if (collection != null ) {
434434 for (Object element : collection ) {
435435 if (element == null ) {
@@ -451,7 +451,7 @@ public static void noNullElements(@Nullable Collection<?> collection, String mes
451451 * @throws IllegalArgumentException if the collection contains a {@code null} element
452452 * @since 5.2
453453 */
454- public static void noNullElements (@ Nullable Collection <?> collection , Supplier <String > messageSupplier ) {
454+ public static void noNullElements (@ Nullable Collection <? extends @ Nullable Object > collection , Supplier <String > messageSupplier ) {
455455 if (collection != null ) {
456456 for (Object element : collection ) {
457457 if (element == null ) {
0 commit comments