Skip to content

Commit

Permalink
Use original init size when transferring cache (#5794)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajsutton authored Jun 15, 2022
1 parent cded987 commit e93785a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public final class ArrayIntCache<V> implements IntCache<V> {
private final int initSize;

public ArrayIntCache() {
this(16);
this(DEFAULT_INITIAL_CACHE_SIZE);
}

public ArrayIntCache(int initialSize) {
Expand Down Expand Up @@ -90,7 +90,7 @@ public IntCache<V> copy() {
@Override
public IntCache<V> transfer() {
IntCache<V> copy = copy();
this.values = createArray(DEFAULT_INITIAL_CACHE_SIZE);
this.values = createArray(initSize);
return copy;
}

Expand Down

0 comments on commit e93785a

Please sign in to comment.