This is an automated email from the ASF dual-hosted git repository.

miroslav 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 410211e4a6 OAK-11987 - 
org.apache.jackrabbit.oak.segment.azure.tool.SegmentStoreMigrator.migrateBinaryRef
 is missing a null check (#2586)
410211e4a6 is described below

commit 410211e4a6defe01418fbc53bf93677e19cdcf43
Author: Johnson Ho <[email protected]>
AuthorDate: Fri Oct 17 08:18:09 2025 -0400

    OAK-11987 - 
org.apache.jackrabbit.oak.segment.azure.tool.SegmentStoreMigrator.migrateBinaryRef
 is missing a null check (#2586)
---
 .../jackrabbit/oak/segment/azure/tool/SegmentStoreMigrator.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/tool/SegmentStoreMigrator.java
 
b/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/tool/SegmentStoreMigrator.java
index cdd2ac1af7..18199ef633 100644
--- 
a/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/tool/SegmentStoreMigrator.java
+++ 
b/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/tool/SegmentStoreMigrator.java
@@ -214,8 +214,10 @@ public class SegmentStoreMigrator implements Closeable  {
     private void migrateBinaryRef(SegmentArchiveReader reader, 
SegmentArchiveWriter writer) throws IOException, ExecutionException, 
InterruptedException {
         Future<Buffer> future = executor.submit(() -> 
RETRIER.execute(reader::getBinaryReferences));
         Buffer binaryReferences = future.get();
-        byte[] array = fetchByteArray(binaryReferences);
-        RETRIER.execute(() -> writer.writeBinaryReferences(array));
+        if (binaryReferences != null) {
+            byte[] array = fetchByteArray(binaryReferences);
+            RETRIER.execute(() -> writer.writeBinaryReferences(array));
+        }
     }
 
     private void migrateGraph(SegmentArchiveReader reader, 
SegmentArchiveWriter writer) throws IOException, ExecutionException, 
InterruptedException {

Reply via email to