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

fix: npe in createFrom #746

Merged
merged 4 commits into from
Mar 8, 2021
Merged

fix: npe in createFrom #746

merged 4 commits into from
Mar 8, 2021

Conversation

frankyn
Copy link
Member

@frankyn frankyn commented Mar 5, 2021

createFrom expects object metadata to be available once uploaded. If response metadata is not available a get object metadata request is made with a null Options parameter which causes an NPE. I tested the change by running IT with multiple uploads to validate failure no longer occurs.

  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)

Fixes #745 ☕️

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 5, 2021
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Mar 5, 2021
@codecov
Copy link

codecov bot commented Mar 5, 2021

Codecov Report

Merging #746 (f2950d5) into master (25ea236) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #746      +/-   ##
============================================
+ Coverage     64.60%   64.61%   +0.01%     
  Complexity      625      625              
============================================
  Files            32       32              
  Lines          5311     5313       +2     
  Branches        520      520              
============================================
+ Hits           3431     3433       +2     
  Misses         1718     1718              
  Partials        162      162              
Impacted Files Coverage Δ Complexity Δ
...ava/com/google/cloud/storage/BlobWriteChannel.java 80.19% <100.00%> (+0.40%) 15.00 <1.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25ea236...411b636. Read the comment docs.

@frankyn frankyn marked this pull request as ready for review March 8, 2021 19:44
@frankyn frankyn requested a review from a team March 8, 2021 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPE during upload with 1.113.12
2 participants