public static <T> Set<T> asSet(final T... items) {
        //noinspection Java9CollectionFactory
        return items == null || items.length == 0
                ? Collections.emptySet()
                : Collections.unmodifiableSet(new HashSet<>(Arrays.asList(items)));
    }
Returns the passed array of items or varargs items as a non-null set.
Does not support null items in the array.

@return A non-null unmodifiable set of items.
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java