Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/950#discussion_r142861999
  
    --- Diff: 
exec/java-exec/src/test/java/org/apache/drill/exec/rpc/user/security/TestUserBitSSL.java
 ---
    @@ -223,9 +223,12 @@ public void testClientConfigHostnameVerification() {
           ts.load(null, password.toCharArray());
           ts.setCertificateEntry("drillTest", certificate.cert());
           // Store away the truststore.
    -      FileOutputStream fos1 = new FileOutputStream(tempFile1);
    -      ts.store(fos1, password.toCharArray());
    -      fos1.close();
    +      try (FileOutputStream fos1 = new FileOutputStream(tempFile1);) {
    +        ts.store(fos1, password.toCharArray());
    +        fos1.close();
    --- End diff --
    
    No need to close stream. It will be closed automatically.


---

Reply via email to