mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Review Request 58136: Cleaned up pattern matching in Resource operator==.
Date Mon, 03 Apr 2017 07:57:59 GMT

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

Review request for mesos and Jie Yu.


Repository: mesos


Description
-------

The usual pattern for checking optional fields here is to check
whether the field is is either set for both sides or unset for both.
Subsequentially we check if possible values are equal, returning
'false' if they are not.

The code changed here did not follow this pattern, but instead assumed
it was the last check to run. This made it possible that a careless
addition after these checks would never be called.


Diffs
-----

  src/common/resources.cpp c26e0f995006dc6b2e70a491cea58fa90347e42a 
  src/v1/resources.cpp a53deafbea399a1bcf729d1c151bc46e9da04e11 


Diff: https://reviews.apache.org/r/58136/diff/1/


Testing
-------


Thanks,

Benjamin Bannier


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message