-
Bug
-
Resolution: Fixed
-
P4
-
None
-
8u31
-
x86
-
windows_8
A DESCRIPTION OF THE PROBLEM :
This section says: "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"
However, it should be noted that only List and Map collection elements can be accessed using the index in brackets. In particular, this is not true for Queue and Set collection elements.
URL OF FAULTY DOCUMENTATION :
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/api.html#sthref23
This section says: "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"
However, it should be noted that only List and Map collection elements can be accessed using the index in brackets. In particular, this is not true for Queue and Set collection elements.
URL OF FAULTY DOCUMENTATION :
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/api.html#sthref23