korlov42 commented on a change in pull request #484:
URL: https://github.com/apache/ignite-3/pull/484#discussion_r764065299



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/util/ArrayUtils.java
##########
@@ -296,6 +299,21 @@ public static boolean nullOrEmpty(boolean[] arr) {
         return nullOrEmpty(vals) ? Collections.emptyList() : 
Arrays.asList(vals);
     }
 
+    /**
+     * Converts array to {@link Set}.
+     *
+     * <p>Note that unlike {@link Arrays#asList(Object[])}, this method is 
{@code null}-safe. If {@code null} is passed in, then empty set
+     * will be returned.
+     *
+     * @param vals Array of values
+     * @param <T>  Array type.
+     * @return {@link Set} instance for input array.
+     */
+    @SafeVarargs
+    public static <T> Set<T> asSet(@Nullable T... vals) {
+        return nullOrEmpty(vals) ? Collections.emptySet() : 
Stream.of(vals).collect(Collectors.toSet());

Review comment:
       this one is not resolved actually




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