From 882187ad2c3516b04e57170cc99ea4e1326886f4 Mon Sep 17 00:00:00 2001 From: tinker-michaelj Date: Thu, 27 May 2021 14:11:57 -0500 Subject: [PATCH] Use isIndexOutOfBounds Signed-off-by: tinker-michaelj --- .../src/main/java/com/hedera/services/context/NodeInfo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hedera-node/src/main/java/com/hedera/services/context/NodeInfo.java b/hedera-node/src/main/java/com/hedera/services/context/NodeInfo.java index a674851209a4..4604e970867b 100644 --- a/hedera-node/src/main/java/com/hedera/services/context/NodeInfo.java +++ b/hedera-node/src/main/java/com/hedera/services/context/NodeInfo.java @@ -105,7 +105,7 @@ private int validatedIndexFor(long nodeId) { } final int index = (int)nodeId; - if (index < 0 || index >= numberOfNodes) { + if (isIndexOutOfBounds(index)) { throw new IllegalArgumentException("No node with id " + nodeId + " was in the address book!"); } if (accounts[index] == null) {