Skip to content

Commit 53dfdcb

Browse files
dfa1claude
andcommitted
refactor(reader): drop dead registry field from ScanIterator
The field was stored but never called — all encoding dispatch goes through VortexHandle.decodeFlatSegment → FlatSegmentDecoder, which already holds its own ReadRegistry. Remove the parameter from the constructor and both call sites. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b604f21 commit 53dfdcb

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

reader/src/main/java/io/github/dfa1/vortex/reader/ScanIterator.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ public final class ScanIterator implements Iterator<Chunk>, AutoCloseable {
8484
private static final ValueLayout.OfLong LE_LONG = ValueLayout.JAVA_LONG_UNALIGNED.withOrder(ByteOrder.LITTLE_ENDIAN);
8585

8686
private final VortexHandle file;
87-
private final ReadRegistry registry;
8887
private final ScanOptions options;
8988

9089
private List<ChunkSpec> chunks;
@@ -96,9 +95,8 @@ public final class ScanIterator implements Iterator<Chunk>, AutoCloseable {
9695
private Chunk openChunk;
9796
private boolean closed;
9897

99-
public ScanIterator(VortexHandle file, ReadRegistry registry, ScanOptions options) {
98+
public ScanIterator(VortexHandle file, ScanOptions options) {
10099
this.file = file;
101-
this.registry = registry;
102100
this.options = options;
103101
}
104102

reader/src/main/java/io/github/dfa1/vortex/reader/VortexHttpReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public MemorySegment rawSegment(SegmentSpec spec) {
278278

279279
@Override
280280
public ScanIterator scan(ScanOptions options) {
281-
return new ScanIterator(this, registry, options);
281+
return new ScanIterator(this, options);
282282
}
283283

284284
@Override

reader/src/main/java/io/github/dfa1/vortex/reader/VortexReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public long fileSize() {
153153

154154
@Override
155155
public ScanIterator scan(ScanOptions options) {
156-
return new ScanIterator(this, registry, options);
156+
return new ScanIterator(this, options);
157157
}
158158

159159
@Override

0 commit comments

Comments
 (0)