-
Bug
-
Resolution: Fixed
-
P4
-
None
-
8u31
-
x86
-
windows_8
A DESCRIPTION OF THE PROBLEM :
This section says: "Unlike other collections, to iterate over keys and values in a map, you must use the keySet() and values() methods."
However, to iterate over values in a map, you can also use the general syntax to iterate over a collection, i.e.:
for each (var i in hm) print(i)
instead of:
for each (var i in hm.values()) print(i)
URL OF FAULTY DOCUMENTATION :
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/api.html#sthref23
This section says: "Unlike other collections, to iterate over keys and values in a map, you must use the keySet() and values() methods."
However, to iterate over values in a map, you can also use the general syntax to iterate over a collection, i.e.:
for each (var i in hm) print(i)
instead of:
for each (var i in hm.values()) print(i)
URL OF FAULTY DOCUMENTATION :
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/api.html#sthref23