src/share/classes/java/lang/SafeVarargs.java

Print this page

        

@@ -63,10 +63,15 @@
  * <li> The body of the method or constructor declaration performs
  * potentially unsafe operations, such as an assignment to an element
  * of the variable-arity parameter's array that generates an unchecked
  * warning.
  *
+ * Aliasing a variable with a different type to refer to the parameter
+ * value is potentially unsafe.  Generally safe operations on the
+ * parameter include reading from it, which includes iterating over it
+ * using the enhanced for statement.
+ *
  * <p>Future versions of the platform may mandate compiler errors for
  * such unsafe operations.
  *
  * </ul>
  *