Nicolapps commented on code in PR #1700:
URL: https://github.com/apache/jackrabbit-oak/pull/1700#discussion_r1758273882


##########
oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/Segment.java:
##########
@@ -217,6 +217,21 @@ public String toString() {
         }
     }
 
+    public Segment(
+            @NotNull SegmentReader reader,
+            @NotNull SegmentId id,
+            @NotNull SegmentData data,
+            @NotNull RecordNumbers recordNumbers,
+            @NotNull SegmentReferences segmentReferences
+    ) {
+        this.reader = requireNonNull(reader);
+        this.id = requireNonNull(id);
+        this.data = requireNonNull(data);
+        this.recordNumbers = requireNonNull(recordNumbers);
+        this.segmentReferences = requireNonNull(segmentReferences);
+        this.version = LATEST_VERSION;

Review Comment:
   I agree, I updated my PR. I also added unit tests for the constructor.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to