[ 
https://issues.apache.org/jira/browse/HDFS-7101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16435212#comment-16435212
 ] 

Hudson commented on HDFS-7101:
------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #13979 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/13979/])
HDFS-7101. Potential null dereference in DFSck#doWork(). Contributed by 
(aajisaka: rev 113af12cfb240ea9a7189bb2701693466eb8e993)
* (edit) 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java


> Potential null dereference in DFSck#doWork()
> --------------------------------------------
>
>                 Key: HDFS-7101
>                 URL: https://issues.apache.org/jira/browse/HDFS-7101
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.5.1
>            Reporter: Ted Yu
>            Assignee: skrho
>            Priority: Minor
>              Labels: BB2015-05-TBR
>             Fix For: 2.10.0, 3.2.0, 3.1.1, 2.9.2
>
>         Attachments: HDFS-7101.v1.patch, HDFS-7101_001.patch
>
>
> {code}
>     String lastLine = null;
>     int errCode = -1;
>     try {
>       while ((line = input.readLine()) != null) {
> ...
>     if (lastLine.endsWith(NamenodeFsck.HEALTHY_STATUS)) {
>       errCode = 0;
> {code}
> If the input stream is empty, lastLine is kept null, leading to NPE.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to