You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2019/11/20 15:26:52 UTC

[GitHub] [hadoop-ozone] dineshchitlangia commented on a change in pull request #235: HDDS-2580. Ensure resources are closed in Get/PutKeyHandler

dineshchitlangia commented on a change in pull request #235: HDDS-2580. Ensure resources are closed in Get/PutKeyHandler
URL: https://github.com/apache/hadoop-ozone/pull/235#discussion_r348546285
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/keys/GetKeyHandler.java
 ##########
 @@ -65,8 +65,10 @@ public Void call() throws Exception {
 
     OzoneAddress address = new OzoneAddress(uri);
     address.ensureKeyAddress();
-    try (OzoneClient client =
-             address.createClient(createOzoneConfiguration())) {
+
+    OzoneConfiguration conf = createOzoneConfiguration();
+
+    try (OzoneClient client = address.createClient(conf)) {
 
 
 Review comment:
   @adoroszlai Can we avoid creating variable `conf` as it is only needed to createClient and not used later?
   We can stick with original code and you could make any checkstyle/formatting changes without creating a local variable.

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org