Skip to content

Commit 1391f3c

Browse files
committed
Fix checkstyle nits
1 parent 0839e1a commit 1391f3c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • src/main/java/org/apache/commons/codec/digest

src/main/java/org/apache/commons/codec/digest/Blake3.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,10 @@ private static void checkBufferArgs(byte[] buffer, int offset, int length) {
260260
if (length < 0) {
261261
throw new IndexOutOfBoundsException("Length must be non-negative");
262262
}
263-
if (offset > buffer.length - length) {
263+
int bufferLength = buffer.length;
264+
if (offset > bufferLength - length) {
264265
throw new IndexOutOfBoundsException(
265-
"Offset " + offset + " and length " + length + " out of bounds with buffer length " + buffer.length);
266+
"Offset " + offset + " and length " + length + " out of bounds with buffer length " + bufferLength);
266267
}
267268
}
268269

0 commit comments

Comments
 (0)