Skip to content

Response parsing and dependency on StandardCharsets class#46

Merged
markmcd merged 2 commits intogooglemaps:masterfrom
vassilijakovlev:master
Nov 16, 2014
Merged

Response parsing and dependency on StandardCharsets class#46
markmcd merged 2 commits intogooglemaps:masterfrom
vassilijakovlev:master

Conversation

@vassilijakovlev
Copy link
Copy Markdown
Contributor

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.

@markmcd
Copy link
Copy Markdown
Contributor

markmcd commented Nov 9, 2014

Thanks for your submission - before we go any further have you signed the CLA?

@vassilijakovlev
Copy link
Copy Markdown
Contributor Author

Yep, just a few moments ago.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smaller would be nicer, but we load the whole response into memory anyway.

@broady
Copy link
Copy Markdown
Contributor

broady commented Nov 11, 2014

LGTM, @markmcd , merge if LGTM to you too.

@vassilijakovlev
Copy link
Copy Markdown
Contributor Author

@broady and @markmcd , can you please provide any estimations on when this pull request will be merged?

@markmcd
Copy link
Copy Markdown
Contributor

markmcd commented Nov 16, 2014

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
@markmcd markmcd merged commit 9a0be2f into googlemaps:master Nov 16, 2014
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 this pull request may close these issues.

3 participants