Skip to content

test/docs: Sonar S5838/S5853 assertion cleanup + MemorySize docs drift - #328

Merged
dfa1 merged 2 commits into
mainfrom
docs/sonar-assertion-cleanup
Aug 5, 2026
Merged

test/docs: Sonar S5838/S5853 assertion cleanup + MemorySize docs drift#328
dfa1 merged 2 commits into
mainfrom
docs/sonar-assertion-cleanup

Conversation

@dfa1

@dfa1 dfa1 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Split out of the adversarial-tests security PR, where it had ridden along accidentally (these two commits were on local main but never pushed to origin/main).
  • docs: fix WriteOptions#globalDictMaxRetainedBytes drift in reference.md (still documented as long after f89a3d3 changed it to MemorySize), and bump Maven coordinate examples from 0.12.2 to 0.13.0 in README/tutorial/compatibility docs.
  • test: Sonar S5838 (.isEqualTo(0).isZero() on statically-numeric assertion subjects) and S5853 (merge consecutive assertThat(sameSubject) into one fluent chain) cleanup across cli/core/fbs-gen/inspector/integration/proto-gen/reader tests. No assertion coverage removed.

Test plan

  • ./mvnw verify -DskipITs — green

🤖 Generated with Claude Code

dfa1 and others added 2 commits August 5, 2026 21:48
WriteOptions#globalDictMaxRetainedBytes was still documented as long
(default "2 GB") after f89a3d3 changed it to MemorySize (default
MemorySize.ofGiB(2)). Also bump Maven coordinate examples in README,
tutorial, and compatibility docs from 0.12.2 to the current 0.13.0
release.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
S5838 ("Use isZero() instead."): replace .isEqualTo(0) with .isZero()
on the 9 sites where the assertion subject is statically numeric. The
other 13 flagged sites bind assertThat(Number) (DictFilterTest,
FusedFilterSumTest, ComputeFilteredAggregateTest), which has no
isZero() — Number isn't Comparable — so they're left as Sonar false
positives; casting or unboxing there would either drop the
boxed-type check these tests exist to pin (Long vs Double zero) or
turn an assertion failure into a ClassCastException.

S5853 ("Join these multiple assertions subject to one assertion
chain."): merge consecutive assertThat(sameSubject) statements into
one fluent chain across cli/core/fbs-gen/inspector/integration/
proto-gen/reader tests. No assertion coverage removed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dfa1
dfa1 merged commit 1c57b4b into main Aug 5, 2026
6 checks passed
@dfa1
dfa1 deleted the docs/sonar-assertion-cleanup branch August 5, 2026 19:53
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