anmolanmol1234 commented on code in PR #6699: URL: https://github.com/apache/hadoop/pull/6699#discussion_r1579209761
########## hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemAuthorization.java: ########## @@ -328,13 +328,13 @@ private void executeOp(Path reqPath, AzureBlobFileSystem fs, fs.open(reqPath); break; case Open: - InputStream is = fs.open(reqPath); - if (getConfiguration().getHeadOptimizationForInputStream()) { - try { - is.read(); - } catch (IOException ex) { - is.close(); - throw (IOException) ex.getCause(); + try(InputStream is = fs.open(reqPath)) { + if (getConfiguration().isInputStreamLazyOptimizationEnabled()) { + try { + is.read(); + } catch (IOException ex) { + throw (IOException) ex.getCause(); + } Review Comment: okay missed that part, males semse ########## hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemAuthorization.java: ########## @@ -328,13 +328,13 @@ private void executeOp(Path reqPath, AzureBlobFileSystem fs, fs.open(reqPath); break; case Open: - InputStream is = fs.open(reqPath); - if (getConfiguration().getHeadOptimizationForInputStream()) { - try { - is.read(); - } catch (IOException ex) { - is.close(); - throw (IOException) ex.getCause(); + try(InputStream is = fs.open(reqPath)) { + if (getConfiguration().isInputStreamLazyOptimizationEnabled()) { + try { + is.read(); + } catch (IOException ex) { + throw (IOException) ex.getCause(); + } Review Comment: okay missed that part, makes sense -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org