Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensures NullPointerException is not thrown from IonReader.getIntegerSize(). #686

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

tgregg
Copy link
Contributor

@tgregg tgregg commented Dec 27, 2023

Issue #, if available:
Fixes #685

Description of changes:
Before the change, both the text and binary readers would fail with NPE on the added line 108 of ReaderIntegerSizeTest, where the method is called when the reader is not positioned on a value. The fixes ensure that null is returned in this case instead.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

codecov bot commented Dec 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (be0ed07) 67.24% compared to head (dd94ecf) 67.22%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #686      +/-   ##
============================================
- Coverage     67.24%   67.22%   -0.02%     
- Complexity     5482     5483       +1     
============================================
  Files           159      159              
  Lines         23007    23007              
  Branches       4122     4121       -1     
============================================
- Hits          15470    15467       -3     
- Misses         6257     6261       +4     
+ Partials       1280     1279       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tgregg tgregg merged commit 1a09a29 into master Jan 2, 2024
17 of 34 checks passed
@tgregg tgregg deleted the getintegersize-npe branch January 2, 2024 20:30
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.

Ensure IonReader.getIntegerSize() cannot throw NullPointerException
2 participants