accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwa...@apache.org
Subject [accumulo] branch master updated: #982 - Suppress incorrect lgtm warning
Date Wed, 27 Feb 2019 20:21:03 GMT
This is an automated email from the ASF dual-hosted git repository.

mwalch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/master by this push:
     new edc6d92   #982 - Suppress incorrect lgtm warning
edc6d92 is described below

commit edc6d924489813254c13ea7b5cf6a8e779e00861
Author: Mike Walch <mwalch@apache.org>
AuthorDate: Wed Feb 27 14:55:58 2019 -0500

     #982 - Suppress incorrect lgtm warning
---
 shell/src/main/java/org/apache/accumulo/shell/Shell.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/shell/src/main/java/org/apache/accumulo/shell/Shell.java b/shell/src/main/java/org/apache/accumulo/shell/Shell.java
index 14db16d..7e2fb3b 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/Shell.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/Shell.java
@@ -1130,8 +1130,8 @@ public class Shell extends ShellOptions implements KeywordExecutable
{
 
   private final void printHelp(String usage, String description, Options opts, int width)
       throws IOException {
-    new HelpFormatter().printHelp(new PrintWriter(reader.getOutput()), width, usage, description,
-        opts, 2, 5, null, true);
+    PrintWriter pw = new PrintWriter(reader.getOutput()); // lgtm [java/output-resource-leak]
+    new HelpFormatter().printHelp(pw, width, usage, description, opts, 2, 5, null, true);
     reader.getOutput().flush();
   }
 


Mime
View raw message