-
Bug
-
Resolution: Fixed
-
P4
-
12
Since the introduction of enum types in Java SE 5, section 8.9.3 of the JLS has included the following javadoc for the implicit enum member `public static E[] values()`:
/**
* Returns an array containing the constants of this enum
* type, in the order they're declared. This method may be
* used to iterate over the constants as follows:
*
* for(E c : E.values())
* System.out.println(c);
* ...
The tip about the for-each loop may have been reasonable for Java SE 5.0, but it not necessary today and has been removed from the generated javadoc viaJDK-8173730 in JDK 12.
/**
* Returns an array containing the constants of this enum
* type, in the order they're declared. This method may be
* used to iterate over the constants as follows:
*
* for(E c : E.values())
* System.out.println(c);
* ...
The tip about the for-each loop may have been reasonable for Java SE 5.0, but it not necessary today and has been removed from the generated javadoc via
- relates to
-
JDK-8173730 Stop including enhanced for-loop tip for enum values() method
-
- Closed
-