This is an automated email from the ASF dual-hosted git repository.
nfsantos 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 6805b73d4c OAK-12043 - Avoid object allocation in SegmentID.compareTo
(#2668)
6805b73d4c is described below
commit 6805b73d4cd6b4008d32b8ec4ffc368011f74f06
Author: Nuno Santos <[email protected]>
AuthorDate: Fri Dec 19 15:18:49 2025 +0100
OAK-12043 - Avoid object allocation in SegmentID.compareTo (#2668)
---
.../src/main/java/org/apache/jackrabbit/oak/segment/SegmentId.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentId.java
b/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentId.java
index aad48beec4..07ff89ba28 100644
---
a/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentId.java
+++
b/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentId.java
@@ -252,9 +252,9 @@ public class SegmentId implements Comparable<SegmentId> {
@Override
public int compareTo(@NotNull SegmentId that) {
- int d = Long.valueOf(this.msb).compareTo(that.msb);
+ int d = Long.compare(this.msb, that.msb);
if (d == 0) {
- d = Long.valueOf(this.lsb).compareTo(that.lsb);
+ d = Long.compare(this.lsb, that.lsb);
}
return d;
}