Skip to content

Commit

Permalink
Revert one of the checks added in BooleanSparseArraySource
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Feb 5, 2025
1 parent e569c5d commit 71817cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void setNull(long key) {
return;
}
final int indexWithinBlock = (int) (key & INDEX_MASK);
if (BooleanUtils.isNull(blocks2[indexWithinBlock])) {
if (blocks2[indexWithinBlock] == NULL_BOOLEAN_AS_BYTE) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1163,9 +1163,7 @@ private static void replicateBooleanSparseArraySource() throws IOException {
lines = simpleFixup(lines, "nullByRanges",
"block\\[indexWithinBlock\\] != NULL_BOOLEAN", "!BooleanUtils.isNull(block[indexWithinBlock])",
"NULL_BOOLEAN", "NULL_BOOLEAN_AS_BYTE");
lines = simpleFixup(lines, "setNull",
"blocks2\\[indexWithinBlock\\] == NULL_BOOLEAN", "BooleanUtils.isNull(blocks2[indexWithinBlock])",
"NULL_BOOLEAN", "NULL_BOOLEAN_AS_BYTE");
lines = simpleFixup(lines, "setNull", "NULL_BOOLEAN", "NULL_BOOLEAN_AS_BYTE");

lines = replaceRegion(lines, "copyFromTypedArray", Arrays.asList(
" for (int jj = 0; jj < length; ++jj) {",
Expand Down

0 comments on commit 71817cb

Please sign in to comment.