Skip to content

Fix NPE in parseChunk() - #745

Open
LonelyMidoriya wants to merge 2 commits into
integrationfrom
npe-chunk-parser
Open

Fix NPE in parseChunk()#745
LonelyMidoriya wants to merge 2 commits into
integrationfrom
npe-chunk-parser

Conversation

@LonelyMidoriya

@LonelyMidoriya LonelyMidoriya commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved content stream handling when artifact data is unavailable or represented in an unexpected format.
    • Prevented validation issues caused by missing artifact lists.
    • Preserved existing behavior for PDF form artifact processing and error recovery.

@LonelyMidoriya LonelyMidoriya self-assigned this Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: eb81b3ed-9694-4279-914f-fb4cae814d6d

📥 Commits

Reviewing files that changed from the base of the PR and between 60dbfde and 74013eb.

📒 Files selected for processing (2)
  • wcag-validation/src/main/java/org/verapdf/gf/model/factory/chunks/ChunkParser.java
  • wcag-validation/src/main/java/org/verapdf/gf/model/impl/sa/GFSAContentStream.java

📝 Walkthrough

Walkthrough

GFSAContentStream now uses an empty artifact list for unsupported content stream object types. ChunkParser has a formatting-only indentation change.

Changes

Artifact parsing

Layer / File(s) Summary
Handle content stream artifacts
wcag-validation/src/main/java/org/verapdf/gf/model/impl/sa/GFSAContentStream.java, wcag-validation/src/main/java/org/verapdf/gf/model/factory/chunks/ChunkParser.java
Unsupported content stream objects now produce an empty artifact list. The Form XObject artifact merge statement is reindented without a behavior change.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: maximplusov

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary change: fixing a null pointer exception in parseChunk().
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch npe-chunk-parser

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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