[Serialize] Add 'find', 'add', 'remove' sandbox header functions#206
[Serialize] Add 'find', 'add', 'remove' sandbox header functions#206DonnaWuDongxia wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Why return when header is not found? I think we should do the reverse.
There was a problem hiding this comment.
If the findResult is null, it means we don't have such type of head.
There was a problem hiding this comment.
I think addSandboxHeader should add a header when it can't find that header. If you return when not finding the header, how can you add a new header?
There was a problem hiding this comment.
Oh, I think I misunderstood the return value of findSandboxHeader. When "null" is returned, it means something wrong happened. Otherwise an object will be returned even if there's no header found. A little tricky...
There was a problem hiding this comment.
I think we can have a more straightforward interface for findSandboxHeader. From end user's point of view, I thin hasSandboxHeader is enough, which returns only true or false.
There was a problem hiding this comment.
Shouldn't we return false when some error happens?
|
replaced by #207 |
No description provided.