This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/trunk by this push:
new 85d779f8e6 OAK-11785: Remove usage of Guava
preconditions.checkPositionIndex (#2363)
85d779f8e6 is described below
commit 85d779f8e6222f2490db2be01eda3dcc30c29e49
Author: Julian Reschke <[email protected]>
AuthorDate: Sat Jul 5 07:37:50 2025 +0200
OAK-11785: Remove usage of Guava preconditions.checkPositionIndex (#2363)
---
.../java/org/apache/jackrabbit/oak/segment/DefaultSegmentWriter.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/DefaultSegmentWriter.java
b/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/DefaultSegmentWriter.java
index cf885a284e..1f2f7fa1e1 100644
---
a/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/DefaultSegmentWriter.java
+++
b/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/DefaultSegmentWriter.java
@@ -28,7 +28,6 @@ import static java.util.Objects.checkIndex;
import static java.util.Objects.requireNonNull;
import static
org.apache.jackrabbit.oak.commons.conditions.Validate.checkArgument;
-import static
org.apache.jackrabbit.guava.common.base.Preconditions.checkPositionIndex;
import static org.apache.jackrabbit.oak.api.Type.BINARIES;
import static org.apache.jackrabbit.oak.api.Type.BINARY;
import static org.apache.jackrabbit.oak.api.Type.NAME;
@@ -332,7 +331,7 @@ public class DefaultSegmentWriter implements SegmentWriter {
requireNonNull(entries);
int size = entries.size();
checkIndex(size, MapRecord.MAX_SIZE);
- checkPositionIndex(level, MapRecord.MAX_NUMBER_OF_LEVELS);
+ checkIndex(level, MapRecord.MAX_NUMBER_OF_LEVELS + 1);
checkArgument(size != 0 || level ==
MapRecord.MAX_NUMBER_OF_LEVELS);
return writeOperationHandler.execute(gcGeneration,
newWriteOperation(
RecordWriters.newMapLeafWriter(level, entries)));