Skip to content

Fix NPE in getobjectKey() - #742

Merged
MaximPlusov merged 1 commit into
integrationfrom
npe
Jul 31, 2026
Merged

Fix NPE in getobjectKey()#742
MaximPlusov merged 1 commit into
integrationfrom
npe

Conversation

@LonelyMidoriya

@LonelyMidoriya LonelyMidoriya commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of PDF objects without an object key, preventing errors when accessing their metadata.

@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: bec4b81a-4631-4af6-a19e-e79187a7ef42

📥 Commits

Reviewing files that changed from the base of the PR and between c9d6024 and e0b477a.

📒 Files selected for processing (1)
  • validation-model/src/main/java/org/verapdf/gf/model/impl/pd/GFPDObject.java

📝 Walkthrough

Walkthrough

getobjectKey() now returns null when the underlying COS object has no object key. This prevents dereferencing a missing key.

Changes

Object key access

Layer / File(s) Summary
Null-safe object key retrieval
validation-model/src/main/java/org/verapdf/gf/model/impl/pd/GFPDObject.java
getobjectKey() checks for a missing COS object key before converting it to a string.

Estimated code review effort: 1 (Trivial) | ~2 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 and concisely describes the main change: fixing a null-pointer exception in getobjectKey().
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

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.

@MaximPlusov
MaximPlusov merged commit 4dea032 into integration Jul 31, 2026
8 checks passed
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.

2 participants