Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1511#discussion_r78646330 --- Diff: server/test/org/apache/cloudstack/network/lb/CertServiceTest.java --- @@ -440,129 +441,130 @@ public void runUploadSslCertBadkeyPair() throws IOException, IllegalAccessExcept public void runUploadSslCertBadkeyAlgo() throws IOException, IllegalAccessException, NoSuchFieldException { // Reading appropritate files - String certFile = URLDecoder.decode(getClass().getResource("/certs/rsa_self_signed.crt").getFile(),Charset.defaultCharset().name()); - String keyFile = URLDecoder.decode(getClass().getResource("/certs/dsa_self_signed.key").getFile(),Charset.defaultCharset().name()); + final String certFile = URLDecoder.decode(getClass().getResource("/certs/rsa_self_signed.crt").getFile(),Charset.defaultCharset().name()); + final String keyFile = URLDecoder.decode(getClass().getResource("/certs/dsa_self_signed.key").getFile(),Charset.defaultCharset().name()); - String cert = readFileToString(new File(certFile)); - String key = readFileToString(new File(keyFile)); + final String cert = readFileToString(new File(certFile)); + final String key = readFileToString(new File(keyFile)); - CertServiceImpl certService = new CertServiceImpl(); + final CertServiceImpl certService = new CertServiceImpl(); --- End diff -- This line appears in nearly every test method. Consider converting it to an attribute and initializing it in `setUp`. Since the `setUp` is run before every test method, the instance will be re-initialized and it will remove some repetition.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---