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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]