chore: clear SonarCloud code smells - #32
Conversation
Satisfy null-flow, record-pattern, and literal-duplication rules so new_violations returns to zero under the project quality policy.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe change centralizes validation paths and document parameter names. It refactors Jackson wire serialization and relationship conversion, adds coverage for null array elements, then simplifies mapping exception handling and documents existing constructor initialization. ChangesValidation and Jackson codec
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@jsonapi-java-jackson3/src/main/java/io/github/kazemek/jsonapi/jackson3/internal/DomainResourceWriter.java`:
- Around line 253-255: Update the Object[] branch in the value conversion switch
used before classifyToManyItems to use a null-tolerant list conversion instead
of List.of(array). Preserve null elements so classifyToManyItems can skip them,
while leaving the existing List<?> handling unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 7ab87220-026a-430d-bd87-d41f121544e2
📒 Files selected for processing (8)
jsonapi-java-core/src/main/java/io/github/kazemek/jsonapi/core/validation/JsonApiDocumentValidator.javajsonapi-java-jackson3/src/main/java/io/github/kazemek/jsonapi/jackson3/JsonApiDocumentWriter.javajsonapi-java-jackson3/src/main/java/io/github/kazemek/jsonapi/jackson3/internal/DocumentWireReader.javajsonapi-java-jackson3/src/main/java/io/github/kazemek/jsonapi/jackson3/internal/DomainResourceWriter.javajsonapi-java-jackson3/src/main/java/io/github/kazemek/jsonapi/jackson3/internal/JsonApiWireWriter.javajsonapi-java-jackson3/src/main/java/io/github/kazemek/jsonapi/jackson3/internal/LinkWireReader.javajsonapi-java-jackson3/src/main/java/io/github/kazemek/jsonapi/jackson3/internal/MappingDefinitionCache.javajsonapi-java-jackson3/src/main/java/io/github/kazemek/jsonapi/jackson3/internal/ReadLocationIndex.java
List.of rejected null array elements before classifyToManyItems could skip them; Arrays.asList keeps List/Iterable null-skipping behavior.
|
Addressed the actionable CodeRabbit finding in e93482f ( Skipping the docstring-coverage pre-merge warning — this repo has no docstring gate, and this PR is Sonar smell cleanup only. |
|



Satisfy null-flow, record-pattern, and literal-duplication rules so new_violations returns to zero under the project quality policy.
Summary by CodeRabbit
Bug Fixes
Refactor
Documentation