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

Calling abort before the upload has been initiated results in NPE #37

Closed
kcalcagno opened this issue Nov 3, 2021 · 0 comments · Fixed by #38
Closed

Calling abort before the upload has been initiated results in NPE #37

kcalcagno opened this issue Nov 3, 2021 · 0 comments · Fixed by #38

Comments

@kcalcagno
Copy link
Contributor

If abort(Throwable) is called before the upload has been successfully initiated, the abort method results in a NullPointerException called from Utils.skipMiddle. This is because StringTransferManager's toString method doesn't check whether uploadId is null before calling Utils.skipMiddle. The NPE then hides the underlying exception which prompted us to call abort in the first place.

kcalcagno added a commit to kcalcagno/s3-stream-upload that referenced this issue Nov 3, 2021
alexmojaki added a commit that referenced this issue Nov 3, 2021
Fix #37 - use String.valueOf to protect against null uploadId in toString
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 a pull request may close this issue.

1 participant