korlov42 commented on code in PR #817:
URL: https://github.com/apache/ignite-3/pull/817#discussion_r882366487


##########
modules/core/src/main/java/org/apache/ignite/internal/util/CollectionUtils.java:
##########
@@ -107,6 +107,27 @@ public static <T> T first(Collection<? extends T> col) {
         return col.iterator().next();
     }
 
+    /**
+     * Gets first element from given iterable or returns {@code null} if list 
is empty.
+     *
+     * @param iterable Iterable to retrieve the first element.
+     * @param <T>  Type of the elements of the list.
+     * @return The first element of the given iterable or {@code null} in case 
the iterable is null or empty.
+     */
+    public static <T> T first(Iterable<? extends T> iterable) {

Review Comment:
   ```suggestion
       public static <T> @Nullable T first(Iterable<? extends T> iterable) {
   ```



-- 
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]

Reply via email to