Skip to content

Commit c45b841

Browse files
dfa1claude
andcommitted
fix(sonar): suppress S6218 on ZstdEncodingEncoder data-carrier records
SonarCloud flagged the private FrameLayout (long[] components) and Frames (byte[] metadata) records as reliability bugs (java:S6218 — array content not considered in equals/hashCode), failing the new-code reliability gate. Both are internal data carriers: instances flow through the encode pipeline positionally and are never value-compared, so the default identity equals is correct and content-aware overrides would be dead code. Suppress with the same justification used for the other carrier records (Dictionary64, KnownArrayNode, ChunkRef, DecodeContext) rather than add unused overrides. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3c98966 commit c45b841

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

writer/src/main/java/io/github/dfa1/vortex/writer/encode/ZstdEncodingEncoder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,12 @@ private EncodeResult buildNullableResult(
144144
}
145145

146146
/// Byte spans and value counts of each frame; spans sum to the payload size.
147+
@SuppressWarnings("java:S6218") // internal data carrier; the array components flow through the encode pipeline positionally and are never value-compared.
147148
private record FrameLayout(long[] byteLengths, long[] valueCounts) {
148149
}
149150

150151
/// Compressed frame payloads paired with the encoded `ZstdMetadata` describing them.
152+
@SuppressWarnings("java:S6218") // internal data carrier; the byte[] metadata flows through the encode pipeline positionally and is never value-compared.
151153
private record Frames(List<MemorySegment> compressed, byte[] metadata) {
152154
}
153155

0 commit comments

Comments
 (0)