8023250: Update JavaScript code in JDK for changes in iteration over Java arrays
authorattila
Tue, 20 Aug 2013 11:15:08 +0200
changeset 19446 8e08c96b0808
parent 19445 713cf2a92531
child 19447 f2da7f97e104
child 19565 e1593e8a70ff
8023250: Update JavaScript code in JDK for changes in iteration over Java arrays Reviewed-by: sundar, sla
jdk/src/share/classes/com/sun/tools/hat/resources/hat.js
--- a/jdk/src/share/classes/com/sun/tools/hat/resources/hat.js	Tue Aug 20 17:36:15 2013 +0200
+++ b/jdk/src/share/classes/com/sun/tools/hat/resources/hat.js	Tue Aug 20 11:15:08 2013 +0200
@@ -1144,7 +1144,7 @@
     } else {
         for (var index in array) {
             var it = array[index];
-            if (func(it, index, array)) {
+            if (func(it, String(index), array)) {
                 return true;
             }
         }
@@ -1244,7 +1244,7 @@
         var result = new Array();
         for (var index in array) {
             var it = array[index];
-            if (func(it, index, array, result)) {
+            if (func(it, String(index), array, result)) {
                 result[result.length] = it;
             }
         }
@@ -1317,7 +1317,7 @@
         var result = new Array();
         for (var index in array) {
             var it = array[index];
-            result[result.length] = func(it, index, array, result);
+            result[result.length] = func(it, String(index), array, result);
         }
         return result;
     }