From 52a40bb380df8303a9ab395104f19f914e8d9f15 Mon Sep 17 00:00:00 2001 From: Peter Dekkers Date: Tue, 19 Dec 2023 12:03:22 +0100 Subject: [PATCH] Added info to assertion --- roboquant/src/main/kotlin/org/roboquant/common/PriceSeries.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)