From f503a214919acf82798c3c1bd117b6699a212b9c Mon Sep 17 00:00:00 2001 From: Davide Angelocola Date: Mon, 15 Jun 2026 22:41:28 +0200 Subject: [PATCH 1/2] refactor(reader): drop dead registry field from ScanIterator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../main/java/io/github/dfa1/vortex/reader/ScanIterator.java | 4 +--- .../java/io/github/dfa1/vortex/reader/VortexHttpReader.java | 2 +- .../main/java/io/github/dfa1/vortex/reader/VortexReader.java | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/reader/src/main/java/io/github/dfa1/vortex/reader/ScanIterator.java b/reader/src/main/java/io/github/dfa1/vortex/reader/ScanIterator.java index ff0ef1c7..b5742370 100644 --- a/reader/src/main/java/io/github/dfa1/vortex/reader/ScanIterator.java +++ b/reader/src/main/java/io/github/dfa1/vortex/reader/ScanIterator.java @@ -84,7 +84,6 @@ public final class ScanIterator implements Iterator, AutoCloseable { private static final ValueLayout.OfLong LE_LONG = ValueLayout.JAVA_LONG_UNALIGNED.withOrder(ByteOrder.LITTLE_ENDIAN); private final VortexHandle file; - private final ReadRegistry registry; private final ScanOptions options; private List chunks; @@ -96,9 +95,8 @@ public final class ScanIterator implements Iterator, AutoCloseable { private Chunk openChunk; private boolean closed; - public ScanIterator(VortexHandle file, ReadRegistry registry, ScanOptions options) { + public ScanIterator(VortexHandle file, ScanOptions options) { this.file = file; - this.registry = registry; this.options = options; } diff --git a/reader/src/main/java/io/github/dfa1/vortex/reader/VortexHttpReader.java b/reader/src/main/java/io/github/dfa1/vortex/reader/VortexHttpReader.java index 9420a42d..d518c058 100644 --- a/reader/src/main/java/io/github/dfa1/vortex/reader/VortexHttpReader.java +++ b/reader/src/main/java/io/github/dfa1/vortex/reader/VortexHttpReader.java @@ -278,7 +278,7 @@ public MemorySegment rawSegment(SegmentSpec spec) { @Override public ScanIterator scan(ScanOptions options) { - return new ScanIterator(this, registry, options); + return new ScanIterator(this, options); } @Override diff --git a/reader/src/main/java/io/github/dfa1/vortex/reader/VortexReader.java b/reader/src/main/java/io/github/dfa1/vortex/reader/VortexReader.java index 1dd49733..8562feb2 100644 --- a/reader/src/main/java/io/github/dfa1/vortex/reader/VortexReader.java +++ b/reader/src/main/java/io/github/dfa1/vortex/reader/VortexReader.java @@ -153,7 +153,7 @@ public long fileSize() { @Override public ScanIterator scan(ScanOptions options) { - return new ScanIterator(this, registry, options); + return new ScanIterator(this, options); } @Override From 24d79c0ae038c01a2caa2d31f503e0b8d97b46aa Mon Sep 17 00:00:00 2001 From: Davide Angelocola Date: Mon, 15 Jun 2026 22:44:11 +0200 Subject: [PATCH 2/2] ci: fix Mockito self-attach warning via byte-buddy-agent javaagent Add maven-dependency-plugin:properties execution to resolve net.bytebuddy:byte-buddy-agent:jar path at build time, then load it as -javaagent in the surefire argLine. Eliminates the "Mockito is currently self-attaching" warning without version pinning. Co-Authored-By: Claude Sonnet 4.6 --- pom.xml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c35c606a..8e10633d 100644 --- a/pom.xml +++ b/pom.xml @@ -268,10 +268,18 @@ - @{argLine} --sun-misc-unsafe-memory-access=allow --enable-native-access=ALL-UNNAMED + coverage data is collected. + {@code net.bytebuddy:byte-buddy-agent:jar} is resolved to an absolute path + by {@code maven-dependency-plugin:properties} (declared in build/plugins); + loading it as a javaagent suppresses the Mockito self-attach warning. --> + @{argLine} -javaagent:${net.bytebuddy:byte-buddy-agent:jar} --sun-misc-unsafe-memory-access=allow --enable-native-access=ALL-UNNAMED + + org.apache.maven.plugins + maven-dependency-plugin + 3.7.0 + org.codehaus.mojo exec-maven-plugin @@ -358,6 +366,20 @@ org.apache.maven.plugins maven-checkstyle-plugin + + org.apache.maven.plugins + maven-dependency-plugin + + + + locate-byte-buddy-agent + + properties + + + +