Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2262#discussion_r131788989
  
    --- Diff: storm-client/src/jvm/org/apache/storm/security/auth/AutoSSL.java 
---
    @@ -100,19 +100,20 @@ public void populateCredentials(Map<String, String> 
credentials) {
         // the key.
         public static void serializeSSLFile(String readFile, Map<String, 
String> credentials) {
             try {
    -            FileInputStream in = new FileInputStream(readFile);
    -            LOG.debug("serializing ssl file: {}", readFile);
    -            ByteArrayOutputStream result = new ByteArrayOutputStream();
    -            byte[] buffer = new byte[4096];
    -            int length;
    -            while ((length = in.read(buffer)) != -1) {
    -                result.write(buffer, 0, length);
    -            }
    -            String resultStr = 
DatatypeConverter.printBase64Binary(result.toByteArray());
    +            try(FileInputStream in = new FileInputStream(readFile)) {
    --- End diff --
    
    space between `try` and `(`, and let's not make it unnecessary nested. It 
can be flattened.


---
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.
---

Reply via email to