You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/12/23 09:48:08 UTC

[GitHub] [zookeeper] eolivelli commented on a change in pull request #1562: ZOOKEEPER-4033: Remove unnecessary judgment of null

eolivelli commented on a change in pull request #1562:
URL: https://github.com/apache/zookeeper/pull/1562#discussion_r547870163



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeerMain.java
##########
@@ -233,12 +233,10 @@ public void runFromConfig(QuorumPeerConfig config) throws IOException, AdminServ
             // warn, but generally this is ok
             LOG.warn("Quorum Peer interrupted", e);
         } finally {
-            if (metricsProvider != null) {
-                try {
-                    metricsProvider.stop();
-                } catch (Throwable error) {
-                    LOG.warn("Error while stopping metrics", error);
-                }
+            try {

Review comment:
       Please make this variable *final*




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