src/share/classes/java/util/Arrays.java

Print this page

        

@@ -2821,10 +2821,11 @@
      * </pre>
      *
      * @param a the array by which the list will be backed
      * @return a list view of the specified array
      */
+    @SafeVarargs
     public static <T> List<T> asList(T... a) {
         return new ArrayList<>(a);
     }
 
     /**