diff --git a/roboquant/src/main/kotlin/org/roboquant/common/PriceSeries.kt b/roboquant/src/main/kotlin/org/roboquant/common/PriceSeries.kt index 780a904c3..31c345391 100644 --- a/roboquant/src/main/kotlin/org/roboquant/common/PriceSeries.kt +++ b/roboquant/src/main/kotlin/org/roboquant/common/PriceSeries.kt @@ -105,7 +105,7 @@ open class PriceSeries(private var capacity: Int) { * Increase the capacity to the [newCapacity] */ fun increaseCapacity(newCapacity: Int) { - require(newCapacity > capacity) + require(newCapacity > capacity) { "new capcity should be larger than old one, new=$newCapacity old=$capacity"} val oldData = toDoubleArray() data = DoubleArray(newCapacity) System.arraycopy(oldData, 0, data, 0, size)