Skip to content

Sanitize file data before parsing with Jackson#1334

Merged
ssalinas merged 7 commits into
masterfrom
invalid-utf8
Feb 10, 2017
Merged

Sanitize file data before parsing with Jackson#1334
ssalinas merged 7 commits into
masterfrom
invalid-utf8

Conversation

@jhaber

@jhaber jhaber commented Nov 1, 2016

Copy link
Copy Markdown
Member

This takes the raw response from Mesos and decodes it with a UTF8 decoder that ignores invalid characters before passing the sanitized data to Jackson for parsing (which should now always succeed). Since these responses can be non-trivial in size I tried to avoid extra allocations as much as possible (the Response class exposes the data as a ByteBuffer which gets converted to a CharBuffer which backs the Reader passed to Jackson).

@tpetr @ssalinas

@ssalinas ssalinas modified the milestone: 0.12.0 Nov 2, 2016
Tom Petr added 2 commits November 21, 2016 09:31
replace instead of ignore so that we can update the offset
@ssalinas ssalinas modified the milestones: 0.13.0, 0.14.0 Dec 8, 2016
@ssalinas ssalinas added the hs_qa label Dec 13, 2016
@tpetr tpetr added the hs_stable label Jan 9, 2017
@ssalinas ssalinas merged commit dc2c4de into master Feb 10, 2017
@ssalinas ssalinas deleted the invalid-utf8 branch February 10, 2017 16:41
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