> On Dec. 22, 2015, 7:48 p.m., Joris Van Remoortere wrote:
> > src/master/quota_handler.cpp, lines 357-359
> > <https://reviews.apache.org/r/41514/diff/2/?file=1173817#file1173817line357>
> >
> >     Have you considered making this static?
> >     What about building it up from the true and false components so that 
> > you can use the true component below. Something along these lines:
> >     ```
> >     const static hashset<string> trueValues({"true", "yes", "t", "y"});
> >     const static hashset<string> falseValues({"false", "no", "f", "n"});
> >     const static hashset<string> allowedForceValues = trueValues + 
> > falseValues;
> >     ```
> >     and
> >     ```
> >     const bool forced = (force.isSome() && trueValues.contains(forceValue));
> >     ```
> >     
> >     Please note the indentation is off the L334 in the current diff.

Review has already been updated to use JSON::Boolean.


- Joris


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


On Dec. 22, 2015, 6:09 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41514/
> -----------------------------------------------------------
> 
> (Updated Dec. 22, 2015, 6:09 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Bernd Mathiske, Joerg Schad, and 
> Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3960
>     https://issues.apache.org/jira/browse/MESOS-3960
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> POST request to "/quota" requires a single JSON object as opposed to
> key-value pairs encoded in a string.
> 
> 
> Diffs
> -----
> 
>   src/master/quota_handler.cpp 0217149a865ede751b3a03fe40b2d91b487b7b10 
>   src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 
>   src/tests/role_tests.cpp 2c5f68ccaac7e9a37345e2f331d1bc35cae77736 
> 
> Diff: https://reviews.apache.org/r/41514/diff/
> 
> 
> Testing
> -------
> 
> make check on Mac OS 10.10.4
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>

Reply via email to