Dan Burkert has posted comments on this change.

Change subject: Use Traits to avoid duplicate code in SSL wrappers
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/5767/3/src/kudu/security/ca/cert_management.cc
File src/kudu/security/ca/cert_management.cc:

PS3, Line 135:   switch (format) {
             :     case DataFormat::DER:
             :       CERT_RET_NOT_OK(Traits::write_der(bio, obj), "error 
exporting DER format");
             :       break;
             :     case DataFormat::PEM:
             :       CERT_RET_NOT_OK(Traits::write_pem(bio, obj), "error 
exporting PEM format");
             :       break;
             :   }
> It's still possible to pass something non-expected:
Isn't that UB?  I'm not a fan of default cases in situations like this, since 
it covers up static warnings about missing cases.  so your trading a static 
warning for a runtime panic; I'd rather have the static warning.


-- 
To view, visit http://gerrit.cloudera.org:8080/5767
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If1c44857358fc82f2694dff021b9f2ac3641313a
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

Reply via email to