Skip to content

Commit 1719c5b

Browse files
committed
Correct upper bound in for loop
1 parent b51dcaf commit 1719c5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSetMethods.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static boolean anySet(Object baseObject, long baseOffset, long bitSetWidt
7474
assert bitSetWidthInBytes % WORD_SIZE == 0;
7575
int widthInLong = (int)(bitSetWidthInBytes / WORD_SIZE);
7676
long addr = baseOffset;
77-
for (int i = 0; i <= widthInLong; i++, addr += WORD_SIZE) {
77+
for (int i = 0; i < widthInLong; i++, addr += WORD_SIZE) {
7878
if (PlatformDependent.UNSAFE.getLong(baseObject, addr) != 0) {
7979
return true;
8080
}

0 commit comments

Comments
 (0)