Re: Review Request 49673: Fixed a bug in JSON::Object.find: array subscript is dropped.

2016-07-05 Thread Kevin Klues

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




3rdparty/stout/tests/json_tests.cpp (line 340)


Maybe we should add a test here to explicitly test for the case wher the 
nested lookup is on a `null` value and it has a subscript, e.g.:

```
  EXPECT_ERROR(object.find("nested1.nested3[1].string"));
```


- Kevin Klues


On July 6, 2016, 12:34 a.m., Benjamin Mahler wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49673/
> ---
> 
> (Updated July 6, 2016, 12:34 a.m.)
> 
> 
> Review request for mesos, Joseph Wu and Kevin Klues.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> If a subscript is used on a non-array type, this was not being
> treated as an error. The tests introduced show some examples.
> 
> 
> Diffs
> -
> 
>   3rdparty/stout/include/stout/json.hpp 
> 829838ba95702b536f6badc9ac14fb483668d016 
>   3rdparty/stout/tests/json_tests.cpp 
> 12eaf8e10ea5d1d661975e518ec7f30886b66c0a 
> 
> Diff: https://reviews.apache.org/r/49673/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>



Re: Review Request 49673: Fixed a bug in JSON::Object.find: array subscript is dropped.

2016-07-05 Thread Kevin Klues

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


Ship it!




Ship It!

- Kevin Klues


On July 6, 2016, 12:34 a.m., Benjamin Mahler wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49673/
> ---
> 
> (Updated July 6, 2016, 12:34 a.m.)
> 
> 
> Review request for mesos, Joseph Wu and Kevin Klues.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> If a subscript is used on a non-array type, this was not being
> treated as an error. The tests introduced show some examples.
> 
> 
> Diffs
> -
> 
>   3rdparty/stout/include/stout/json.hpp 
> 829838ba95702b536f6badc9ac14fb483668d016 
>   3rdparty/stout/tests/json_tests.cpp 
> 12eaf8e10ea5d1d661975e518ec7f30886b66c0a 
> 
> Diff: https://reviews.apache.org/r/49673/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>



Review Request 49673: Fixed a bug in JSON::Object.find: array subscript is dropped.

2016-07-05 Thread Benjamin Mahler

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

Review request for mesos, Joseph Wu and Kevin Klues.


Repository: mesos


Description
---

If a subscript is used on a non-array type, this was not being
treated as an error. The tests introduced show some examples.


Diffs
-

  3rdparty/stout/include/stout/json.hpp 
829838ba95702b536f6badc9ac14fb483668d016 
  3rdparty/stout/tests/json_tests.cpp 12eaf8e10ea5d1d661975e518ec7f30886b66c0a 

Diff: https://reviews.apache.org/r/49673/diff/


Testing
---

make check


Thanks,

Benjamin Mahler