hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject git commit: HDFS-7227. Fix findbugs warning about NP_DEREFERENCE_OF_READLINE_VALUE in SpanReceiverHost (cmccabe)
Date Thu, 23 Oct 2014 20:25:59 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 86cad007d -> 7ab754545


HDFS-7227. Fix findbugs warning about NP_DEREFERENCE_OF_READLINE_VALUE in SpanReceiverHost
(cmccabe)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7ab75454
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7ab75454
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7ab75454

Branch: refs/heads/trunk
Commit: 7ab754545dca16518e8fe9353ef69b77f365426b
Parents: 86cad00
Author: Colin Patrick Mccabe <cmccabe@cloudera.com>
Authored: Thu Oct 23 13:25:39 2014 -0700
Committer: Colin Patrick Mccabe <cmccabe@cloudera.com>
Committed: Thu Oct 23 13:25:39 2014 -0700

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                  | 3 +++
 .../main/java/org/apache/hadoop/tracing/SpanReceiverHost.java    | 4 ++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7ab75454/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index ce5a6db..d180ea0 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -365,6 +365,9 @@ Release 2.7.0 - UNRELEASED
 
     HADOOP-11166. Remove ulimit from test-patch.sh. (wang)
 
+    HDFS-7227. Fix findbugs warning about NP_DEREFERENCE_OF_READLINE_VALUE in
+    SpanReceiverHost (cmccabe)
+
 Release 2.6.0 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7ab75454/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/SpanReceiverHost.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/SpanReceiverHost.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/SpanReceiverHost.java
index 13c92ac..81993e9 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/SpanReceiverHost.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/SpanReceiverHost.java
@@ -19,6 +19,7 @@ package org.apache.hadoop.tracing;
 
 import java.io.BufferedReader;
 import java.io.DataInputStream;
+import java.io.EOFException;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -101,6 +102,9 @@ public class SpanReceiverHost implements TraceAdminProtocol {
       reader = new BufferedReader(
           new InputStreamReader(new FileInputStream("/proc/self/stat")));
       String line = reader.readLine();
+      if (line == null) {
+        throw new EOFException();
+      }
       nonce = line.split(" ")[0];
     } catch (IOException e) {
     } finally {


Mime
View raw message