hotspot/src/share/vm/utilities/growableArray.hpp
changeset 24946 24b68ccf3fc4
parent 24010 e1761df99d5f
child 30125 8ba6e8e367e9
--- a/hotspot/src/share/vm/utilities/growableArray.hpp	Tue Jun 10 10:00:59 2014 +0000
+++ b/hotspot/src/share/vm/utilities/growableArray.hpp	Tue Jun 10 13:37:16 2014 +0200
@@ -349,6 +349,7 @@
 
   // inserts the given element before the element at index i
   void insert_before(const int idx, const E& elem) {
+    assert(0 <= idx && idx <= _len, "illegal index");
     check_nesting();
     if (_len == _max) grow(_len);
     for (int j = _len - 1; j >= idx; j--) {
@@ -360,7 +361,7 @@
 
   void appendAll(const GrowableArray<E>* l) {
     for (int i = 0; i < l->_len; i++) {
-      raw_at_put_grow(_len, l->_data[i], 0);
+      raw_at_put_grow(_len, l->_data[i], E());
     }
   }