HDFS-7227. Fix findbugs warning about NP_DEREFERENCE_OF_READLINE_VALUE in SpanReceiverHost (cmccabe)
(cherry picked from commit 7ab754545d
)
This commit is contained in:
parent
d3b9e9be24
commit
a36fd88671
|
@ -22,6 +22,9 @@ Release 2.7.0 - UNRELEASED
|
||||||
|
|
||||||
HADOOP-11166. Remove ulimit from test-patch.sh. (wang)
|
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
|
Release 2.6.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.hadoop.tracing;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
|
import java.io.EOFException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -101,6 +102,9 @@ public class SpanReceiverHost implements TraceAdminProtocol {
|
||||||
reader = new BufferedReader(
|
reader = new BufferedReader(
|
||||||
new InputStreamReader(new FileInputStream("/proc/self/stat")));
|
new InputStreamReader(new FileInputStream("/proc/self/stat")));
|
||||||
String line = reader.readLine();
|
String line = reader.readLine();
|
||||||
|
if (line == null) {
|
||||||
|
throw new EOFException();
|
||||||
|
}
|
||||||
nonce = line.split(" ")[0];
|
nonce = line.split(" ")[0];
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue