-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39211/#review102372
-----------------------------------------------------------


Looks great! Just a couple of suggestions to expand unit testing & logging.


3rdparty/libprocess/3rdparty/stout/include/stout/json.hpp (line 754)
<https://reviews.apache.org/r/39211/#comment159997>

    Worth including s.substring(end..last_char) in the error message, so the 
user knows what trailing chars?



3rdparty/libprocess/3rdparty/stout/tests/json_tests.cpp (line 232)
<https://reviews.apache.org/r/39211/#comment159999>

    Could also test the positive case that we correctly parse (no error) a 
jsonString with a valid element and only whitespace trailing.



3rdparty/libprocess/3rdparty/stout/tests/json_tests.cpp (line 252)
<https://reviews.apache.org/r/39211/#comment159998>

    But parsing this as an array should succeed without error, correct? Can we 
validate that in the test too?


- Adam B


On Oct. 12, 2015, 11:29 a.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39211/
> -----------------------------------------------------------
> 
> (Updated Oct. 12, 2015, 11:29 a.m.)
> 
> 
> Review request for mesos, Adam B and Joseph Wu.
> 
> 
> Bugs: MESOS-3698
>     https://issues.apache.org/jira/browse/MESOS-3698
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Check for trailing characters in JSON::parse().
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/json.hpp 
> 0870300c2d372722b4850155cb2a8e848b986ed5 
>   3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp 
> b95667f4c1a1c170016da024a5e4af02ccaa064e 
>   3rdparty/libprocess/3rdparty/stout/tests/json_tests.cpp 
> 131d39b87e571f16c774a133eb3148e98d8b9dd4 
> 
> Diff: https://reviews.apache.org/r/39211/diff/
> 
> 
> Testing
> -------
> 
> Added tests to make sure that JSON::parse() is successfully returning errors 
> when passed invalid JSON objects. Ran `make check`.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>

Reply via email to