KEMBAR78
fix: npe in createFrom by frankyn · Pull Request #746 · googleapis/java-storage · GitHub
Skip to content

Conversation

@frankyn
Copy link
Contributor

@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