Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
Signed-off-by: Danno Ferrin <[email protected]>
  • Loading branch information
shemnon committed Oct 24, 2023
1 parent a6cad86 commit 0fe0315
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* it expands past the top of the allocated stack, up to maxSize.
*
* <p>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 <T> the type parameter
*/
Expand All @@ -48,7 +48,7 @@ public class FlexStack<T> {
*/
@SuppressWarnings("unchecked")
public FlexStack(final int maxSize, final Class<T> 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);
Expand Down

0 comments on commit 0fe0315

Please sign in to comment.