test/docs: Sonar S5838/S5853 assertion cleanup + MemorySize docs drift - #328
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mainbut never pushed toorigin/main).docs: fixWriteOptions#globalDictMaxRetainedBytesdrift inreference.md(still documented aslongafter f89a3d3 changed it toMemorySize), 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 consecutiveassertThat(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