Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -169,7 +169,7 @@ public DynamicObject appendManyLongIntoInteger(DynamicObject array, int otherSiz
final int newSize = oldSize + otherSize;

final int[] oldStore = (int[]) Layouts.ARRAY.getStore(array);
long[] newStore = ArrayUtils.longCopyOf(oldStore, ArrayUtils.capacity(oldStore.length, newSize));
long[] newStore = ArrayUtils.longCopyOf(oldStore, newSize);

System.arraycopy(other, 0, newStore, oldSize, otherSize);

@@ -232,7 +232,7 @@ public DynamicObject appendManyGeneralizeDoubleObject(DynamicObject array, int o
public void appendManyGeneralizeGeneric(DynamicObject array, ArrayMirror storeMirror, int otherSize, ArrayMirror otherStoreMirror) {
final int oldSize = Layouts.ARRAY.getSize(array);
final int newSize = oldSize + otherSize;
Object[] newStore = storeMirror.getBoxedCopy(ArrayUtils.capacity(storeMirror.getLength(), newSize));
Object[] newStore = storeMirror.getBoxedCopy(newSize);
otherStoreMirror.copyTo(newStore, 0, oldSize, otherSize);
Layouts.ARRAY.setStore(array, newStore);
Layouts.ARRAY.setSize(array, newSize);

0 comments on commit 35323f6

Please sign in to comment.