accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From madrob <...@git.apache.org>
Subject [GitHub] accumulo pull request #283: ACCUMULO-4687 Clean up some static-analysis warn...
Date Wed, 26 Jul 2017 16:05:06 GMT
Github user madrob commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/283#discussion_r129617491
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/util/Jar.java ---
    @@ -41,8 +41,9 @@ public void execute(final String[] args) throws Exception {
         String jarFileName = args[0];
         String candidateMainClass = args.length > 1 ? args[1] : null;
         Class<?> mainClass = null;
    +    JarFile f = null;
         try {
    -      JarFile f = new JarFile(jarFileName);
    --- End diff --
    
    Why not try-with-resources?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message