JS: ArrayList.addAll must return Boolean

#KT-7809
This commit is contained in:
Ilya Gorbunov
2015-11-22 20:19:12 +03:00
parent b253ace198
commit 73e3a252d3
+4
View File
@@ -594,10 +594,14 @@
this.array.splice(index, 0, element); this.array.splice(index, 0, element);
}, },
addAll_4fm7v2$: function (collection) { addAll_4fm7v2$: function (collection) {
if (collection.size == 0) {
return false;
}
var it = collection.iterator(); var it = collection.iterator();
for (var i = this.array.length, n = collection.size; n-- > 0;) { for (var i = this.array.length, n = collection.size; n-- > 0;) {
this.array[i++] = it.next(); this.array[i++] = it.next();
} }
return true;
}, },
removeAt_za3lpa$: function (index) { removeAt_za3lpa$: function (index) {
this.checkRange(index); this.checkRange(index);