cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jburwell <>
Subject [GitHub] cloudstack pull request #1799: CLOUDSTACK-9632: Upgrade bouncy castle to ver...
Date Wed, 30 Nov 2016 22:37:04 GMT
Github user jburwell commented on a diff in the pull request:
    --- Diff: server/src/org/apache/cloudstack/network/lb/ ---
    @@ -339,190 +348,182 @@ public SslCertResponse createCertResponse(SslCertVO cert, List<LoadBalancerCertM
             return response;
    -    private void validateCert(Certificate cert, boolean chainPresent) {
    +    private void validateCert(final Certificate cert, final boolean chainPresent) {
    -        if (!(cert instanceof X509Certificate))
    +        if (!(cert instanceof X509Certificate)) {
                 throw new IllegalArgumentException("Invalid certificate format. Expected
X509 certificate");
    +        }
    --- End diff --
    Please consider converting this `if` block to a `Preconditions.checkArgument` to DRY out
the code.  Also, check that `cert` is not `null` to avoid a potential NPE.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message