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: set mediaType to null if contentType cannot be parsed #911
Conversation
google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java
Show resolved
Hide resolved
Avoids users hitting a runtime exception when the contentType is invalid.
I force-pushed to resolve the conventionalcommits error, but I'm afraid things might be in a weird state now - let me know if I need to fix this. |
Note that this is potentially a behavior breaking change in that previously you could get an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be an argument for defaulting to application/octet-stream instead of null.
…ent-bom to v1.41.7 (googleapis#911) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-bom](https://togithub.com/googleapis/google-http-java-client) | `1.41.6` -> `1.41.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.7/compatibility-slim/1.41.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-bom/1.41.7/confidence-slim/1.41.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/google-http-java-client</summary> ### [`v1.41.7`](https://togithub.com/googleapis/google-http-java-client/blob/HEAD/CHANGELOG.md#​1417-httpsgithubcomgoogleapisgoogle-http-java-clientcomparev1416v1417-2022-04-11) [Compare Source](https://togithub.com/googleapis/google-http-java-client/compare/v1.41.6...v1.41.7) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-auth-library-java).
Fixes issue #905 by setting mediaType to null if the contentType is invalid.