Response parsing and dependency on StandardCharsets class#46
Merged
markmcd merged 2 commits intogooglemaps:masterfrom Nov 16, 2014
Merged
Response parsing and dependency on StandardCharsets class#46markmcd merged 2 commits intogooglemaps:masterfrom
markmcd merged 2 commits intogooglemaps:masterfrom
Conversation
Contributor
|
Thanks for your submission - before we go any further have you signed the CLA? |
Contributor
Author
|
Yep, just a few moments ago. |
Contributor
There was a problem hiding this comment.
This buffer size is pretty big - I think we'd be okay with 1024.
I'm no expert, though. I think pretty much all responses from the APIs would fit in 8KiB.
Any comment, @markmcd ?
Contributor
There was a problem hiding this comment.
Smaller would be nicer, but we load the whole response into memory anyway.
Contributor
|
LGTM, @markmcd , merge if LGTM to you too. |
Contributor
Author
Contributor
|
LGTM - I'm pretty surprised how well this handles malformed UTF-8... I tried pretty hard to break it :) |
markmcd
added a commit
that referenced
this pull request
Nov 16, 2014
Response parsing and dependency on StandardCharsets class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently response parsing transitively depends on StandardCharsets class, that is not available on Android devices running on API lower than level 19, what makes using your library in Android applications impossible.
This patch eliminates this dependency. There is also an option to use Apache Commons IO, but in case of Android applications this is an extra ~180 kilobytes to a final application size.