storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kishorvpa...@apache.org
Subject [09/12] storm git commit: Removing unnecessary null check on STDOUT stream
Date Fri, 05 Feb 2016 19:19:03 GMT
Removing unnecessary null check on STDOUT stream


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/85b24aeb
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/85b24aeb
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/85b24aeb

Branch: refs/heads/master
Commit: 85b24aeb3d2e10ae4670de65d0d042ad5ea5ef2e
Parents: b506774
Author: Kishor Patil <kpatil@yahoo-inc.com>
Authored: Thu Feb 4 15:29:17 2016 -0600
Committer: Kishor Patil <kpatil@yahoo-inc.com>
Committed: Thu Feb 4 15:29:17 2016 -0600

----------------------------------------------------------------------
 .../daemon/metrics/reporters/ConsolePreparableReporter.java   | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/85b24aeb/storm-core/src/jvm/org/apache/storm/daemon/metrics/reporters/ConsolePreparableReporter.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/daemon/metrics/reporters/ConsolePreparableReporter.java
b/storm-core/src/jvm/org/apache/storm/daemon/metrics/reporters/ConsolePreparableReporter.java
index 3ef4237..1eacb63 100644
--- a/storm-core/src/jvm/org/apache/storm/daemon/metrics/reporters/ConsolePreparableReporter.java
+++ b/storm-core/src/jvm/org/apache/storm/daemon/metrics/reporters/ConsolePreparableReporter.java
@@ -23,7 +23,6 @@ import org.apache.storm.daemon.metrics.MetricsUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.PrintStream;
 import java.util.Locale;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
@@ -37,11 +36,7 @@ public class ConsolePreparableReporter implements PreparableReporter<ConsoleRepo
         LOG.debug("Preparing...");
         ConsoleReporter.Builder builder = ConsoleReporter.forRegistry(metricsRegistry);
 
-        PrintStream stream = System.out;
-        if (stream != null) {
-            builder.outputTo(stream);
-        }
-
+        builder.outputTo(System.out);
         Locale locale = MetricsUtils.getMetricsReporterLocale(stormConf);
         if (locale != null) {
             builder.formattedFor(locale);


Mime
View raw message