You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2020/03/05 12:50:16 UTC

[GitHub] [accumulo] jmark99 commented on a change in pull request #1546: Replace try/finally with try-with-resources.

jmark99 commented on a change in pull request #1546: Replace try/finally with try-with-resources.
URL: https://github.com/apache/accumulo/pull/1546#discussion_r388272607
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
 ##########
 @@ -39,10 +39,8 @@
   public static void printMetaBlockInfo(SiteConfiguration siteConfig, Configuration conf,
       FileSystem fs, Path path) throws IOException {
     FSDataInputStream fsin = fs.open(path);
-    BCFile.Reader bcfr = null;
-    try {
-      bcfr = new BCFile.Reader(fsin, fs.getFileStatus(path).getLen(), conf,
-          CryptoServiceFactory.newInstance(siteConfig, ClassloaderType.ACCUMULO));
+    try (BCFile.Reader bcfr = new BCFile.Reader(fsin, fs.getFileStatus(path).getLen(), conf,
 
 Review comment:
   @ctubbsii thanks for the info. I'm not that familiar with the use of var at the moment so I will read up on it a bit and then see if I can apply it where appropriate. You can take another look once I push another update.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services