andi-huber commented on code in PR #1843:
URL: https://github.com/apache/causeway/pull/1843#discussion_r1305607606
##########
commons/src/main/java/org/apache/causeway/commons/collections/Can.java:
##########
@@ -176,29 +188,48 @@ public static <T> Can<T> of(final T ... array) {
/**
* Returns either a {@code Can} with all the elements from given {@code
array}
- * or an empty {@code Can} if the {@code array} is {@code null}. Any
elements
- * equal to {@code null} are ignored and will not be contained in the
resulting {@code Can}.
+ * or an empty {@code Can} if the {@code array} is {@code null}.
+ *
+ * <p>
+ * <b>NOTE:</b> Any elements equal to {@code null} are ignored and will
not be contained in the resulting {@code Can}.
+ *
+ * </p>
* @param <T>
* @param array
* @return non-null
*/
public static <T> Can<T> ofArray(final @Nullable T[] array) {
+ return ofArray(array, Function.identity());
+ }
+ /**
+ *
+ * @param array
+ * @param nullMapper -
+ * @return
+ * @param <T>
+ */
+ public static <T> Can<T> ofArray(T[] array, Function<T, T> nullMapper) {
Review Comment:
arguments: **array** is `@Nullable` while **nullMapper** is `@NonNull`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]