Skip to content

chore: clear IntelliJ inspection warnings (zstd module)#18

Merged
dfa1 merged 1 commit into
mainfrom
chore/clear-intellij-warnings
Jun 26, 2026
Merged

chore: clear IntelliJ inspection warnings (zstd module)#18
dfa1 merged 1 commit into
mainfrom
chore/clear-intellij-warnings

Conversation

@dfa1

@dfa1 dfa1 commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Swept all 27 zstd main-source files with IntelliJ inspections; cleared every warning.

  • ZstdExceptionserialVersionUID annotated @Serial.
  • ZstdInputStreaminCap is constructor-only after the earlier leak-fix refactor; demote the field to a local.
  • ZstdStreamBufferset(buffer, size, pos) was always called with pos = 0; drop the parameter, set pos internally, update the stream call sites.
  • ZstdSkippableContent — record pattern in equals; suppress the @NotNull-override advisory on toString (never returns null; project deliberately avoids the JetBrains annotations dependency).
  • ZstdFrame — the five zero-copy MemorySegment frame-inspection overloads had no caller (the project's segment-first surface). Rather than drop public API, add a SegmentOverloads test asserting each mirrors its byte[] counterpart — silences the "never used" warning and covers the zero-copy path per the testing convention.

Test

./mvnw -pl zstd,integration-tests -am verify — 139 unit + 79 integration green, checkstyle + javadoc clean. IntelliJ: 0 warnings across all 27 main files.

🤖 Generated with Claude Code

- ZstdException: annotate serialVersionUID with @serial
- ZstdInputStream: inCap is constructor-only now, make it a local
- ZstdStreamBuffer: drop the set() pos parameter (always 0); set pos
  internally and update the stream call sites
- ZstdSkippableContent: use a record pattern in equals; suppress the
  IntelliJ @NotNull-override advisory on toString (never returns null,
  and we don't pull in the JetBrains annotations)
- ZstdFrame: the five zero-copy MemorySegment overloads had no caller —
  cover them with a SegmentOverloads test that checks each mirrors its
  byte[] counterpart

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfa1 dfa1 merged commit 7429d52 into main Jun 26, 2026
1 check passed
@dfa1 dfa1 deleted the chore/clear-intellij-warnings branch June 26, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant