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

Nashorn api doc says all java collections are treated like arrays - only Lists are treated like so.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 8u40, 9
    • docs
    • None
    • 8
    • generic
    • generic

    Description

      Nashorn API doc here:

      http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/api.html

      " section 2.8 "Nashorn interprets Java collections as arrays"

      "Nashorn interprets Java collections as arrays. You can access collection elements using the index in brackets ([]) and iterate over the values of a collection using the for each statement, as shown in the following example:"

      Has to changed to say "Java Lists as arrays" everywhere.

      Attachments

        Activity

          People

            rgallard Raymond Gallardo
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: