Alexander Wels has posted comments on this change.
Change subject: utils: pki-resource: cleanup: levarage enum for constants
......................................................................
Patch Set 9: Code-Review+1
(3 comments)
Overall I am happy with it now. just some minor comments. Checkstyle should
flag them as redundant.
....................................................
File
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/PKIResources.java
Line 12: import org.ovirt.engine.core.utils.crypt.OpenSSHUtils;
Line 13:
Line 14: public class PKIResources {
Line 15:
Line 16: private static interface IFormatter {
Interfaces are inherently static, you don't need to specify static here.
Line 17: String toString(Certificate cert, String alias);
Line 18: }
Line 19:
Line 20: private static IFormatter formatPEM = new IFormatter() {
Line 49: );
Line 50: }
Line 51: };
Line 52:
Line 53: public static enum Format {
Redundant static here too
Line 54:
Line 55: X509_PEM_CA("application/x-x509-ca-cert", formatPEM),
Line 56: X509_PEM("application/x-x509-cert", formatPEM),
Line 57: OPENSSH_PUBKEY("text/plain", formatOpenSSH);
Line 76: return toString(cert, null);
Line 77: }
Line 78: }
Line 79:
Line 80: public static enum Resource {
Redundant static here too
Line 81: CACertificate(EngineLocalConfig.getInstance().getPKICACert(),
Format.X509_PEM_CA, null),
Line 82:
EngineCertificate(EngineLocalConfig.getInstance().getPKIEngineCert(),
Format.X509_PEM, "ovirt-engine");
Line 83:
Line 84: private Certificate cert;
--
To view, visit http://gerrit.ovirt.org/21073
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I24da0ff174599ffdeabbf5846eab429bf0d6510d
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches