From 0fe0315abab85ab2b650aaf4374546c41d228b76 Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Tue, 24 Oct 2023 17:56:29 -0600 Subject: [PATCH] review changes Signed-off-by: Danno Ferrin --- .../java/org/hyperledger/besu/evm/internal/FlexStack.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evm/src/main/java/org/hyperledger/besu/evm/internal/FlexStack.java b/evm/src/main/java/org/hyperledger/besu/evm/internal/FlexStack.java index cb18da98cfb..861cfbce8f9 100644 --- a/evm/src/main/java/org/hyperledger/besu/evm/internal/FlexStack.java +++ b/evm/src/main/java/org/hyperledger/besu/evm/internal/FlexStack.java @@ -25,7 +25,7 @@ * it expands past the top of the allocated stack, up to maxSize. * *

The operand stack is responsible for storing the current operands that the EVM can execute. It - * is assumed to have a fixed size. + * is assumed to have a fixed maximum size but may have a smaller memory footprint. * * @param the type parameter */ @@ -48,7 +48,7 @@ public class FlexStack { */ @SuppressWarnings("unchecked") public FlexStack(final int maxSize, final Class klass) { - checkArgument(maxSize >= 0, "max size must be non-negative"); + checkArgument(maxSize > 0, "max size must be positive"); this.currentCapacity = Math.min(INCREMENT, maxSize); this.entries = (T[]) Array.newInstance(klass, currentCapacity);