Skip to content

Commit

Permalink
Use isIndexOutOfBounds
Browse files Browse the repository at this point in the history
Signed-off-by: tinker-michaelj <[email protected]>
  • Loading branch information
tinker-michaelj committed May 27, 2021
1 parent e11d777 commit 882187a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 882187a

Please sign in to comment.