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

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

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 12
    • 8, 9
    • tools
    • b13
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: