src/share/classes/java/util/stream/Stream.java

Print this page

        

@@ -825,10 +825,11 @@
      * @param <T> the type of stream elements
      * @param values the elements of the new stream
      * @return the new stream
      */
     @SafeVarargs
+    @SuppressWarnings("varargs") // Creating a stream for an array is safe
     public static<T> Stream<T> of(T... values) {
         return Arrays.stream(values);
     }
 
     /**