Skip to content

chore: extract repeated requireNonNull literals (S1192)#23

Merged
dfa1 merged 1 commit into
mainfrom
chore/s1192-param-constants
Jun 26, 2026
Merged

chore: extract repeated requireNonNull literals (S1192)#23
dfa1 merged 1 commit into
mainfrom
chore/s1192-param-constants

Conversation

@dfa1

@dfa1 dfa1 commented Jun 26, 2026

Copy link
Copy Markdown
Owner

The null-validation work (#22) repeated the parameter-name strings "compressed" (ZstdDecompressCtx) and "samples" (ZstdDictionary) three times each, which trips Sonar S1192. Hoist them to COMPRESSED / SAMPLES constants. The short names (src/dst/dict) are under Sonar's literal-length threshold and stay inline.

Test

./mvnw -pl zstd -am test — green, checkstyle clean.

🤖 Generated with Claude Code

The null checks added the parameter-name strings "compressed" and
"samples" three times each, tripping S1192. Hoist them to constants
(COMPRESSED, SAMPLES). The short names (src/dst/dict) are below Sonar's
literal-length threshold and stay inline.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfa1 dfa1 merged commit 2031498 into main Jun 26, 2026
1 check passed
@dfa1 dfa1 deleted the chore/s1192-param-constants branch June 26, 2026 20:47
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