Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8173730

Stop including enhanced for-loop tip for enum values() method

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8, 9
    • Fix Version/s: 12
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b13
    • Verification:
      Not verified

      Description

      Since JDK 5, the javadoc for the implicit values() method of an enum has included text like:

      "This [values()] method may be used to iterate over the constants as follows:

      for (RoundingMode c : RoundingMode.values())
          System.out.println(c);"

      This text was a useful tip in 2004 when JDK 5 shipped and the enhanced for-loop was new, but it should be assumed as common knowledge now and thus just clutter in the javadoc output.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              darcy Joe Darcy
              Reporter:
              darcy Joe Darcy
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: